Description:
API for LocalVariable.isVisible(StackFrame) states that
"Returns:
true if this variable is visible; false otherwise.
Throws:
IllegalArgumentException - if the stack frame's method does not match
this variable's method."
But IllegalArgumentException is not thrown when StackFrame and LocalVariable
methods do not match, instead it returns false.
Scenario:
---------
Debugger - LocalVisibleTest.java
Debugee - LocalTest.java
***Should throw IllegalArgumentException for variable1(class1) in testMethod1
which is not visible for the StackFrame of method testMethod2 as the variable
and StackFrame are for different methods. But it returns false.
The following scenarios work fine:
Returns true for variable1(u) which is visible for the StackFrame for
method testMethod1.
Returns false for variable1(q) which is not visible for the
StackFrame for method testMethod1.
***Testing done in JDK 1.3.0rc2-Y & JDK1.4.0beta-F-Hotspot and Classic
VM(WinNT )
Testing done in JDK 1.3.0rc2-Y Hotspot and Classic VM (Solaris2.7)
Steps to reproduce the bug
---------------------------
The bug can be reproduced using the files in the location
/net/sqesvr/export/disk5/toolsbugs/4327739
Follow the instructions in README to reproduce the bug.
API for LocalVariable.isVisible(StackFrame) states that
"Returns:
true if this variable is visible; false otherwise.
Throws:
IllegalArgumentException - if the stack frame's method does not match
this variable's method."
But IllegalArgumentException is not thrown when StackFrame and LocalVariable
methods do not match, instead it returns false.
Scenario:
---------
Debugger - LocalVisibleTest.java
Debugee - LocalTest.java
***Should throw IllegalArgumentException for variable1(class1) in testMethod1
which is not visible for the StackFrame of method testMethod2 as the variable
and StackFrame are for different methods. But it returns false.
The following scenarios work fine:
Returns true for variable1(u) which is visible for the StackFrame for
method testMethod1.
Returns false for variable1(q) which is not visible for the
StackFrame for method testMethod1.
***Testing done in JDK 1.3.0rc2-Y & JDK1.4.0beta-F-Hotspot and Classic
VM(WinNT )
Testing done in JDK 1.3.0rc2-Y Hotspot and Classic VM (Solaris2.7)
Steps to reproduce the bug
---------------------------
The bug can be reproduced using the files in the location
/net/sqesvr/export/disk5/toolsbugs/4327739
Follow the instructions in README to reproduce the bug.