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

Bug 62615

Summary: NPE when hovering over "protected"
Product: [Eclipse Project] JDT Reporter: Thomas M??der <t.s.maeder>
Component: TextAssignee: JDT-Text-Inbox <jdt-text-inbox>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P3    
Version: 3.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Thomas M??der CLA 2004-05-18 06:09:46 EDT
I2004-04-17 + smoke test plugin export from 2004-04-18-11:15

1) Setup like for a smoke test (i.e. import JUnit).
2) Open a file with protected methods (I use TestCase.java as an example)
3) hover over the method name of 

protected void runTest() throws Throwable {

4) observe: you get a hover
5) make sure there is no selection in the editor, place the caret in the method
name of the above method
6) now hover over the "protected" keyword of the above method.
7) observe: you get a NullPointerException:


java.lang.NullPointerException
        at java.lang.Throwable.<init>(Throwable.java)
        at org.eclipse.core.internal.preferences.EclipsePreferences.internalGet(
EclipsePreferences.java)
        at org.eclipse.core.internal.preferences.EclipsePreferences.get(EclipseP
references.java)
        at org.eclipse.core.internal.preferences.PreferenceForwarder.contains(Pr
eferenceForwarder.java)
        at org.eclipse.ui.plugin.AbstractUIPlugin$CompatibilityPreferenceStore.c
ontains(AbstractUIPlugin.java)
        at org.eclipse.ui.texteditor.ChainedPreferenceStore.getVisibleStore(Chai
nedPreferenceStore.java)
        at org.eclipse.ui.texteditor.ChainedPreferenceStore.getBoolean(ChainedPr
eferenceStore.java)
        at org.eclipse.jdt.internal.ui.text.java.hover.AbstractAnnotationHover.g
etHoverInfo(AbstractAnnotationHover.java)
        at org.eclipse.jdt.internal.ui.text.java.hover.BestMatchHover.getHoverIn
fo(BestMatchHover.java)
        at org.eclipse.jdt.internal.ui.text.java.hover.JavaEditorTextHoverProxy.
getHoverInfo(JavaEditorTextHoverProxy.java:69)
        at org.eclipse.jface.text.TextViewerHoverManager$4.run(TextViewerHoverMa
nager.java:161)
Comment 1 Kai-Uwe Maetzel CLA 2004-05-18 06:22:33 EDT

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