Skip to content

Commit d789c53

Browse files
committedApr 14, 2021
test/hotspot/jtreg/testlibrary/jvmti/TransformerAgent.java fixed to avoid ClassCircularityError.
1 parent 5c76fa1 commit d789c53

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed
 

‎test/hotspot/jtreg/testlibrary/jvmti/TransformerAgent.java

+5-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,11 @@ static class SimpleTransformer implements ClassFileTransformer {
6060
public byte[] transform(ClassLoader loader, String name, Class<?> classBeingRedefined,
6161
ProtectionDomain pd, byte[] buffer) throws IllegalClassFormatException {
6262
try {
63-
log("SimpleTransformer called for: " + name + "@" + incrCounter(name));
63+
// Printing cause ClassCircularityError for java/util/concurrent/locks/AbstractQueuedSynchronizer$ExclusiveNode
64+
// So don't try to print some system classes
65+
if (!name.startsWith("java/")) {
66+
log("SimpleTransformer called for: " + name + "@" + incrCounter(name));
67+
}
6468
if (!shouldTransform(name))
6569
return null;
6670

0 commit comments

Comments
 (0)
Please sign in to comment.