Bug 112003 - NPE from browsing JDT.UI 3.1 code (opening JavaEditor.java)
Summary: NPE from browsing JDT.UI 3.1 code (opening JavaEditor.java)
Status: RESOLVED DUPLICATE of bug 101080
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Linux
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-07 17:35 EDT by Morten Moeller CLA
Modified: 2005-10-10 07:16 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Morten Moeller CLA 2005-10-07 17:35:41 EDT
I just created a plug-in project in a clean workspace and added jdt.ui to its
dependencies. Then I started browsing around jdt code and I get this error
constantly when I'm looking at JavaEdior.java. I couldn't find any other bug
regarding this particular NPE..

java.lang.NullPointerException
	at
org.eclipse.jdt.internal.compiler.CompilationResult.computePriority(CompilationResult.java:118)
	at
org.eclipse.jdt.internal.compiler.CompilationResult.quickPrioritize(CompilationResult.java:370)
	at
org.eclipse.jdt.internal.compiler.CompilationResult.getProblems(CompilationResult.java:275)
	at org.eclipse.jdt.core.dom.ASTConverter.convert(ASTConverter.java:1175)
	at
org.eclipse.jdt.core.dom.CompilationUnitResolver.convert(CompilationUnitResolver.java:251)
	at org.eclipse.jdt.core.dom.ASTParser.internalCreateAST(ASTParser.java:800)
	at org.eclipse.jdt.core.dom.ASTParser.createAST(ASTParser.java:588)
	at org.eclipse.jdt.internal.ui.javaeditor.ASTProvider$1.run(ASTProvider.java:566)
	at
org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:1044)
	at org.eclipse.core.runtime.Platform.run(Platform.java:783)
	at
org.eclipse.jdt.internal.ui.javaeditor.ASTProvider.createAST(ASTProvider.java:563)
	at org.eclipse.jdt.internal.ui.javaeditor.ASTProvider.getAST(ASTProvider.java:493)
	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:76)


--------------------------------------------
eclipse.buildId=I20050627-1435
java.version=1.4.2_03
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_US
Command-line arguments:  -data /home/mmoeller/workspaces/Morten -os linux -ws
gtk -arch x86
--------------------------------------------
Comment 1 Philipe Mulet CLA 2005-10-10 04:07:46 EDT
Maxime - this looks like a dup. Pls find out.
Comment 2 Maxime Daniel CLA 2005-10-10 05:00:56 EDT
Reproduced. The key is to *not* import the org.eclipse.jdt.ui plugin, but still
open the type (through Ctrl-T, for example).
This is a duplicate of bug 101080, for which it provides a fine and clean test
case (which we did not have so far - thx a lot).
So test case is:
- launch Eclipse with a clean workspace;
- create new Plugin project (as simple as possible);
- open its dependencies; add org.eclipse.jdt.ui;
- search for type JavaEditor and open it.
Then you get the said NPE with the said build.

Bug 101080 is fixed for 3.1.1 and 3.2M2 for sure, and the test case above is
successful with both of these builds.
Comment 3 Philipe Mulet CLA 2005-10-10 07:16:48 EDT
Excellent, closing as dup.

*** This bug has been marked as a duplicate of 101080 ***