slawekjaranowski commented on a change in pull request #422:
URL: https://github.com/apache/maven-surefire/pull/422#discussion_r777113282
##########
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:
what about Java Version from commons lang3 is is accessible by
`org.apache.maven.surefire.shared.lang3.JavaVersion`
--
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]