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 237032 - IllegalStateException: Unexpected type java.lang.Exception of kind UNION in [e.getMessage()]
Summary: IllegalStateException: Unexpected type java.lang.Exception of kind UNION in [...
Status: RESOLVED FIXED
Alias: None
Product: debugger
Classification: Unclassified
Component: Java (show other bugs)
Version: 7.4
Hardware: All All
: P3 normal (vote)
Assignee: Martin Entlicher
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-11 12:28 UTC by Egor Ushakov
Modified: 2013-12-17 18:14 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter: 204518


Attachments
stacktrace (899 bytes, text/plain)
2013-10-11 12:28 UTC, Egor Ushakov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Egor Ushakov 2013-10-11 12:28:28 UTC
Build: NetBeans IDE 7.4 RC2 (Build 201309252201)
VM: Java HotSpot(TM) Client VM, 24.0-b56, Java(TM) SE Runtime Environment, 1.7.0_40-b43
OS: SunOS

User Comments:
gorrus: during debug




Stacktrace: 
java.lang.IllegalStateException: Unexpected type java.lang.Exception of kind UNION in [e.getMessage()]
   at org.netbeans.modules.debugger.jpda.projects.AST2Bytecode.matchSourceTree2Bytecode(AST2Bytecode.java:260)
   at org.netbeans.modules.debugger.jpda.projects.EditorContextImpl.computeOperations(EditorContextImpl.java:2723)
   at org.netbeans.modules.debugger.jpda.projects.EditorContextImpl.getOperations(EditorContextImpl.java:1748)
   at org.netbeans.modules.debugger.jpda.ExpressionPool.createExpressionAt(ExpressionPool.java:193)
   at org.netbeans.modules.debugger.jpda.ExpressionPool.getExpressionAt(ExpressionPool.java:102)
   at org.netbeans.modules.debugger.jpda.actions.StepActionProvider$2.run(StepActionProvider.java:592)
Comment 1 Egor Ushakov 2013-10-11 12:28:30 UTC
Created attachment 141011 [details]
stacktrace
Comment 2 Martin Entlicher 2013-12-16 16:03:34 UTC
To reproduce:

public class TestUnionExcs {
    
    public static void main(String[] args) {
        try {
            args[2].charAt(10);
        } catch (ArrayIndexOutOfBoundsException | NullPointerException ex) {
            String msg = ex.getMessage().trim(); // Put breakpoint here
            System.err.println(msg);
        }
    }
}

Debug that class, after it stops on the breakpoint, do Step Over Expression. The exception is thrown then.
Comment 3 Martin Entlicher 2013-12-17 18:14:50 UTC
Fixed by changeset:   269543:70c1a1cc3918
http://hg.netbeans.org/core-main/rev/70c1a1cc3918