This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 54984 - NPE in JMManager.getSourceElementIfExists
Summary: NPE in JMManager.getSourceElementIfExists
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 4.x
Hardware: PC Windows ME/2000
: P3 blocker (vote)
Assignee: Tomas Hurka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-15 13:07 UTC by Martin Roskanin
Modified: 2007-09-26 09:14 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Roskanin 2005-02-15 13:07:23 UTC
Try to invoke CC on 
        String[] str;
        str.|

you will get following NPE:

java.lang.NullPointerException
[catch] at
org.netbeans.modules.javacore.JMManager.getSourceElementIfExists(JMManager.java:1283)
        at
org.netbeans.modules.editor.java.JMIUtils.getSourceElementIfExists(JMIUtils.java:731)
        at
org.netbeans.modules.editor.java.JMIUtils$ClassesIterator.next(JMIUtils.java:1231)
        at
org.netbeans.modules.editor.java.JMIUtils.findFeatures(JMIUtils.java:801)
        at
org.netbeans.modules.editor.java.JMIUtils.findFeatures(JMIUtils.java:390)
        at
org.netbeans.modules.editor.java.NbJavaJMICompletionQuery$Context.findFieldsMethodsAndInn
erClasses(NbJavaJMICompletionQuery.java:1003)
        at
org.netbeans.modules.editor.java.NbJavaJMICompletionQuery$Context.resolveExp(NbJavaJMICom
pletionQuery.java:252)
        at
org.netbeans.modules.editor.java.NbJavaJMICompletionQuery.getResult(NbJavaJMICompletionQu
ery.java:56)
        at
org.netbeans.editor.ext.java.JavaCompletionQuery.query(JavaCompletionQuery.java:146)
        at
org.netbeans.editor.ext.java.JavaCompletionQuery.query(JavaCompletionQuery.java:79)
        at
org.netbeans.editor.ext.Completion.performQuery(Completion.java:589)
        at
org.netbeans.editor.ext.Completion.access$700(Completion.java:47)
        at
org.netbeans.editor.ext.Completion$1QueryTask.run(Completion.java:515)
        at org.openide.util.Task.run(Task.java:189)
        at
org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:330)
        at
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:721)
Comment 1 Jan Becicka 2005-02-18 08:06:32 UTC
  User: thurka  
  Date: 05/02/15 05:53:16

  Modified:    javacore/src/org/netbeans/modules/javacore JMManager.java
  Log:
  bugfix #54984, in getSourceElementIfExists() - Array does not have
source Element
 
http://java.netbeans.org/source/browse/java/javacore/src/org/netbeans/modules/javacore/JMManager.java.diff?r1=1.91&r2=1.92
Comment 2 Quality Engineering 2007-09-20 11:59:07 UTC
Reorganization of java component