Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2036789 | 1.4.0 | Robert Field | P2 | Resolved | Fixed | beta |
Name: pa48320 Date: 09/05/2000
I'm using jdk1.3.0C.
Problem:
I'm debugging a class (application) that contains inner classes. I start the debugger and stop on the first line of main. I attempt to set a breakpoint in one of the inner classes of the class. VirtualMachine.classesByName(class$innerclass) returns a reference type for the inner class EVEN THOUGH I have not gotten a class prepared event for the inner class. Calling ReferenceType.locationsOfLine() on the inner class throws:
com.sun.jdi.ClassNotPreparedException
at com.sun.tools.jdi.JDWPException.toJDIException(JDWPException.java:36)
at com.sun.tools.jdi.ReferenceTypeImpl.methods(ReferenceTypeImpl.java:353)
at com.sun.tools.jdi.ReferenceTypeImpl.locationsOfLine(ReferenceTypeImpl.java:605)
at com.sas.sdi.RemoteDebugger.setLineBreakpoint(RemoteDebugger.java:563)
at com.sas.sdi.RemoteDebugger.setBreakpoint(RemoteDebugger.java:454)
at com.sas.sdi.RemoteDebugger.setNewBreakpointOnVM(RemoteDebugger.java:428)
at com.sas.sdi.RemoteDebugger.addBreakpoint(RemoteDebugger.java:969)
Obviously, the last 4 lines are in my code.
So, the reference type for the inner class is bogus somehow. Also, I can set a breakpoint on some of the other inner classes that I have in the same file (even though I have not gotten a class prepared event for them either).
So, it seems like when the outer class gets loaded, one of the inner classes (the one that's causing the problem) gets partially loaded.
1. How are inner classes supposed to work with regard to class preparation?
2. The other inner classes that don't have problems haven't given me a classPrepared event either. Why do they work?
Thanks,
Ernest
======================================================================
- backported by
-
JDK-2036789 JDWP: classesByName reports class that hasn't been prepared
-
- Resolved
-
- relates to
-
JDK-4299394 TTY: Deferred line breakpoints can't be set on inner classes
-
- Closed
-
-
JDK-4449577 JPDA: ClassLoaderReference.visibleClasses() returns non-prepared classes
-
- Closed
-