As per the documentation on JDI it says that InvalidCodeIndexException is
thrown to indicate that the requested operation cannot be completed because
the specified code index is not valid.
1)When checking with an arbitrary 8 digit number we
expect that it must throw the InvalidCodeIndexException.
But instead the programs just runs to succesful completion
no Exception is thrown and location object returns null.
2)When checking the method.locationsOfCodeIndex with a negative
parameter say -99 the exception is still not thrown and the
location object returns null.
output:
-------
D:\swing\method>java InvalidCodeTest
AttachingConnector ....
I'm here in VMLaunch
JVM version:1.3.0rc1
JDI version: 1.3
JVM description: Java Debug Interface (Reference Implementation) version 1.3
Java Debug Wire Protocol (Reference Implementation) version 1.0
JVM Debug Interface version 1.0
JVM version 1.3.0rc1 (Java HotSpot(TM) Client VM, interpreted mode)
VM Start thread is main
InvalidCodeExceptionTest.do1()+0
###@###.###1()+0 in thread main
---------------------------------------------------------------------
Testing done in JDK1.3.0-T build.
The bug can be reproduced using the files in the location
/net/sqesvr/export/disk5/toolsbugs/4309918
Follow the instructions in README to reproduce the bug.
thrown to indicate that the requested operation cannot be completed because
the specified code index is not valid.
1)When checking with an arbitrary 8 digit number we
expect that it must throw the InvalidCodeIndexException.
But instead the programs just runs to succesful completion
no Exception is thrown and location object returns null.
2)When checking the method.locationsOfCodeIndex with a negative
parameter say -99 the exception is still not thrown and the
location object returns null.
output:
-------
D:\swing\method>java InvalidCodeTest
AttachingConnector ....
I'm here in VMLaunch
JVM version:1.3.0rc1
JDI version: 1.3
JVM description: Java Debug Interface (Reference Implementation) version 1.3
Java Debug Wire Protocol (Reference Implementation) version 1.0
JVM Debug Interface version 1.0
JVM version 1.3.0rc1 (Java HotSpot(TM) Client VM, interpreted mode)
VM Start thread is main
InvalidCodeExceptionTest.do1()+0
###@###.###1()+0 in thread main
---------------------------------------------------------------------
Testing done in JDK1.3.0-T build.
The bug can be reproduced using the files in the location
/net/sqesvr/export/disk5/toolsbugs/4309918
Follow the instructions in README to reproduce the bug.