File tree Expand file tree Collapse file tree
byte-buddy-dep/src/main/java/net/bytebuddy/dynamic/loading Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -987,7 +987,9 @@ protected UsingUnsafeInjection(Object accessor,
987987 */
988988 @ SuppressFBWarnings (value = "DP_DO_INSIDE_DO_PRIVILEGED" , justification = "Assuring privilege is explicit user responsibility." )
989989 protected static Initializable make () throws Exception {
990- if (Boolean .parseBoolean (java .lang .System .getProperty (UsingUnsafe .SAFE_PROPERTY , Boolean .toString (GraalImageCode .getCurrent ().isDefined ())))) {
990+ if (Boolean .parseBoolean (java .lang .System .getProperty (UsingUnsafe .SAFE_PROPERTY , Boolean .toString (ClassFileVersion
991+ .ofThisVm ()
992+ .isAtLeast (ClassFileVersion .JAVA_V25 ) || GraalImageCode .getCurrent ().isDefined ())))) {
991993 return new Initializable .Unavailable ("Use of Unsafe was disabled by system property" );
992994 }
993995 Class <?> unsafe = Class .forName ("sun.misc.Unsafe" );
You can’t perform that action at this time.
0 commit comments