You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bval.apache.org by mb...@apache.org on 2014/12/10 01:14:02 UTC
svn commit: r1644257 -
/bval/branches/bval-11/bval-core/src/main/java/org/apache/bval/util/reflection/Reflection.java
Author: mbenson
Date: Wed Dec 10 00:14:02 2014
New Revision: 1644257
URL: http://svn.apache.org/r1644257
Log:
dynamically check SecurityManager
Modified:
bval/branches/bval-11/bval-core/src/main/java/org/apache/bval/util/reflection/Reflection.java
Modified: bval/branches/bval-11/bval-core/src/main/java/org/apache/bval/util/reflection/Reflection.java
URL: http://svn.apache.org/viewvc/bval/branches/bval-11/bval-core/src/main/java/org/apache/bval/util/reflection/Reflection.java?rev=1644257&r1=1644256&r2=1644257&view=diff
==============================================================================
--- bval/branches/bval-11/bval-core/src/main/java/org/apache/bval/util/reflection/Reflection.java (original)
+++ bval/branches/bval-11/bval-core/src/main/java/org/apache/bval/util/reflection/Reflection.java Wed Dec 10 00:14:02 2014
@@ -34,8 +34,6 @@ import org.apache.commons.weaver.privili
* @version $Rev$ $Date$
*/
public class Reflection {
- private static final boolean hasSecurityManager = System.getSecurityManager() != null;
-
/**
* Get the named {@link Class} from the specified {@link ClassLoader}.
* @param classLoader
@@ -203,7 +201,7 @@ public class Reflection {
if (o == null || o.isAccessible() == accessible) {
return false;
}
- if (!accessible && !hasSecurityManager) {
+ if (!accessible && System.getSecurityManager() == null) {
return false;
}
final Member m = (Member) o;