-
Bug
-
Resolution: Fixed
-
P4
-
1.4.0, 1.4.1
-
mantis
-
generic
-
generic
-
Verified
Name: vpR10197 Date: 07/25/2002
------------------------------------------------------------------------------
Test : nsk/jdi/VirtualMachine/redefineClasses/redefineclasses008
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-b17
------------------------------------------------------------------------------
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 method modifiers
when canUnrestrictedlyRedefineClasses() method returns false. Required
UnsupportedOperationException is not thrown.
The test checks two different cases for suspended debugee and not
suspended one.
Note: Behavior of this test depends on platform and mode.
For example, UnsupportedOperationException is thrown on
solsparc in comp mode when <static> is being added for
3 methods(public, protected and private).
But it is not thrown, when <static> is being added for
only 1 public method. The same about <final> modifier.
The test consists of the following files:
redefineclasses008.java - debugger
redefineclasses008a.java - initial debugee
newclassXX/redefineclasses008a.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 <static> modifiers to public method>>>
class-file :newclass01/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses008/redefineclasses008a.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 <static> modifiers to public method
>return to the previous state...
class-file :/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses008/redefineclasses008a.class
adding <static> modifiers to 3 methods>>>
class-file :newclass02/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses008/redefineclasses008a.klass
!!!Expected exception java.lang.UnsupportedOperationException: schema change not implemented
adding <final> modifiers to public method>>>
class-file :newclass03/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses008/redefineclasses008a.klass
# ERROR: debugger FAILURE> ***UnsupportedOperationException is not thrown
# ERROR: debugger FAILURE> *** while adding <final> modifiers to public method
>return to the previous state...
class-file :/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses008/redefineclasses008a.class
adding <final> modifiers to 3 methods>>>
class-file :newclass04/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses008/redefineclasses008a.klass
!!!Expected exception java.lang.UnsupportedOperationException: schema change not implemented
adding <synchronized> modifiers to public method>>>
class-file :newclass05/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses008/redefineclasses008a.klass
# ERROR: debugger FAILURE> ***UnsupportedOperationException is not thrown
# ERROR: debugger FAILURE> *** while adding <synchronized> modifiers to public method
>return to the previous state...
class-file :/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses008/redefineclasses008a.class
adding <synchronized> modifiers to 3 methods>>>
class-file :newclass06/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses008/redefineclasses008a.klass
# ERROR: debugger FAILURE> ***UnsupportedOperationException is not thrown
# ERROR: debugger FAILURE> *** while adding <synchronized> modifiers to 3 methods
>return to the previous state...
class-file :/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses008/redefineclasses008a.class
adding <strictfp> modifiers to public method>>>
class-file :newclass07/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses008/redefineclasses008a.klass
# ERROR: debugger FAILURE> ***UnsupportedOperationException is not thrown
# ERROR: debugger FAILURE> *** while adding <strictfp> modifiers to public method
>return to the previous state...
class-file :/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses008/redefineclasses008a.class
adding <strictfp> modifiers to 3 methods>>>
class-file :newclass08/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses008/redefineclasses008a.klass
# ERROR: debugger FAILURE> ***UnsupportedOperationException is not thrown
# ERROR: debugger FAILURE> *** while adding <strictfp> modifiers to 3 methods
>return to the previous state...
class-file :/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses008/redefineclasses008a.class
<<<Debugee is not suspended>>>
------------------------------
adding <static> modifiers to public method>>>
class-file :newclass01/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses008/redefineclasses008a.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 <static> modifiers to public method
>return to the previous state...
class-file :/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses008/redefineclasses008a.class
adding <static> modifiers to 3 methods>>>
class-file :newclass02/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses008/redefineclasses008a.klass
!!!Expected exception java.lang.UnsupportedOperationException: schema change not implemented
adding <final> modifiers to public method>>>
class-file :newclass03/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses008/redefineclasses008a.klass
# ERROR: debugger FAILURE> ***UnsupportedOperationException is not thrown
# ERROR: debugger FAILURE> *** while adding <final> modifiers to public method
>return to the previous state...
class-file :/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses008/redefineclasses008a.class
adding <final> modifiers to 3 methods>>>
class-file :newclass04/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses008/redefineclasses008a.klass
!!!Expected exception java.lang.UnsupportedOperationException: schema change not implemented
adding <synchronized> modifiers to public method>>>
class-file :newclass05/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses008/redefineclasses008a.klass
# ERROR: debugger FAILURE> ***UnsupportedOperationException is not thrown
# ERROR: debugger FAILURE> *** while adding <synchronized> modifiers to public method
>return to the previous state...
class-file :/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses008/redefineclasses008a.class
adding <synchronized> modifiers to 3 methods>>>
class-file :newclass06/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses008/redefineclasses008a.klass
# ERROR: debugger FAILURE> ***UnsupportedOperationException is not thrown
# ERROR: debugger FAILURE> *** while adding <synchronized> modifiers to 3 methods
>return to the previous state...
class-file :/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses008/redefineclasses008a.class
adding <strictfp> modifiers to public method>>>
class-file :newclass07/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses008/redefineclasses008a.klass
# ERROR: debugger FAILURE> ***UnsupportedOperationException is not thrown
# ERROR: debugger FAILURE> *** while adding <strictfp> modifiers to public method
>return to the previous state...
class-file :/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses008/redefineclasses008a.class
adding <strictfp> modifiers to 3 methods>>>
class-file :newclass08/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses008/redefineclasses008a.klass
# ERROR: debugger FAILURE> ***UnsupportedOperationException is not thrown
# ERROR: debugger FAILURE> *** while adding <strictfp> modifiers to 3 methods
>return to the previous state...
class-file :/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses008/redefineclasses008a.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 <static> modifiers to public method
# ERROR: debugger FAILURE> ***UnsupportedOperationException is not thrown
# ERROR: debugger FAILURE> *** while adding <final> modifiers to public method
# ERROR: debugger FAILURE> ***UnsupportedOperationException is not thrown
# ERROR: debugger FAILURE> *** while adding <synchronized> modifiers to public method
# ERROR: debugger FAILURE> ***UnsupportedOperationException is not thrown
# ERROR: debugger FAILURE> *** while adding <synchronized> modifiers to 3 methods
# ERROR: debugger FAILURE> ***UnsupportedOperationException is not thrown
# ERROR: debugger FAILURE> *** while adding <strictfp> modifiers to public method
# ERROR: debugger FAILURE> ***UnsupportedOperationException is not thrown
# ERROR: debugger FAILURE> *** while adding <strictfp> modifiers to 3 methods
# 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 <static> modifiers to public method
# ERROR: debugger FAILURE> ***UnsupportedOperationException is not thrown
# ERROR: debugger FAILURE> *** while adding <final> modifiers to public method
# ERROR: debugger FAILURE> ***UnsupportedOperationException is not thrown
# ERROR: debugger FAILURE> *** while adding <synchronized> modifiers to public method
# ERROR: debugger FAILURE> ***UnsupportedOperationException is not thrown
# ERROR: debugger FAILURE> *** while adding <synchronized> modifiers to 3 methods
# ERROR: debugger FAILURE> ***UnsupportedOperationException is not thrown
# ERROR: debugger FAILURE> *** while adding <strictfp> modifiers to public method
# ERROR: debugger FAILURE> ***UnsupportedOperationException is not thrown
# ERROR: debugger FAILURE> *** while adding <strictfp> modifiers to 3 methods
exit code = 97
======================================================================
Name: vpR10197 Date: 08/12/2002
This bug also affects the following test from testbase_nsk:
nsk/jdi/VirtualMachine/redefineClasses/redefineclasses007
The test will be available in the next release v141r16.
======================================================================
Name: pvR10198 Date: 08/19/2002
This bug also affects the following test from testbase_nsk:
nsk/jvmdi/RedefineClasses/redefclass025
The test will be available in the next release v141r16.
Pavel Vysotski <###@###.###>
======================================================================