Eclipse unable to reference class ending with "$" in its name? [message #1865550] |
Mon, 06 May 2024 11:52  |
Eclipse User |
|
|
|
I am working on a Spring Boot/Maven app that make use of generated metamodel class under target/generated-sources/annotations/. For testing this problem I created these classes manually.
When I have a class ending with "$", for example "VodMetadata$" that is under target/generated-sources/annotations/<pkg path>/ or another source folder I created, eclipse is unable to resolve it. However if I have other classes such as "VodMetada", "VodMetadata1", "VodMetadata_" under same package eclipse has no problem resolving them.
If "VodMetadata$" is placed under "src/main/java" it is resolved. If it has a unique package name it also have no problem. This problem only seem to occur when it is under a separate source folder but has the same package/path as a package in "src/main/java". I can't change the package because the class will be generated by a library.
The app can be compiled and run without any problem. IntelliJ does not have this problem.
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.26150 seconds