Community
Participate
Working Groups
Hey, the issue happens in the latest JDT core implementation 'org.eclipse.jdt:org.eclipse.jdt.core:latest.release' implementation 'org.eclipse.jdt:org.eclipse.jdt.ui:latest.release' When I try to compile a class: package p000; public final class Test implements java.lang.Object, p000.DoesNotExist {} I get the following crash: Exception in thread "main" java.lang.NullPointerException at org.eclipse.jdt.internal.compiler.util.Sorting.sortSuper(Sorting.java:75) at org.eclipse.jdt.internal.compiler.util.Sorting.sort(Sorting.java:56) at org.eclipse.jdt.internal.compiler.util.Sorting.sortTypes(Sorting.java:44) at org.eclipse.jdt.internal.compiler.lookup.MethodVerifier.computeInheritedMethods(MethodVerifier.java:627) at org.eclipse.jdt.internal.compiler.lookup.MethodVerifier.computeInheritedMethods(MethodVerifier.java:514) at org.eclipse.jdt.internal.compiler.lookup.MethodVerifier.verify(MethodVerifier.java:1012) at org.eclipse.jdt.internal.compiler.lookup.MethodVerifier15.verify(MethodVerifier15.java:1022) at org.eclipse.jdt.internal.compiler.lookup.MethodVerifier.verify(MethodVerifier.java:1022) at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.verifyMethods(SourceTypeBinding.java:3357) at org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.verifyMethods(CompilationUnitScope.java:937) at org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java:899) at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:1041) at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:661) at org.eclipse.jdt.core.dom.ASTParser.createASTs(ASTParser.java:1001)
Parser options: ASTParser astParser = ASTParser.newParser(AST.JLS15); astParser.setResolveBindings(true); astParser.setStatementsRecovery(true); astParser.setBindingsRecovery(true); astParser.setKind(ASTParser.K_COMPILATION_UNIT); astParser.setEnvironment(new String[0], new String[0], null, false); Map<String, String> options = JavaCore.getDefaultOptions(); options.put(JavaCore.COMPILER_COMPLIANCE, JavaCore.VERSION_14); options.put(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_14); options.put(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, JavaCore.VERSION_14); astParser.setCompilerOptions(options);
I guess "Test implements java.lang.Object" is not intentional, or how is this supposed to be compiled? Beside this, if you would provide a simple (full) test case to reproduce the problem, it would be great.
Andrey, The provided example that causes JDT to crash is full: package p000; public final class Test implements java.lang.Object, p000.DoesNotExist {} (you need to create file p000/Test.java) All you need to do is to launch JDT from sources (like in "Use it to creates ast" from bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=559849), but you need to set "includeRunningVMBootclasspath" to "false" and don't include any JARs
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.