diff --git a/make/data/jdwp/jdwp.spec b/make/data/jdwp/jdwp.spec index eddf83f1aca..8a4f0bac95f 100644 --- a/make/data/jdwp/jdwp.spec +++ b/make/data/jdwp/jdwp.spec @@ -393,11 +393,14 @@ JDWP "Java(tm) Debug Wire Protocol" (boolean canRedefineClasses "Can the VM redefine classes?") (boolean canAddMethod - "Can the VM add methods when redefining " - "classes?") + "Can the VM add methods when redefining classes? " + "

@Deprecated(since=\"15\") A JVM TI based JDWP back-end " + "will never set this capability to true.") (boolean canUnrestrictedlyRedefineClasses "Can the VM redefine classes " - "in ways that are normally restricted?") + "in ways that are normally restricted?" + "

@Deprecated(since=\"15\") A JVM TI based JDWP back-end " + "will never set this capability to true.") (boolean canPopFrames "Can the VM pop stack frames?") (boolean canUseInstanceFilters @@ -467,6 +470,7 @@ JDWP "Java(tm) Debug Wire Protocol" "

" "Requires canRedefineClasses capability - see " "CapabilitiesNew. " + "

@Deprecated(since=\"15\") " "In addition to the canRedefineClasses capability, the target VM must " "have the canAddMethod capability to add methods when redefining classes, " "or the canUnrestrictedlyRedefineClasses capability to redefine classes in ways " diff --git a/src/jdk.jdi/share/classes/com/sun/jdi/VirtualMachine.java b/src/jdk.jdi/share/classes/com/sun/jdi/VirtualMachine.java index 21a77ce9a70..14a100a1f8c 100644 --- a/src/jdk.jdi/share/classes/com/sun/jdi/VirtualMachine.java +++ b/src/jdk.jdi/share/classes/com/sun/jdi/VirtualMachine.java @@ -578,12 +578,14 @@ default List allModules() { * Determines if the target VM supports the addition * of methods when performing class redefinition. * @see #redefineClasses + * @deprecated A JVM TI based JDWP back-end will never set this capability to true. * * @return true if the feature is supported, * false otherwise. * * @since 1.4 */ + @Deprecated(since="15") boolean canAddMethod(); /** @@ -591,12 +593,14 @@ default List allModules() { * changes when performing class redefinition that are * otherwise restricted by {@link #redefineClasses}. * @see #redefineClasses + * @deprecated A JVM TI based JDWP back-end will never set this capability to true. * * @return true if the feature is supported, * false otherwise. * * @since 1.4 */ + @Deprecated(since="15") boolean canUnrestrictedlyRedefineClasses(); /** diff --git a/src/jdk.jdi/share/classes/com/sun/tools/jdi/VirtualMachineImpl.java b/src/jdk.jdi/share/classes/com/sun/tools/jdi/VirtualMachineImpl.java index 893fdac9e7d..e517dd88d29 100644 --- a/src/jdk.jdi/share/classes/com/sun/tools/jdi/VirtualMachineImpl.java +++ b/src/jdk.jdi/share/classes/com/sun/tools/jdi/VirtualMachineImpl.java @@ -742,12 +742,14 @@ public boolean canRedefineClasses() { capabilitiesNew().canRedefineClasses; } + @Deprecated(since="15") public boolean canAddMethod() { validateVM(); return hasNewCapabilities() && capabilitiesNew().canAddMethod; } + @Deprecated(since="15") public boolean canUnrestrictedlyRedefineClasses() { validateVM(); return hasNewCapabilities() &&