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 219761 - NullPointerException at org.netbeans.modules.groovy.editor.api.Methods.hasSameParameters
Summary: NullPointerException at org.netbeans.modules.groovy.editor.api.Methods.hasSam...
Status: VERIFIED FIXED
Alias: None
Product: groovy
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.3
Hardware: All All
: P3 normal (vote)
Assignee: Martin Janicek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-09 14:17 UTC by Vladimir Riha
Modified: 2012-10-12 12:16 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 193294


Attachments
stacktrace (4.04 KB, text/plain)
2012-10-09 14:17 UTC, Vladimir Riha
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Riha 2012-10-09 14:17:54 UTC
Build: NetBeans IDE Dev (Build web-main-8799-on-20121008)
VM: Java HotSpot(TM) Client VM, 23.6-b03, Java(TM) SE Runtime Environment, 1.7.0_10-ea-b08
OS: Linux

User Comments:
vriha: invoked find usages on println in NetBeansPlatform.groovy in NetBeans sample project called NB Project Generators




Stacktrace: 
java.lang.NullPointerException
   at org.netbeans.modules.groovy.editor.api.Methods.hasSameParameters(Methods.java:192)
   at org.netbeans.modules.groovy.refactoring.findusages.impl.FindMethodUsagesVisitor.findAndAdd(FindMethodUsagesVisitor.java:192)
   at org.netbeans.modules.groovy.refactoring.findusages.impl.FindMethodUsagesVisitor.addThisUsages(FindMethodUsagesVisitor.java:170)
   at org.netbeans.modules.groovy.refactoring.findusages.impl.FindMethodUsagesVisitor.visitMethodCallExpression(FindMethodUsagesVisitor.java:146)
   at org.codehaus.groovy.ast.expr.MethodCallExpression.visit(MethodCallExpression.java:67)
   at org.codehaus.groovy.ast.CodeVisitorSupport.visitExpressionStatement(CodeVisitorSupport.java:69)
Comment 1 Vladimir Riha 2012-10-09 14:17:56 UTC
Created attachment 125635 [details]
stacktrace
Comment 2 Martin Janicek 2012-10-10 10:05:48 UTC
I've fixed the NPE in web-main: #56e224e4eed5

..but there is still a problem with type interference (println is a static method used from another class which is imported by default - because of that our current support is not able to find the correct type where the method belongs to).. I'll create another issue to track this as it's different problem than this one
Comment 3 Martin Janicek 2012-10-10 12:24:42 UTC
I've created issue 219817 to track the type interference problem
Comment 4 Quality Engineering 2012-10-11 02:02:17 UTC
Integrated into 'main-golden', will be available in build *201210110002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/56e224e4eed5
User: Martin Janicek <mjanicek@netbeans.org>
Log: #219761 - NullPointerException at org.netbeans.modules.groovy.editor.api.Methods.hasSameParameters
Comment 5 Vladimir Riha 2012-10-12 12:16:33 UTC
No NPE, so carefully verifying :) Thanks

Product Version: NetBeans IDE Dev (Build 201210120002)
Java: 1.7.0_10-ea; Java HotSpot(TM) Client VM 23.6-b03
System: Linux version 3.2.0-31-generic-pae running on i386; UTF-8; en_US (nb)