Summary: | [compiler] AIOOBE in Statement.analyseArguments if using javax.annotations.Nonnull | ||||||
---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Andrey Loskutov <loskutov> | ||||
Component: | Core | Assignee: | Stephan Herrmann <stephan.herrmann> | ||||
Status: | VERIFIED DUPLICATE | QA Contact: | |||||
Severity: | major | ||||||
Priority: | P3 | CC: | amj87.iitr, srikanth_sankaran, stephan.herrmann | ||||
Version: | 3.8 | ||||||
Target Milestone: | 3.8 M5 | ||||||
Hardware: | PC | ||||||
OS: | All | ||||||
Whiteboard: | |||||||
Attachments: |
|
Thanks for reporting. I think you might be bitten by bug 365983, which was detected during M4 testing, but the fix didn't make it in time for the milestone, sorry! To verify that this is the same issue: can you confirm that there's a varargs method involved in your project that triggers the bug? Either that method has an explicit null annotation or it is subject to a default, right? BTW: (In reply to comment #0) > I was trying to apply new NPE annotation checks in JDT to the FindBugs project, > which has already javax.annotation.Nonnull annotation (see attached core > prefs). > > After configuring JDT to use javax.annotation.Nullable and > javax.annotation.Nonnull (both are on the project classpath) the automatically > started project build thrown the exception below. When mapping to FindBugs annotations, wouldn't you want to map nullable to javax.annotation.CheckForNull? Hi Stephan, I think I have to report another one bug - only first build with enabled annotations on a given project seems to report "nullness contract violation". All other consequent builds seems NOT to report anything, and so I'm currently unable to reproduce the error. I've found the originally reported error during analysis of findbugs project from SVN trunk. But once I've restarted Eclipse, all consequent attempts to reproduce it failed. I will report another one bug related to "lazy/sloppy" compilation. (In reply to comment #1) > Thanks for reporting. I think you might be bitten by bug 365983, which > was detected during M4 testing, but the fix didn't make it in time > for the milestone, sorry! Ayush, can you review the patch for bug 365983 for inclusion in this week's integration build - Thanks. (In reply to comment #2) > I've found the originally reported error during analysis of findbugs project > from SVN trunk. But once I've restarted Eclipse, all consequent attempts to > reproduce it failed. I will report another one bug related to "lazy/sloppy" > compilation. I think this is bug 365983 which is a duplicate of bug 365992. If a patch becomes available in time, we can include this also for I build this week. Please take Ayush's help for review. (In reply to comment #3) > I think this is bug 365983 which is a duplicate of bug 365992. If a patch I meant to say bug 366341 which is a duplicate of 365992, sorry for the confusion. Hi Andrey, > To verify that this is the same issue: can you confirm that there's > a varargs method involved in your project that triggers the bug? Can you please confirm this? We can then mark this bug as a dup of bug 365983 (In reply to comment #5) > Hi Andrey, > Can you please confirm this? We can then mark this bug as a dup of bug 365983 Andrey, bug 365983 has been fixed. Can you please confirm if this is the same issue? And if possible, try out the latest build to verify? Thanks! (In reply to comment #6) > Andrey, bug 365983 has been fixed. Can you please confirm if this is the same > issue? And if possible, try out the latest build to verify? Thanks! Thanks for fixing Ayushman. I would try, but during Christmas time is hard to predict if and when one would have free time :-) I think it is the same bug, in the remote chance it is not and is still open, please reopen. Thanks. *** This bug has been marked as a duplicate of bug 365983 *** Verified for 3.8 M5 using build id: I20120122-2000 |
Created attachment 208225 [details] FindBugs JDT core project settings I was trying to apply new NPE annotation checks in JDT to the FindBugs project, which has already javax.annotation.Nonnull annotation (see attached core prefs). After configuring JDT to use javax.annotation.Nullable and javax.annotation.Nonnull (both are on the project classpath) the automatically started project build thrown the exception below. java.lang.ArrayIndexOutOfBoundsException: 1 at org.eclipse.jdt.internal.compiler.ast.Statement.analyseArguments(Statement.java:68) at org.eclipse.jdt.internal.compiler.ast.MessageSend.analyseCode(MessageSend.java:103) at org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.analyseCode(MethodDeclaration.java:108) at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.internalAnalyseCode(TypeDeclaration.java:703) at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.analyseCode(TypeDeclaration.java:255) at org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.analyseCode(CompilationUnitDeclaration.java:111) at org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java:776) at org.eclipse.jdt.internal.compiler.ProcessTaskManager.run(ProcessTaskManager.java:137) at java.lang.Thread.run(Thread.java:722)