File tree Expand file tree Collapse file tree 2 files changed +3
-0
lines changed
src/main/java11/datadog/trace/bootstrap Expand file tree Collapse file tree 2 files changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -51,6 +51,7 @@ tasks.named("compileJava") {
5151
5252dependencies {
5353 implementation sourceSets. main_java11. output
54+ main_java11CompileOnly libs. forbiddenapis
5455 main_java6CompileOnly libs. forbiddenapis
5556 testImplementation sourceSets. main_java6. output
5657}
Original file line number Diff line number Diff line change 55import static java .util .Collections .singleton ;
66import static java .util .Collections .singletonMap ;
77
8+ import de .thetaphi .forbiddenapis .SuppressForbidden ;
89import java .lang .instrument .Instrumentation ;
910import java .lang .reflect .Method ;
1011
1112/** Additional agent checks that require Java 11+. */
1213public final class AdvancedAgentChecks {
1314
1415 /** Returns {@code true} if the JVM is writing to a CDS/AOT archive, i.e. is in training mode. */
16+ @ SuppressForbidden
1517 public static boolean isAotTraining (Instrumentation inst ) {
1618 try {
1719 Class <?> cds = Class .forName ("jdk.internal.misc.CDS" );
You can’t perform that action at this time.
0 commit comments