fix classloader command (#2601)

pull/2322/merge
汪小哥 1 year ago committed by GitHub
parent ede902329d
commit b58f02f2d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -175,7 +175,11 @@ public class ClassLoaderCommand extends AnnotatedCommand {
} }
if (all) { if (all) {
processAllClasses(process, inst); String hashCode = this.hashCode;
if (StringUtils.isBlank(hashCode) && targetClassLoader != null) {
hashCode = "" + Integer.toHexString(targetClassLoader.hashCode());
}
processAllClasses(process, inst, hashCode);
} else if (classLoaderSpecified && resource != null) { } else if (classLoaderSpecified && resource != null) {
processResources(process, inst, targetClassLoader); processResources(process, inst, targetClassLoader);
} else if (classLoaderSpecified && this.loadClass != null) { } else if (classLoaderSpecified && this.loadClass != null) {
@ -305,7 +309,7 @@ public class ClassLoaderCommand extends AnnotatedCommand {
process.end(); process.end();
} }
private void processAllClasses(CommandProcess process, Instrumentation inst) { private void processAllClasses(CommandProcess process, Instrumentation inst,String hashCode) {
RowAffect affect = new RowAffect(); RowAffect affect = new RowAffect();
getAllClasses(hashCode, inst, affect, process); getAllClasses(hashCode, inst, affect, process);
if (checkInterrupted(process)) { if (checkInterrupted(process)) {

Loading…
Cancel
Save