You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by GitBox <gi...@apache.org> on 2022/11/10 18:19:44 UTC
[GitHub] [cassandra] dcapwell commented on a diff in pull request #1993: When updating ThreadLocalRandom used the old sun.misc.Unsafe rather than jdk.internal.misc.Unsafe
dcapwell commented on code in PR #1993:
URL: https://github.com/apache/cassandra/pull/1993#discussion_r1019472361
##########
test/simulator/asm/org/apache/cassandra/simulator/asm/ClassTransformer.java:
##########
@@ -137,12 +139,58 @@ private ClassTransformer(int api, ClassWriter classWriter, String className, Enu
this.methodLogger = MethodLogger.log(api, className);
}
+ public void setUpdateVisibility(boolean updateVisibility)
+ {
+ this.updateVisibility = updateVisibility;
+ }
+
+ /**
+ * Java 11 changed the way that classes defined in the same source file get access to private state (see https://openjdk.org/jeps/181),
+ * rather than trying to adapt to this, this method attempts to make the field/method/class public so that access
+ * is not restricted.
+ */
+ private int makePublic(int access)
Review Comment:
yes, this is part of the simulator; we rewrite classes so we can control execution order... but on JDK 11 how private fields/methods are shard with subclasses changed, so rather than trying to make things complex, the rewrite logic makes everything public
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org