8245392: Remove duplication in class redefinition and retransformation specs

Remove duplications from the Instrumentation, JDI and JDWP redefinition specs

Reviewed-by: dholmes, cjplummer
This commit is contained in:
Serguei Spitsyn 2020-05-27 03:21:15 +00:00
parent eb20ed7374
commit 1357c01e57
3 changed files with 10 additions and 35 deletions

View File

@ -461,16 +461,9 @@ JDWP "Java(tm) Debug Wire Protocol"
"<a href=\"#JDWP_StackFrame_PopFrames\">PopFrames</a> command can be used "
"to pop frames with obsolete methods."
"<p>"
"Unless the canUnrestrictedlyRedefineClasses capability is present the following "
"redefinitions are restricted: "
"<ul>"
"<li>changing the schema (the fields)</li>"
"<li>changing the hierarchy (superclasses, interfaces)</li>"
"<li>deleting a method</li>"
"<li>changing class modifiers</li>"
"<li>changing method modifiers</li>"
"<li>changing the <code>NestHost</code>, <code>NestMembers</code>, or <code>Record</code> class attributes</li>"
"</ul>"
"Unless the canUnrestrictedlyRedefineClasses capability is present "
"the redefinition must follow the restrictions described in "
"<a href=\"../jvmti.html#RedefineClasses\">JVM TI RedefineClasses</a>."
"<p>"
"Requires canRedefineClasses capability - see "
"<a href=\"#JDWP_VirtualMachine_CapabilitiesNew\">CapabilitiesNew</a>. "

View File

@ -222,13 +222,8 @@ public interface Instrumentation {
* Instances of the retransformed class are not affected.
*
* <P>
* The retransformation may change method bodies, the constant pool and
* attributes (unless explicitly prohibited).
* The retransformation must not add, remove or rename fields or methods, change the
* signatures of methods, or change inheritance.
* The retransformation must not change the <code>NestHost</code>,
* <code>NestMembers</code>, or <code>Record</code> attributes.
* These restrictions may be lifted in future versions.
* The supported class file changes are described in
* <a href="{@docRoot}/../specs/jvmti.html#RetransformClasses">JVM TI RetransformClasses</a>.
* The class file bytes are not checked, verified and installed
* until after the transformations have been applied, if the resultant bytes are in
* error this method will throw an exception.
@ -313,13 +308,8 @@ public interface Instrumentation {
* Instances of the redefined class are not affected.
*
* <P>
* The redefinition may change method bodies, the constant pool and attributes
* (unless explicitly prohibited).
* The redefinition must not add, remove or rename fields or methods, change the
* signatures of methods, or change inheritance.
* The redefinition must not change the <code>NestHost</code>,
* <code>NestMembers</code>, or <code>Record</code> attributes.
* These restrictions may be lifted in future versions.
* The supported class file changes are described in
* <a href="{@docRoot}/../specs/jvmti.html#RedefineClasses">JVM TI RedefineClasses</a>.
* The class file bytes are not checked, verified and installed
* until after the transformations have been applied, if the resultant bytes are in
* error this method will throw an exception.

View File

@ -214,17 +214,9 @@ public interface VirtualMachine extends Mirror {
* attempting to add a method will throw this exception.
* <LI>If {@link #canUnrestrictedlyRedefineClasses()
* canUnrestrictedlyRedefineClasses()}
* is false, attempting any of the following will throw
* this exception
* <UL>
* <LI>changing the schema (the fields)
* <LI>changing the hierarchy (superclasses, interfaces)
* <LI>deleting a method
* <LI>changing class modifiers
* <LI>changing method modifiers
* <LI>changing the {@code NestHost}, {@code NestMembers}, or {@code Record} class attributes
* </UL>
* </UL>
* is false attempting any of the unsupported class file changes described
* in <a href="{@docRoot}/../specs/jvmti.html#RedefineClasses">
* JVM TI RedefineClasses</a> will throw this exception.
*
* @throws java.lang.NoClassDefFoundError if the bytes
* don't correspond to the reference type (the names