Community
Participate
Working Groups
I have this error : Errors occurred during the build. Errors running builder 'Java Builder' on project 'test-gradle'. java.lang.ArrayIndexOutOfBoundsException at org.eclipse.jdt.internal.compiler.ast.QualifiedTypeReference.getTypeBinding(QualifiedTypeReference.java:133) In my minimal example, I just have one record in src/main/java : public record MyRecord(String s1, String s2) { } My build.gradle at the root my project is : plugins { id 'java' } repositories { mavenCentral() } dependencies { //implementation 'org.netbeans.modules:org-netbeans-bootstrap:RELEASE90' // => OK implementation 'org.netbeans.modules:org-netbeans-bootstrap:RELEASE100' // => ArrayIndexOutOfBoundsException } I remote debugged my own Eclipse to find out the ArrayIndexOutOfBoundsException occurs on records. When I change a record to a final class, it fails on the next record and so on. The issue occurs with versions RELEASE100 to RELEASE126 of the dependency but not with RELEASE90. I also tried all its dependencies successfully but I don't think anything's wrong with the jar itself. It works fine with a normal command line gradle build. The issue only occurs in Eclipse. Version: 2021-12 (4.22.0) Build id: 20211202-1639 Gradle: 7.3.3 JDK: 17.0.1
The java/lang/Module class inside the jar causes the crash!
Moving to JDT Core.
Small mistake from me : The java/lang/Module class was introduced in RELEASE110, not RELEASE100. I understand it's illegal to do repackage class from java/lang package but still unhappy to see my favorite tool crash.
Please ignore last comment. As I look at the code at the line of the crash (QualifiedTypeReference.java:133), I see that the compiler is precisely trying to report that exact same problem of package conflict. I changed the tile accordingly. The Netbeans part of the bug is here https://github.com/apache/netbeans/issues/4243.