--- old/src/hotspot/share/prims/jvmti.xml 2018-05-18 03:22:10.160702126 -0400 +++ new/src/hotspot/share/prims/jvmti.xml 2018-05-18 03:22:08.616612688 -0400 @@ -358,7 +358,7 @@ ]> @@ -7631,9 +7631,12 @@ <eventlink id="ClassFileLoadHook"/> event will be sent. <p/> - The retransformation may change method bodies, the constant pool and attributes. + 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, change modifiers, or change inheritance. + The retransformation must not change the <code>NestHost</code> or + <code>NestMembers</code> attributes. These restrictions may be lifted in future versions. See the error return description below for information on error codes returned if an unsupported retransformation is attempted. @@ -7704,6 +7707,9 @@ A retransformed class file does not declare a method declared in the old class version. </error> + <error id="JVMTI_ERROR_UNSUPPORTED_REDEFINITION_CLASS_ATTRIBUTE_CHANGED"> + A retransformed class file has unsupported differences in class attributes. + </error> <error id="JVMTI_ERROR_UNSUPPORTED_REDEFINITION_CLASS_MODIFIERS_CHANGED"> A retransformed class file has different class modifiers. </error> @@ -7778,9 +7784,12 @@ <eventlink id="ClassFileLoadHook">Class File Load Hook</eventlink> will be sent (if enabled), but no other <jvmti/> events will be sent. <p/> - The redefinition may change method bodies, the constant pool and attributes. + 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, change modifiers, or change inheritance. + The retransformation must not change the <code>NestHost</code> or + <code>NestMembers</code> attributes. These restrictions may be lifted in future versions. See the error return description below for information on error codes returned if an unsupported redefinition is attempted. @@ -7855,6 +7864,9 @@ A new class version does not declare a method declared in the old class version. </error> + <error id="JVMTI_ERROR_UNSUPPORTED_REDEFINITION_CLASS_ATTRIBUTE_CHANGED"> + A new class version has unsupported differences in class attributes. + </error> <error id="JVMTI_ERROR_UNSUPPORTED_REDEFINITION_CLASS_MODIFIERS_CHANGED"> A new class version has different modifiers. </error> @@ -11739,6 +11751,9 @@ A method in the new class version has different modifiers than its counterpart in the old class version. </errorid> + <errorid id="JVMTI_ERROR_UNSUPPORTED_REDEFINITION_CLASS_ATTRIBUTE_CHANGED" num="72"> + A new class version has unsupported differences in class attributes. + </errorid> </errorcategory> </errorsection> @@ -14811,6 +14826,13 @@ - The function may return NULL in the start phase if the can_generate_early_vmstart capability is enabled. </change> + <change date="7 February 2018" version="11.0.0"> + Minor update for new class file NestHost and NestMembers attributes: + - Specify that RedefineClasses and RetransformClasses are not allowed + to change the class file NestHost and NestMembers attributes. + - Add new error JVMTI_ERROR_UNSUPPORTED_REDEFINITION_CLASS_ATTRIBUTE_CHANGED + that can be returned by RedefineClasses and RetransformClasses. + </change> </changehistory> </specification>