-
Notifications
You must be signed in to change notification settings - Fork 21
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
StaticImports
incorrectly removes used import, but only on JDK17 and JDK21, not JDK22 and JDK23
#177
Comments
StaticImports
incorrectly removes used import, but only on JDK17, not JDK21
Very strange that you're seeing differences on those two Java versions. You might want to check the very latest Gradle plugin version, as I see you're using an older version still that does not contain a recent fix to detect missing method types. |
Hi, JabRef developer here. |
We just merged a fix for a very similar issue, there affecting static imports of variables, not methods: Figured that might be interesting to call out here as the fix could be similar. |
Reading this issue again I think it's logged against the wrong project. With the changes since it's hard to say if this has been solved or not; If you feel there's anything left to do then let's open an issue against rewrite-testing-frameworks with steps to reproduce, as it looks like StaticImports has been permanently enabled there already: |
Just for reference:
|
I think this is becoming increasingly common: |
Sorry to hear; Are there any missing types perhaps that differ between 21 and 21? Useing the Find missing types recipe, and the data table it produces, do you find any missing types in your codebase? If there are any missing types you might want to double-check your dependencies are set up correctly, or whether you're using Lombok, as Lombok leads to missing types. Any help troubleshooting this would be appreciated, as it's hard for me to find the time with the amount of requests we have coming in. |
I encountered this issue with the removed imports now on 21.0.2 temurin on mac |
In the Java code exclusively in the JavaDoc commts /**
- * @implNote Tests inspired by {@link org.jabref.model.database.BibDatabaseContextTest#getFileDirectoriesWithRelativeMetadata}
+ * @implNote Tests inspired by {@link ~~(MemberReference type is missing or malformed)~~>org.jabref.model.database.BibDatabaseContextTest#getFileDirectoriesWithRelativeMetadata}
*/ There are also type issues in I made a check on my WSL (together with SDKMan). My results:
I do not know why it worked here with JDK21 in August. |
StaticImports
incorrectly removes used import, but only on JDK17, not JDK21StaticImports
incorrectly removes used import, but only on JDK17 and JDK21, not JDK22 and JDK23
Context: https://github.com/JabRef/jabref/blob/f4e87e5ef45bd87c373b17717343a59af7b4e931/rewrite.yml#L208
When using JDK21, everything is fine.
When using JDK17, imports are removed
This import, however, is necessary.
Since JDK17 is eol in 5 years from now, I wanted to report the issue. If someone stumbles over it.
The text was updated successfully, but these errors were encountered: