bval-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mben...@apache.org
Subject svn commit: r1644257 - /bval/branches/bval-11/bval-core/src/main/java/org/apache/bval/util/reflection/Reflection.java
Date Wed, 10 Dec 2014 00:14:02 GMT
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;



Mime
View raw message