Community
Participate
Working Groups
20020205++ Type "null" into the expressions view details pane. Select and hit Ctrl-Q java.lang.NullPointerException at org.eclipse.jdt.internal.compiler.lookup.Scope.getType (Scope.java:789) at org.eclipse.jdt.internal.eval.CodeSnippetCodeStream.generateObjectWrapperForType (CodeSnippetCodeStream.java:216) at org.eclipse.jdt.internal.eval.CodeSnippetReturnStatement.generateStoreSaveValueI fNecessary(CodeSnippetReturnStatement.java:66) at org.eclipse.jdt.internal.compiler.ast.ReturnStatement.generateCode (ReturnStatement.java:140) at org.eclipse.jdt.internal.compiler.ast.Block.generateCode (Block.java:60) at org.eclipse.jdt.internal.compiler.ast.TryStatement.generateCode (TryStatement.java:196) at org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.generateCode (AbstractMethodDeclaration.java:199) at org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.generateCode (AbstractMethodDeclaration.java:148) at org.eclipse.jdt.internal.eval.CodeSnippetTypeDeclaration.generateCode (CodeSnippetTypeDeclaration.java:52) at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.generateCode (TypeDeclaration.java:633) at org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.generateCode (CompilationUnitDeclaration.java:129) at org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java:530) at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:332) at org.eclipse.jdt.internal.eval.Evaluator.getClasses (Evaluator.java:113) at org.eclipse.jdt.internal.eval.EvaluationContext.evaluate (EvaluationContext.java:213) at org.eclipse.jdt.internal.core.eval.EvaluationContextWrapper.evaluateCodeSnippet (EvaluationContextWrapper.java:169) at org.eclipse.jdt.internal.debug.eval.LocalEvaluationEngine$2.run (LocalEvaluationEngine.java:486) at java.lang.Thread.run(Thread.java:484)
Moving to JCORE
I cannot reproduce. Each time I try to Ctrl + Q, I got a dialog saying "Cannot perform nestes evaluation". Please tell me how to reproduce it. I am using 0314.
Created attachment 490 [details] The dialog I got when I did Ctrl + Q
Created attachment 491 [details] The right dialog
Ok, this is fine. I could reproduce it in a self-hosting workspace. It should be quite simple to fix.
I guess we expect null to be returned. The bug was due to the fact that null is considered as a base type. I am working on a fix.
I would expect null to be returned...the user kindof treats null like a primitive. If I display "1" I get back (int)1. So for "null" I would expect "null".
Fixed and released in HEAD.