Bug 226027

Summary: NullPointerException at org.netbeans.modules.groovy.editor.api.ElementUtils.normalizeTypeName
Product: groovy Reporter: Martin Janicek <mjanicek>
Component: RefactoringAssignee: Martin Janicek <mjanicek>
Status: RESOLVED FIXED QA Contact: issues <issues.netbeans.org>
Priority: P3 CC:
Version: 7.3   
Target Milestone: 8.0   
Hardware: All   
OS: All   
Whiteboard: EXCEPTIONS_REPORT
Issue Type: DEFECT Exception Report: 198536
Attachments: stacktrace

Description Martin Janicek 2013-02-12 15:44:26 UTC
This issue was reported manually by mjanicek.
It already has 1 duplicates 


Build: NetBeans IDE Dev (Build 20130207-f82543088efe)
VM: Java HotSpot(TM) 64-Bit Server VM, 20.2-b06, Java(TM) SE Runtime Environment, 1.6.0_27-b07
OS: Linux

User Comments:
mjanicek: Finding usages of Tester class (invoked from Tester.something() method call)




Stacktrace: 
java.lang.NullPointerException
   at org.netbeans.modules.groovy.editor.api.ElementUtils.normalizeTypeName(ElementUtils.java:297)
   at org.netbeans.modules.groovy.refactoring.findusages.impl.FindTypeUsagesVisitor.<init>(FindTypeUsagesVisitor.java:73)
   at org.netbeans.modules.groovy.refactoring.findusages.impl.FindTypeUsages.getVisitors(FindTypeUsages.java:61)
   at org.netbeans.modules.groovy.refactoring.findusages.impl.AbstractFindUsages$AddFindUsagesElementsTask.run(AbstractFindUsages.java:132)
   at org.netbeans.modules.parsing.impl.TaskProcessor.callUserTask(TaskProcessor.java:584)
   at org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:153)
Comment 1 Martin Janicek 2013-02-12 15:44:27 UTC
Created attachment 131301 [details]
stacktrace
Comment 2 Martin Janicek 2013-02-12 15:47:57 UTC
Might be related to the issue 226016.

Steps to reproduce:

1) Create Maven application
2) Create Groovy script in default package

def name='martin'
println "Hello $name!"
Tes^ter.something()

3) Create Groovy class in package "whatever"

package whatever

class Tester {

    public static void something() {
        Tester.something()
    }
}

..trying to run Find usages from the script (on the ^ position) the NPE occurs. If we add missing import for whatever.Tester, the exception does not occurs..
Comment 3 Martin Janicek 2013-02-18 14:49:45 UTC
Fixed in: web-main #92d11194b55c
Comment 4 Quality Engineering 2013-02-19 01:51:30 UTC
Integrated into 'main-golden', will be available in build *201302182300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/92d11194b55c
User: Martin Janicek <mjanicek@netbeans.org>
Log: #226027 - NullPointerException at org.netbeans.modules.groovy.editor.api.ElementUtils.normalizeTypeName
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo