Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Renaming a Java object to change the case without changing the name does not result in a properly renamed file #3629

Open
cwm9cwm9 opened this issue Apr 25, 2024 · 1 comment
Labels

Comments

@cwm9cwm9
Copy link

cwm9cwm9 commented Apr 25, 2024

If you have a class, say someClassIWrote, tied to a file someClassIWrote.java and you rename the class using the F2 refactor command changing only the case, to, say, SomeClassIWrote, the filename's case does not change to match. This causes the error "The public type SomeClassIWrote must be defined in its own fileJava(16777541)" to be emitted. Renaming the file itself fixes the problem. (Interestingly, the Tab filename does not change to match.) This is probably due to a mismatch between the case sensitivity of the Linux OS vs the case insensitivity of the Windows OS.

Environment
  • Operating System: Windows 10
  • JDK version:
    openjdk version "17.0.8.1" 2023-08-24
    OpenJDK Runtime Environment Temurin-17.0.8.1+1 (build 17.0.8.1+1)
    OpenJDK 64-Bit Server VM Temurin-17.0.8.1+1 (build 17.0.8.1+1, mixed mode, sharing)
  • Visual Studio Code version: 1.85.1 (WPILib FIRST Robotics edition)
  • Java extension version: v1.30.2024042308
Steps To Reproduce
  1. Create an object
  2. Change the case of a single letter via the F2 command

I'm somewhat inexperienced with this IDE, so I will go after logs on request. I figure checking for this behavior is extremely easy.

@rgrunber rgrunber added the bug label Apr 29, 2024
@rgrunber
Copy link
Member

Seems similar to https://bugs.eclipse.org/bugs/show_bug.cgi?id=25406 , in that it probably also occurs if you do the same for renaming a package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants