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 222854 - NullPointerException at org.netbeans.modules.groovy.refactoring.findusages.FindUsagesPlugin.isMethodUsage
Summary: NullPointerException at org.netbeans.modules.groovy.refactoring.findusages.Fi...
Status: RESOLVED FIXED
Alias: None
Product: groovy
Classification: Unclassified
Component: Code (show other bugs)
Version: 7.3
Hardware: All All
: P2 normal (vote)
Assignee: Martin Janicek
URL:
Keywords:
: 223613 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-11-27 18:21 UTC by ender01
Modified: 2012-12-11 12:58 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 195762


Attachments
stacktrace (948 bytes, text/plain)
2012-11-27 18:21 UTC, ender01
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ender01 2012-11-27 18:21:10 UTC
This bug was originally marked as duplicate of bug 221580, that is already resolved. This bug is still valid, so this seems to be another bug, but it might be related.

Build: NetBeans IDE Dev (Build 201211270002)
VM: Java HotSpot(TM) 64-Bit Server VM, 20.12-b01-434, Java(TM) SE Runtime Environment, 1.6.0_37-b06-434-11M3909
OS: Mac OS X

User Comments:
GUEST: Renaming a webservice.

GUEST: Renaming a web service class.

aquaglia: Renaming Java class referencing Groovy Client

ender01: Renaming a junit test class.

aquaglia: Renaming Java class referencing Groovy class

skaplon: Renaming a fresh-created service bean interface

GUEST: refactoring a classname




Stacktrace: 
java.lang.NullPointerException
   at org.netbeans.modules.groovy.refactoring.findusages.FindUsagesPlugin.isMethodUsage(FindUsagesPlugin.java:134)
   at org.netbeans.modules.groovy.refactoring.findusages.FindUsagesPlugin.collectUsages(FindUsagesPlugin.java:99)
   at org.netbeans.modules.groovy.refactoring.findusages.FindUsagesPlugin.prepare(FindUsagesPlugin.java:85)
   at org.netbeans.modules.refactoring.api.AbstractRefactoring.pluginsPrepare2(AbstractRefactoring.java:437)
   at org.netbeans.modules.refactoring.api.AbstractRefactoring.pluginsPrepare(AbstractRefactoring.java:421)
   at org.netbeans.modules.refactoring.api.AbstractRefactoring.prepare(AbstractRefactoring.java:232)
Comment 1 ender01 2012-11-27 18:21:16 UTC
Created attachment 128477 [details]
stacktrace
Comment 2 Marian Mirilovic 2012-11-27 21:41:20 UTC
Hmm, doesn't look like already fixed ;(
Comment 3 Martin Janicek 2012-11-28 09:29:47 UTC
Trueee, not sure how it happened but should be fixed in: web-main #7cf1b7547a97
Comment 4 Quality Engineering 2012-11-30 02:45:29 UTC
Integrated into 'main-golden', will be available in build *201211300001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/7cf1b7547a97
User: Martin Janicek <mjanicek@netbeans.org>
Log: #222854 - NullPointerException at org.netbeans.modules.groovy.refactoring.findusages.FindUsagesPlugin.isMethodUsage
Comment 5 Marian Mirilovic 2012-12-11 10:06:09 UTC
*** Bug 223613 has been marked as a duplicate of this bug. ***
Comment 6 Marian Mirilovic 2012-12-11 10:06:50 UTC
Still happening, see issue 223613
Comment 7 Martin Janicek 2012-12-11 12:44:35 UTC
(In reply to comment #6)
> Still happening, see issue 223613

Do not think this is a valid duplicate. In all reports from issue 223613 the NPE is thrown on the line FindUsagesPlugin.isMethodUsage() : 134.

But in the current dev sources that line is in different method and there is no way that NPE could be thrown there (it contains only "return false;" statement).

Although the latest report is from the 10.12.2012 the groovy modules for that build were not build with the latest sources (probably someone run build only on a specific cluster and his/her groovy modules stays from an old 20121128 build).

Part of the message.log as a proof:

org.netbeans.modules.groovy.support [1.25 nbms-and-javadoc-9718-on-20121128]
org.netbeans.modules.maven.groovy [1.4 nbms-and-javadoc-9718-on-20121128]
org.netbeans.modules.groovy.samples [1.16 nbms-and-javadoc-9718-on-20121128]
org.netbeans.modules.groovy.editor/2 [1.31 nbms-and-javadoc-9718-on-20121128]
org.netbeans.modules.groovy.refactoring [1.24 nbms-and-javadoc-9718-on-20121128]
org.netbeans.modules.groovy.gsp [1.25 nbms-and-javadoc-9718-on-20121128]
org.netbeans.modules.groovy.grails [1.32 nbms-and-javadoc-9718-on-20121128]
org.netbeans.modules.groovy.grailsproject [1.34 nbms-and-javadoc-9718-on-20121128]
org.netbeans.modules.groovy.antproject [1.1 nbms-and-javadoc-9718-on-20121128]
org.netbeans.modules.groovy.kit [1.25 nbms-and-javadoc-9718-on-20121128]

I still think that this particular issue is fixed --> Closing again
Comment 8 Marian Mirilovic 2012-12-11 12:48:07 UTC
Ok, thanks a lot for explanation Martin.
Comment 9 Martin Janicek 2012-12-11 12:58:07 UTC
(In reply to comment #8)
> Ok, thanks a lot for explanation Martin.

Sure, hope I'm right :)
Maybe our exception reporter could be improved to check not only the "build number" but also if the correct module (probably the last one in the stacktrace --> groovy.refactoring in this case) was build with the newer sources (at least when marking an issue as a duplicate of something that is already resolved)