-
Notifications
You must be signed in to change notification settings - Fork 211
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
Compilation failure when a class and package name match case insensitively #165
Comments
Hey Shardul, thank you for your very precise bug report! I believe I fixed it... please test. The same problem may arise, even worse, when two classes exist in different packages, and their simple names differ only in case. E.g. CU Arno |
Thanks @aunkrig. I tested the change in my application where I encountered the issue originally and it works! |
Bingo! |
Suppose we have a class
com.company.User
and another classcom.company.user.Country
. If we now try to compile a class which referencesCountry
usingClassBodyEvaluator
, the compilation fails with the error mentioned below. I have created shardulm94@acb88d7 which reproduces the issue. Based on my understanding, this may be a bug in the implementation for JLS 6.5.2.2 where Janino tries to disambiguate names, where UnitCompiler.java#L8761 fails instead of probably returningnull
when the class is not present, but a package with the same name (different if you compare case sensitively) is present.The text was updated successfully, but these errors were encountered: