struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lukaszlen...@apache.org
Subject [21/50] git commit: Adds logging of excluded classes
Date Wed, 18 Jun 2014 06:49:38 GMT
Adds logging of excluded classes


Project: http://git-wip-us.apache.org/repos/asf/struts/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/62ee6b10
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/62ee6b10
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/62ee6b10

Branch: refs/heads/develop
Commit: 62ee6b104ae871807ff073eb206b5f3ec549a302
Parents: a5946d0
Author: Lukasz Lenart <lukaszlenart@apache.org>
Authored: Mon May 5 21:33:16 2014 +0200
Committer: Lukasz Lenart <lukaszlenart@apache.org>
Committed: Mon May 5 21:33:16 2014 +0200

----------------------------------------------------------------------
 .../com/opensymphony/xwork2/ognl/SecurityMemberAccess.java   | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/62ee6b10/xwork-core/src/main/java/com/opensymphony/xwork2/ognl/SecurityMemberAccess.java
----------------------------------------------------------------------
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/ognl/SecurityMemberAccess.java
b/xwork-core/src/main/java/com/opensymphony/xwork2/ognl/SecurityMemberAccess.java
index a35f68b..c14d8b9 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/ognl/SecurityMemberAccess.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/ognl/SecurityMemberAccess.java
@@ -15,13 +15,14 @@
  */
 package com.opensymphony.xwork2.ognl;
 
+import com.opensymphony.xwork2.util.logging.Logger;
+import com.opensymphony.xwork2.util.logging.LoggerFactory;
 import ognl.DefaultMemberAccess;
 
 import java.lang.reflect.Member;
 import java.lang.reflect.Method;
 import java.lang.reflect.Modifier;
 import java.util.Collections;
-import java.util.HashSet;
 import java.util.Map;
 import java.util.Set;
 import java.util.regex.Matcher;
@@ -33,6 +34,8 @@ import java.util.regex.Pattern;
  */
 public class SecurityMemberAccess extends DefaultMemberAccess {
 
+    private static final Logger LOG = LoggerFactory.getLogger(SecurityMemberAccess.class);
+
     private final boolean allowStaticMethodAccess;
     private Set<Pattern> excludeProperties = Collections.emptySet();
     private Set<Pattern> acceptProperties = Collections.emptySet();
@@ -50,6 +53,9 @@ public class SecurityMemberAccess extends DefaultMemberAccess {
     @Override
     public boolean isAccessible(Map context, Object target, Member member, String propertyName)
{
         if (isClassExcluded(target.getClass(), member.getDeclaringClass())) {
+            if (LOG.isDebugEnabled()) {
+                LOG.debug("Target class [#0] and member type [#1] are excluded!", target,
member);
+            }
             return false;
         }
 


Mime
View raw message