Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 475136

Summary: Internal Compiler error, java.lang.NullPointerException in JDT ReferenceBinding.isViewedAsDeprecated
Product: [Eclipse Project] JDT Reporter: stuart barlow <sbarlster>
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: major    
Priority: P3 CC: jarthana, stephan.herrmann
Version: 4.5   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard: stalebug

Description stuart barlow CLA 2015-08-17 07:07:15 EDT
We have just started to explore moving up to Java 8. The first part of our build is to run a -config:only build.

The JDT compiler fails with error...

[javac] ----------
[javac] 1. ERROR in C:\dev\TRUNK\Build\javac_classes\com\domain\core\sso\config\impl\SSOConfigurationState.java (at line 0)
[javac] /*
[javac] ^
[javac] Internal compiler error: java.lang.NullPointerException at org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding.isViewedAsDeprecated(ReferenceBinding.java:1589)
[javac] ----------
[javac] 2. WARNING: ContentAnnotationProcessor initialised.
[javac] 3. WARNING: Loading GenerateStateAnnotationProcessor
[javac] 3 problems (1 error, 2 warnings)
Comment 1 stuart barlow CLA 2015-08-17 07:13:25 EDT
At present we are running this same build process with the Kepler release of the JDT tools. No NullPointerException.

I could try moving upto a more recent build than Mars (4.5)?
Comment 2 Stephan Herrmann CLA 2015-08-17 16:31:20 EDT
(In reply to stuart barlow from comment #0)
org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding.isViewedAsDeprecated(ReferenceBinding.java:1589)

This line number doesn't match in Kepler + Java8 patch. More likely you are already using a newer version.

Anyway, a reproducing example would be most helpful. Does the error occur only with annotation processing enabled?
Comment 3 stuart barlow CLA 2015-08-17 17:11:07 EDT
Thanks for reply Stephan. Apologies, maybe some confusion. This defect is not with Kepler release. This error is when using Mars release.

Yes, error only happens with annotation processing only. -config:only

I tried switching to JDK compiler but it doesn't seem to cope very well with a -config:only build.
Comment 4 Stephan Herrmann CLA 2015-08-17 17:16:01 EDT
Any chance to reduce the problem to a demo project that you could share?
Comment 5 stuart barlow CLA 2015-08-17 17:26:37 EDT
Possibly. :-) the current project is very large. I'll try and reduce it down to something small that fails with the same error.
Comment 6 Eclipse Genie CLA 2020-03-16 19:41:04 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.