-
Bug
-
Resolution: Fixed
-
P4
-
1.4.0, 1.4.1
-
mantis
-
generic
-
generic
-
Verified
Name: vpR10197 Date: 07/29/2002
------------------------------------------------------------------------------
Test : nsk/jdi/VirtualMachine/redefineClasses/redefineclasses011
Test Base : testbase_nsk
VM : ServerVM, ClientVM
Mode : comp, int, mixed
Platform (s) : solx86, linux, solsparc, win
OS : 5.8, RH7.2, NT/2000
JDK : 1.4.0-FCS, 1.4.1-b18
------------------------------------------------------------------------------
The bug is reproduced since Merlin-FCS.
The test provokes the JDI method com.sun.jdi.VirtualMachine.redefineClasses()
to throw the UnsupportedOperationException, trying to add a new constructor
when canAddMethod() method returns false.
Required UnsupportedOperationException is not thrown.
The test checks two different cases for suspended debugee and not
suspended one.
The test consists of the following files:
redefineclasses011.java - debugger
redefineclasses011a.java - initial debugee
newclassXX/redefineclasses011a.java - redefining debugees
and will be available in release r16 of the testbase_nsk.
Steps to reproduce
==================
1. cd /net/sqesvr.sfbay/export/vsn/GammaBase/Bugs/<BugID>
2. sh doit.sh $JAVA_HOME
The test produces the following output on Solaris-sparc:
TEST BEGINS
===========
<<<Debugee is suspended>>>
--------------------------
adding <public> constructor>>>
class-file :newclass01/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses011a.klass
# ERROR: debugger FAILURE> ***--------------------------
# ERROR: debugger FAILURE> ***Debugee is suspended
# ERROR: debugger FAILURE> ***--------------------------
# ERROR: debugger FAILURE> ***UnsupportedOperationException is not thrown
# ERROR: debugger FAILURE> *** while adding <public> constructor
>return to the previous state...
class-file :/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses011a.class
adding <protected> constructor>>>
class-file :newclass02/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses011a.klass
# ERROR: debugger FAILURE> ***UnsupportedOperationException is not thrown
# ERROR: debugger FAILURE> *** while adding <protected> constructor
>return to the previous state...
class-file :/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses011a.class
adding <private> constructor>>>
class-file :newclass03/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses011a.klass
# ERROR: debugger FAILURE> ***UnsupportedOperationException is not thrown
# ERROR: debugger FAILURE> *** while adding <private> constructor
>return to the previous state...
class-file :/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses011a.class
adding <private package> constructor>>>
class-file :newclass04/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses011a.klass
# ERROR: debugger FAILURE> ***UnsupportedOperationException is not thrown
# ERROR: debugger FAILURE> *** while adding <private package> constructor
>return to the previous state...
class-file :/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses011a.class
<<<Debugee is not suspended>>>
------------------------------
adding <public> constructor>>>
class-file :newclass01/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses011a.klass
# ERROR: debugger FAILURE> ***--------------------------
# ERROR: debugger FAILURE> ***Debugee is not suspended
# ERROR: debugger FAILURE> ***--------------------------
# ERROR: debugger FAILURE> ***UnsupportedOperationException is not thrown
# ERROR: debugger FAILURE> *** while adding <public> constructor
>return to the previous state...
class-file :/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses011a.class
adding <protected> constructor>>>
class-file :newclass02/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses011a.klass
# ERROR: debugger FAILURE> ***UnsupportedOperationException is not thrown
# ERROR: debugger FAILURE> *** while adding <protected> constructor
>return to the previous state...
class-file :/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses011a.class
adding <private> constructor>>>
class-file :newclass03/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses011a.klass
# ERROR: debugger FAILURE> ***UnsupportedOperationException is not thrown
# ERROR: debugger FAILURE> *** while adding <private> constructor
>return to the previous state...
class-file :/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses011a.class
adding <private package> constructor>>>
class-file :newclass04/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses011a.klass
# ERROR: debugger FAILURE> ***UnsupportedOperationException is not thrown
# ERROR: debugger FAILURE> *** while adding <private package> constructor
>return to the previous state...
class-file :/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses011a.class
=============
TEST FINISHES
debugee.stderr> completed succesfully.
debugee> expected Debugee's exit status - 95
Test finished. exitStatus = 2
#>
#> SUMMARY: Following errors occured
#> during test execution:
#>
# ERROR: debugger FAILURE> ***--------------------------
# ERROR: debugger FAILURE> ***Debugee is suspended
# ERROR: debugger FAILURE> ***--------------------------
# ERROR: debugger FAILURE> ***UnsupportedOperationException is not thrown
# ERROR: debugger FAILURE> *** while adding <public> constructor
# ERROR: debugger FAILURE> ***UnsupportedOperationException is not thrown
# ERROR: debugger FAILURE> *** while adding <protected> constructor
# ERROR: debugger FAILURE> ***UnsupportedOperationException is not thrown
# ERROR: debugger FAILURE> *** while adding <private> constructor
# ERROR: debugger FAILURE> ***UnsupportedOperationException is not thrown
# ERROR: debugger FAILURE> *** while adding <private package> constructor
# ERROR: debugger FAILURE> ***--------------------------
# ERROR: debugger FAILURE> ***Debugee is not suspended
# ERROR: debugger FAILURE> ***--------------------------
# ERROR: debugger FAILURE> ***UnsupportedOperationException is not thrown
# ERROR: debugger FAILURE> *** while adding <public> constructor
# ERROR: debugger FAILURE> ***UnsupportedOperationException is not thrown
# ERROR: debugger FAILURE> *** while adding <protected> constructor
# ERROR: debugger FAILURE> ***UnsupportedOperationException is not thrown
# ERROR: debugger FAILURE> *** while adding <private> constructor
# ERROR: debugger FAILURE> ***UnsupportedOperationException is not thrown
# ERROR: debugger FAILURE> *** while adding <private package> constructor
exit code = 97
======================================================================