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.

View | Details | Raw Unified | Return to bug 142405
Collapse All | Expand All

(-)a/java.hints/src/org/netbeans/modules/java/hints/errors/Utilities.java (-3 / +8 lines)
Lines 100-108 Link Here
100
        
100
        
101
        if (name == null) {
101
        if (name == null) {
102
            if(et instanceof LiteralTree) {
102
            if(et instanceof LiteralTree) {
103
                String guess = (String) ((LiteralTree) et).getValue();
103
                LiteralTree lt=((LiteralTree) et);
104
                if (guess != null)
104
                //142405 check is LiteralTree.getValue() String before cast
105
                    return guessLiteralName(guess);
105
                if(lt.getValue()instanceof String){
106
                    String guess = (String) lt.getValue();
107
                    if (guess != null)
108
                        return guessLiteralName(guess);
109
                }else
110
                    return DEFAULT_NAME;
106
            } else
111
            } else
107
                return DEFAULT_NAME;
112
                return DEFAULT_NAME;
108
        }
113
        }
109
114

Return to bug 142405