Summary: | DOMParser.createASTs() NPE at FieldReference.getConstantFor(FieldReference.java:408) | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Stefan Reich <sreich> |
Component: | Core | Assignee: | Jerome Lanneluc <jerome_lanneluc> |
Status: | VERIFIED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | CC: | jgarms, tyeung |
Version: | 3.1.1 | ||
Target Milestone: | 3.1.2 | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: |
Description
Stefan Reich
2005-12-17 23:12:16 EST
Don't set the target milestone. We set the value when the problem is fixed. What version of APT are you using? Moving to JDT/APT for investigation. Jess, The fix is back ported to the jdt.core version that apt is running on. Question: What version of apt is published to the update site? The latest version on the update site (3.1.1_apt02) was released on 10-21-05, so should contain the fix for 111822. Stefan, is that the version you're using? Thanks. Thank you all for your quick response! My plugin seems to trigger this problem differently and don't use APT. I am using Eclipse 3.1.1, and I see this error only on code that contains annotations (the Java 6 source code in my case). Here is a typical stack trace: java.lang.NullPointerException at org.eclipse.jdt.internal.compiler.ast.FieldReference.getConstantFor(FieldReference.java:406) at org.eclipse.jdt.internal.compiler.ast.SingleNameReference.checkFieldAccess(SingleNameReference.java:164) at org.eclipse.jdt.internal.compiler.ast.SingleNameReference.resolveType(SingleNameReference.java:703) at org.eclipse.jdt.internal.compiler.ast.Expression.resolveTypeExpecting(Expression.java:848) at org.eclipse.jdt.internal.compiler.ast.ArrayInitializer.resolveTypeExpecting(ArrayInitializer.java:177) at org.eclipse.jdt.internal.compiler.ast.MemberValuePair.resolveTypeExpecting(MemberValuePair.java:61) at org.eclipse.jdt.internal.compiler.ast.Annotation.resolveType(Annotation.java:246) at org.eclipse.jdt.internal.compiler.ast.ASTNode.resolveAnnotations(ASTNode.java:436) at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.getAnnotationTagBits(SourceTypeBinding.java:701) at org.eclipse.jdt.internal.compiler.ast.Annotation.resolveType(Annotation.java:328) at org.eclipse.jdt.internal.compiler.ast.ASTNode.resolveAnnotations(ASTNode.java:436) at org.eclipse.jdt.internal.compiler.lookup.MethodBinding.getAnnotationTagBits(MethodBinding.java:411) at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.resolveTypesFor(SourceTypeBinding.java:1198) at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.methods(SourceTypeBinding.java:1011) at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.faultInTypesForFieldsAndMethods(SourceTypeBinding.java:617) at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.faultInTypesForFieldsAndMethods(SourceTypeBinding.java:620) at org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.faultInTypes(CompilationUnitScope.java:393) at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:713) at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:455) at org.eclipse.jdt.core.dom.ASTParser.createASTs(ASTParser.java:664) at com.jutils.lint4j.eclipse.actions.NewAuditAction.audit(NewAuditAction.java:170) at com.jutils.lint4j.eclipse.actions.NewAuditAction$1.run(NewAuditAction.java:57) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:76) Ah, I see. You just want the fix that was put in the APT branch also back-ported to the maintenance release of standard (non-APT) Eclipse 3.1.2. Assigning back to jdt-core so they can make that decision. +1 for 3.1.2 In fact, fix for bug 111822 was not perfect and introduced a performance problem reported in bug 114935. So I backported the fix for bug 114935 to the R3_1_maintenance stream instead. Also backported corresponding tests BatchASTCreationTests#test069() and test070(). Verified for 3.1.2 using build M20060111-0800. |