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 82071

Summary: NPE in JavaModelUtil.unwrapElement
Product: java Reporter: Jan Pokorsky <jpokorsky>
Component: UnsupportedAssignee: issues@java <issues>
Status: CLOSED FIXED    
Severity: blocker    
Priority: P2    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: NPE

Description Jan Pokorsky 2006-08-07 14:38:00 UTC
[NetBeans 6.0 M1]
I get the following NPE whenever I want to move an inner enum to outer level via
the refactoring ui. Here is a test case:

public class A {
    
    public A() {
    }

    enum E {
        E1, E2, E3;
        public static E resolve(String s) {
            return E1;
        }
    }
}
Comment 1 Jan Pokorsky 2006-08-07 14:39:13 UTC
Created attachment 32605 [details]
NPE
Comment 2 Miloslav Metelka 2006-09-19 17:13:06 UTC
IMHO the 'el' parameter in unwrapeElement() is null and the el.getClass() in the
last throw stmt throws the NPE.
Comment 3 Jan Becicka 2006-10-26 16:28:09 UTC
Javacore module was replaced by Retouche infrastructure. This bug is not valid
in trunk any more.
Comment 4 Quality Engineering 2007-09-20 12:50:13 UTC
Reorganization of java component
Comment 5 Jiri Prox 2007-11-06 14:56:26 UTC
v/c