Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 473684 - NullPointerException in MethodBinding.getParameterAnnotations (699)
Summary: NullPointerException in MethodBinding.getParameterAnnotations (699)
Status: VERIFIED DUPLICATE of bug 471611
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.5   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 4.6 M1   Edit
Assignee: Stephan Herrmann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-07-27 14:30 EDT by EPP Error Reports CLA
Modified: 2015-08-04 04:18 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description EPP Error Reports CLA 2015-07-27 14:30:51 EDT
The following incident was reported via the automated error reporting:

The user(s) left the following comments:
--- Marcel Bruch wrote: ---
I was hovering over an imported static method in the statement given below (in AdminController for later reference):
scheduler.scheduleAtFixedRate(creat<hover here> e(SynchronizeBugsCommand.class, beanFactory).get(), in(30, MINUTES),

The signature of create is:
public static <T extends ICommand> Optional<T> create(Class<T> clazz, AutowireCapableBeanFactory factory) ;


    


    code:                   0
    plugin:                 org.eclipse.jface.text_3.10.0.v20150428-1301
    message:                HIDDEN
    fingerprint:            b9a3d8fe
    exception class:        java.lang.NullPointerException
    exception message:      HIDDEN
    number of children:     0
    
    java.lang.NullPointerException: HIDDEN
    at org.eclipse.jdt.internal.compiler.lookup.MethodBinding.getParameterAnnotations(MethodBinding.java:699)
    at org.eclipse.jdt.core.dom.MethodBinding.getParameterAnnotations(MethodBinding.java:132)
    at org.eclipse.jdt.internal.ui.viewsupport.BindingLinkedLabelComposer.appendMethodBindingLabel(BindingLinkedLabelComposer.java:221)
    at org.eclipse.jdt.internal.ui.viewsupport.BindingLinkedLabelComposer.appendBindingLabel(BindingLinkedLabelComposer.java:91)
    at org.eclipse.jdt.internal.ui.viewsupport.JavaElementLinks.getBindingLabel(JavaElementLinks.java:729)
    at org.eclipse.jdt.internal.ui.text.java.hover.JavadocHover.getInfoText(JavadocHover.java:772)
    at org.eclipse.jdt.internal.ui.text.java.hover.JavadocHover.getHoverInfo(JavadocHover.java:716)
    at org.eclipse.jdt.internal.ui.text.java.hover.JavadocHover.internalGetHoverInfo(JavadocHover.java:639)
    at org.eclipse.jdt.internal.ui.text.java.hover.JavadocHover.getHoverInfo2(JavadocHover.java:631)
    at org.eclipse.jdt.internal.ui.text.java.hover.BestMatchHover.getHoverInfo2(BestMatchHover.java:163)
    at org.eclipse.jdt.internal.ui.text.java.hover.BestMatchHover.getHoverInfo2(BestMatchHover.java:129)
    at org.eclipse.jdt.internal.ui.text.java.hover.JavaEditorTextHoverProxy.getHoverInfo2(JavaEditorTextHoverProxy.java:85)
    at org.eclipse.jface.text.TextViewerHoverManager$4.run(TextViewerHoverManager.java:166)
   
  

General Information:

    reported-by:      
    anonymous-id:     629a5a2d-f03f-4c0b-a29e-bc2ae9acea5b
    eclipse-build-id: 4.5.0.I20150514-1000
    eclipse-product:  org.eclipse.epp.package.jee.product
    operating system: Windows7 6.1.0 (x86_64) - win32
    jre-version:      1.8.0_40-b25

The following plug-ins were present on the execution stack (*):
    1. org.eclipse.jdt_3.11.0.v20150514-1000
    2. org.eclipse.jdt.core_3.11.0.v20150513-2030
    3. org.eclipse.jdt.ui_3.11.0.v20150513-1857
    4. org.eclipse.jface.text_3.10.0.v20150428-1301
    5. org.eclipse.jface_3.11.0.v20150511-1340

Please note that:
* Messages, stacktraces, and nested status objects may be shortened.
* Bug fields like status, resolution, and whiteboard are sent
  back to reporters.
* The list of present bundles and their respective versions was
  calculated by package naming heuristics. This may or may not reflect reality.

Other Resources:
* Report: https://dev.eclipse.org/recommenders/committers/confess/#/problems/556747a4e4b08edae61758a4  
* Manual: https://dev.eclipse.org/recommenders/community/confess/#/guide


Thank you for your assistance.
Your friendly error-reports-inbox.

This bug was created on behalf of marcel.bruch@codetrails.com.
Comment 1 Stephan Herrmann CLA 2015-07-27 15:46:39 EDT
(In reply to EPP Error Reports from comment #0)
> --- Marcel Bruch wrote: ---
> I was hovering over an imported static method in the statement given below
> (in AdminController for later reference):
> scheduler.scheduleAtFixedRate(creat<hover here>
> e(SynchronizeBugsCommand.class, beanFactory).get(), in(30, MINUTES),
> 
> The signature of create is:
> public static <T extends ICommand> Optional<T> create(Class<T> clazz,
> AutowireCapableBeanFactory factory) ;

And that project is configured for using external null annotations?

Looks verrryy much like bug 471611

Any chance you try it with a recent build (> 2015-07-12)?

*** This bug has been marked as a duplicate of bug 471611 ***
Comment 2 Marcel Bruch CLA 2015-07-27 16:43:43 EDT
(In reply to Stephan Herrmann from comment #1)
> And that project is configured for using external null annotations?

No. It has annotation based null analysis enabled but it's not used in there.

> Looks verrryy much like bug 471611
> 
> Any chance you try it with a recent build (> 2015-07-12)?

I updated Java Development Tools 3.11.0.v20150722-1000 from the maintenance update site. I get the same error as before but I'm surprised that the JDT core and JDT ui bundles are the same as before. Is this expected? Should I use a different update site?


------
STATUS
------
pluginId            org.eclipse.jface.text
pluginVersion       3.10.0.v20150428-1301
code                0
severity            4
message             Unexpected runtime error while computing a text hover
fingerprint         b9a3d8fe

Exception:java.lang.NullPointerException: null
	 at org.eclipse.jdt.internal.compiler.lookup.MethodBinding.getParameterAnnotations(MethodBinding.java:699)
	 at org.eclipse.jdt.core.dom.MethodBinding.getParameterAnnotations(MethodBinding.java:132)
	 at org.eclipse.jdt.internal.ui.viewsupport.BindingLinkedLabelComposer.appendMethodBindingLabel(BindingLinkedLabelComposer.java:221)
	 at org.eclipse.jdt.internal.ui.viewsupport.BindingLinkedLabelComposer.appendBindingLabel(BindingLinkedLabelComposer.java:91)
	 at org.eclipse.jdt.internal.ui.viewsupport.JavaElementLinks.getBindingLabel(JavaElementLinks.java:729)
	 at org.eclipse.jdt.internal.ui.text.java.hover.JavadocHover.getInfoText(JavadocHover.java:772)
	 at org.eclipse.jdt.internal.ui.text.java.hover.JavadocHover.getHoverInfo(JavadocHover.java:716)
	 at org.eclipse.jdt.internal.ui.text.java.hover.JavadocHover.internalGetHoverInfo(JavadocHover.java:639)
	 at org.eclipse.jdt.internal.ui.text.java.hover.JavadocHover.getHoverInfo2(JavadocHover.java:631)
	 at org.eclipse.jdt.internal.ui.text.java.hover.BestMatchHover.getHoverInfo2(BestMatchHover.java:163)
	 at org.eclipse.jdt.internal.ui.text.java.hover.BestMatchHover.getHoverInfo2(BestMatchHover.java:129)
	 at org.eclipse.jdt.internal.ui.text.java.hover.JavaEditorTextHoverProxy.getHoverInfo2(JavaEditorTextHoverProxy.java:85)
	 at org.eclipse.jface.text.TextViewerHoverManager$4.run(TextViewerHoverManager.java:166)

------
REPORT
------
anonymousId         f8087d7b-9d38-4c73-aeb1-6991603c2a84
name                Marcel Bruch
email               marcel.bruch@codetrails.com
comment             
eclipseBuildId      4.5.0.I20150514-1000
eclipseProduct      org.eclipse.epp.package.committers.product
javaRuntimeVersion  1.8.0_40-b25
osgiWs              cocoa
osgiOs              MacOSX
osgiOsVersion       10.10.4
osgiArch            x86_64
logMessage          false
ignoreSimilar       false

-------
BUNDLES
-------
name                org.eclipse.jdt
version             3.11.0.v20150722-1000

name                org.eclipse.jdt.core
version             3.11.0.v20150602-1242

name                org.eclipse.jdt.ui
version             3.11.0.v20150527-0925

name                org.eclipse.jface.text
version             3.10.0.v20150428-1301

name                org.eclipse.jface
version             3.11.0.v20150511-1340
Comment 3 Stephan Herrmann CLA 2015-07-27 17:40:15 EDT
(In reply to Marcel Bruch from comment #2)
> (In reply to Stephan Herrmann from comment #1)
> > And that project is configured for using external null annotations?
> 
> No. It has annotation based null analysis enabled but it's not used in there.

Sorry, external annotations were a motivation for that feature, but enabling annotation based null analysis suffices to enter this code path.
 
> > Looks verrryy much like bug 471611
> > 
> > Any chance you try it with a recent build (> 2015-07-12)?
> 
> I updated Java Development Tools 3.11.0.v20150722-1000 from the maintenance
> update site. I get the same error as before but I'm surprised that the JDT
> core and JDT ui bundles are the same as before. Is this expected? Should I
> use a different update site?

We haven't yet started back porting any fixes into the maintenance stream.
So you'd need to use some 4.6 build, perhaps from
  http://download.eclipse.org/eclipse/updates/4.6-I-builds
Comment 4 Stephan Herrmann CLA 2015-07-27 18:00:59 EDT
(In reply to Stephan Herrmann from comment #3)
> So you'd need to use some 4.6 build, perhaps from
>   http://download.eclipse.org/eclipse/updates/4.6-I-builds

See also https://wiki.eclipse.org/Eclipse_Project_Update_Sites
Comment 5 Marcel Bruch CLA 2015-07-28 00:50:55 EDT
Sorry. EPP packages are not compatible with the I build. I tried several different update paths this morning but it did not work. I'm on the run now.
Comment 6 Manoj N Palat CLA 2015-08-04 04:18:35 EDT
Verified for Eclipse Neon 4.6 M1 Build id: I20150803-2000
(by comparing the stack traces)