Community
Participate
Working Groups
Build Identifier: M20110909-1335 I've just got an NPE with the attached stack trace, while editing a simple Java class in 1.6 mode. I have updated to 3.7.1 few hours ago. My config is the following: - Eclipse IDE: 3.7.1 running with Java 7 x64 on Windows 7 SP1 x64 - Java Project: configured with jdk6u27 x64 The NPE is here: java.lang.NullPointerException at org.eclipse.jdt.internal.compiler.ast.ConstructorDeclaration.isRecursive(ConstructorDeclaration.java:429) Reproducible: Didn't try
Created attachment 203929 [details] Errors log file
I can see how this is possible. Now, I could not find a test case to reproduce this issue. The targetConstructor can be set to null on line 417. And we never check for null. I propose to insert: if (targetConstructor == null) return false; This must be a case where there is already an error in the code. I'll attach a patch shortly.
Created attachment 203931 [details] Proposed fix A regression test must be found for this problem.
Vincent, if you have a chance to describe in what circumstances this is failing, it would be helpful to write a regression test.
(In reply to comment #0) > Build Identifier: M20110909-1335 > > I've just got an NPE with the attached stack trace, while editing a simple Java Vincent, if its a simple Java class, can you please attach it (or a class that mimics it?) Thanks!
In the log file, you can see the source of the class generating this issue (OsmImporter). The compiler errors are the following: - this statement declares a static final object with an unhlandled exception from its constructor: public static final MimeType OSM_XML_MIME_TYPE = new MimeType("application/x-osm+xml"); - this statement is an incomplete constructor (the one I was writing when the exception happened): public OsmImporter(ExtensionFileFilter filter) { this(filter, ); } And, that's all. Once this error occurs, it looks like there's a whole bunch of recursal exceptions on each operator action inside this file (mouse over a underlined error, click on the error marker, etc.)
I could not still reproduce the problem with the scenario described in comment 6, however the patch from comment# 3 looks good and has been released into master for 3.8 M3. Commit id: fcd23c7f31f72a5138ea1cad062c9d8a4a84f1dc.
Verified for 3.8M3 via code inspection.