-
-
Notifications
You must be signed in to change notification settings - Fork 354
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
bug: NPE on duplicate package-info.java when ignoring duplicate types #3790
Comments
I think the problem is when there are in fact duplicated package-info.java files in the same project. For example, say a multi-module project has the same package in two modules, and have a package-info.java in both of those. JDT does not appear to tolerate that. So the bug here is probably only that we have an NPE when ignoring duplicates. |
|
Chapter 7.4.1 of the JLS says the following:
This has been unchanged at least since Java 7. So, Still, I'm pretty confident now that the bug is just the NPE on ignoring duplicate declarations. |
Spoon and/or JDT is not handling package-info.java files correctly. If multiple of them are found in a single project, there's a duplicate type crash:
With
Environment.setIgnoreDuplicateDeclarations(true)
, there's an NPE instead.Looking into a fix.
The text was updated successfully, but these errors were encountered: