Community
Participate
Working Groups
Build 20050509 In an editor for file X.java, paste following code: public class X { boolean run(X x) { return false; } <T> void run(Class<T> ct) { } public static void main(String[] args) { boolean b = new X().run(new X(){}); } } This will cause an exception in compiler (bug 94928) in build 20050509. However, the consequence is that no action can be performed any longer once this occurs in reconciler, as dialogs keep opening. Either we should: - catch these properly in reconcile operation (like the builder/batch does) and convert into IProblem - improve UI handling to stop looping
Dani - wasn't the editor supposed to be more robust ?
!ENTRY org.eclipse.core.runtime 4 2 2005-05-12 14:46:58.118 !MESSAGE An internal error occurred during: "Requesting Java AST from selection". !STACK 0 java.lang.NullPointerException at org.eclipse.jdt.internal.compiler.lookup.ParameterizedGenericMethodBinding.computeCompatibleMethod(ParameterizedGenericMethodBinding.java:86) at org.eclipse.jdt.internal.compiler.lookup.Scope.computeCompatibleMethod(Scope.java:361) at org.eclipse.jdt.internal.compiler.lookup.Scope.findMethod(Scope.java:1153) at org.eclipse.jdt.internal.compiler.lookup.Scope.getMethod(Scope.java:2156) at org.eclipse.jdt.internal.compiler.ast.MessageSend.resolveType(MessageSend.java:314) at org.eclipse.jdt.internal.compiler.ast.LocalDeclaration.resolve(LocalDeclaration.java:201) at org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.resolveStatements(AbstractMethodDeclaration.java:415) at org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.resolveStatements(MethodDeclaration.java:169) at org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.resolve(AbstractMethodDeclaration.java:393) at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:1063) at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:1112) at org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.resolve(CompilationUnitDeclaration.java:305) at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:826) at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:503) at org.eclipse.jdt.core.dom.ASTParser.internalCreateAST(ASTParser.java:761) at org.eclipse.jdt.core.dom.ASTParser.createAST(ASTParser.java:570) at org.eclipse.jdt.internal.ui.javaeditor.ASTProvider.createAST(ASTProvider.java:556) at org.eclipse.jdt.internal.ui.javaeditor.ASTProvider.getAST(ASTProvider.java:487) at org.eclipse.jdt.internal.ui.viewsupport.SelectionListenerWithASTManager$PartListenerGroup.calculateASTandInform(SelectionListenerWithASTManager.java: 165) at org.eclipse.jdt.internal.ui.viewsupport.SelectionListenerWithASTManager$3.run(SelectionListenerWithASTManager.java:142) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:67)
When this occurs, I cannot get rid of the dialog, and further save or exit. Only solution is ctrl-C.
>Dani - wasn't the editor supposed to be more robust ? No, at no places in JDT UI we catch RuntimeException.
Note that the exception is not surfaced to the user during building because the Build Manager (Platform Core) runs the Java Builder in an ISafeRunnable. So the exception is simply logged.
For RC1 I will do the same for - reconciling - ast creation
Thanks Dani. Since you're going to fix bug 94951, no action is planned on this one. Closing.
Yes, Philippe urged me sooo much (;-) and comment 5 gave the final go for it. And of course I want the editor to look good!
*** Bug 105067 has been marked as a duplicate of this bug. ***