Bug 60687 - NPE in JavaCore.getEncoding
Summary: NPE in JavaCore.getEncoding
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.0 M9   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-05-01 13:46 EDT by Wassim Melhem CLA
Modified: 2004-05-18 12:30 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 Wassim Melhem CLA 2004-05-01 13:46:40 EDT
Build: I-20040428

Found this in my log.  Not sure when it was thrown.

Error Apr 30, 2004 13:42:09.455 An internal error occurred during: "Java AST 
creation".
java.lang.NullPointerException
at org.eclipse.jdt.core.JavaCore.getEncoding(JavaCore.java:2148)
at org.eclipse.jdt.core.JavaCore.getOptions(JavaCore.java:2231)
at org.eclipse.jdt.core.dom.ASTParser.initializeDefaults(ASTParser.java:225)
at org.eclipse.jdt.core.dom.ASTParser.createAST(ASTParser.java:576)
at org.eclipse.jdt.internal.ui.javaeditor.ASTProvider.createAST
(ASTProvider.java:437)
at org.eclipse.jdt.internal.ui.javaeditor.ASTProvider.getAST
(ASTProvider.java:389)
at org.eclipse.jdt.internal.ui.javaeditor.ASTProvider.getAST
(ASTProvider.java:383)
at 
org.eclipse.jdt.internal.ui.viewsupport.SelectionListenerWithASTManager$PartLis
tenerGroup.calculateASTandInform(SelectionListenerWithASTManager.java:123)
at 
org.eclipse.jdt.internal.ui.viewsupport.SelectionListenerWithASTManager$1.run
(SelectionListenerWithASTManager.java:101)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:66)
Comment 1 Frederic Fusier CLA 2004-05-04 09:59:02 EDT
Fixed.

This exception should not occur except perhaps when workspace is shutting down.
As at this moment, the encoding does not really matter, catch all exception
silently and return JavaCore.getEncoding()...

No test case added.
Comment 2 Olivier Thomann CLA 2004-05-18 12:30:00 EDT
Verified in 200405180816