Tibor17 commented on a change in pull request #422:
URL: https://github.com/apache/maven-surefire/pull/422#discussion_r777110752



##########
File path: 
surefire-api/src/main/java/org/apache/maven/surefire/api/util/internal/ObjectUtils.java
##########
@@ -44,4 +46,11 @@ private ObjectUtils()
     {
         return ManagementFactory.getRuntimeMXBean().getSystemProperties();
     }
+
+    public static boolean isSecurityManagerSupported()
+    {
+        ClassLoader classLoader = ObjectUtils.class.getClassLoader();
+        Class<?> smClass = tryLoadClass( classLoader, 
"java.lang.SecurityManager" );
+        return smClass != null && !smClass.isAnnotationPresent( 
Deprecated.class );
+    }

Review comment:
       It was my previous solution but the class appears in module 
surefire-booter. This is surefire-api, so we cannot inherit it and cannot 
duplicate the code.




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to