Commits

Anonymous committed 11edd18

Rename fields and methods with "accepted" to "accept"

git-svn-id: http://svn.opensymphony.com/svn/xwork/trunk@1855e221344d-f017-0410-9bd5-d282ab1896d7

  • Participants
  • Parent commits 06fa769

Comments (0)

Files changed (5)

File src/java/com/opensymphony/xwork2/interceptor/ParametersInterceptor.java

 
     boolean ordered = false;
     Set<Pattern> excludeParams = Collections.emptySet();
-    Set<Pattern> acceptedParams = Collections.emptySet();
+    Set<Pattern> acceptParams = Collections.emptySet();
     static boolean devMode = false;
 
     private String acceptedParamNames = "[\\p{Graph}&&[^,#:=]]*";
         devMode = "true".equals(mode);
     }
 
-    public void setAcceptedParamNames(String commaDelim) {
+    public void setAcceptParamNames(String commaDelim) {
         Collection<String> acceptPatterns = asCollection(commaDelim);
         if (acceptPatterns != null) {
-            acceptedParams = new HashSet<Pattern>();
+            acceptParams = new HashSet<Pattern>();
             for (String pattern : acceptPatterns) {
-                acceptedParams.add(Pattern.compile(pattern));
+                acceptParams.add(Pattern.compile(pattern));
             }
         }
     }
             //block or allow access to properties
             //see WW-2761 for more details
             MemberAccessValueStack accessValueStack = (MemberAccessValueStack) newStack;
-            accessValueStack.setAcceptedProperties(acceptedParams);
+            accessValueStack.setAcceptProperties(acceptParams);
             accessValueStack.setExcludeProperties(excludeParams);
         }
 
     }
 
     protected boolean isAccepted(String paramName) {
-        if (!this.acceptedParams.isEmpty()) {
-            for (Pattern pattern : acceptedParams) {
+        if (!this.acceptParams.isEmpty()) {
+            for (Pattern pattern : acceptParams) {
                 Matcher matcher = pattern.matcher(paramName);
                 if (matcher.matches()) {
                     return true;

File src/java/com/opensymphony/xwork2/ognl/OgnlValueStack.java

        ((OgnlContext)context).getValues().clear();
     }
 
-    public void setAcceptedProperties(Set<Pattern> acceptedProperties) {
-        securityMemberAccess.setAcceptedProperties(acceptedProperties);
+    public void setAcceptProperties(Set<Pattern> acceptedProperties) {
+        securityMemberAccess.setAcceptProperties(acceptedProperties);
     }
 
     public void setExcludeProperties(Set<Pattern> excludeProperties) {

File src/java/com/opensymphony/xwork2/ognl/SecurityMemberAccess.java

 
     private boolean allowStaticMethodAccess;
     Set<Pattern> excludeProperties = Collections.emptySet();
-    Set<Pattern> acceptedProperties = Collections.emptySet();
+    Set<Pattern> acceptProperties = Collections.emptySet();
 
     public SecurityMemberAccess(boolean method) {
         super(false);
     }
 
     protected boolean isAccepted(String paramName) {
-        if (!this.acceptedProperties.isEmpty()) {
-            for (Pattern pattern : acceptedProperties) {
+        if (!this.acceptProperties.isEmpty()) {
+            for (Pattern pattern : acceptProperties) {
                 Matcher matcher = pattern.matcher(paramName);
                 if (matcher.matches()) {
                     return true;
         this.excludeProperties = excludeProperties;
     }
 
-    public void setAcceptedProperties(Set<Pattern> acceptedProperties) {
-        this.acceptedProperties = acceptedProperties;
-    }
-
-    public void clearMemerAccessRestrictions() {
-        this.acceptedProperties.clear();
-        this.excludeProperties.clear();
+    public void setAcceptProperties(Set<Pattern> acceptedProperties) {
+        this.acceptProperties = acceptedProperties;
     }
 }

File src/java/com/opensymphony/xwork2/util/MemberAccessValueStack.java

 public interface MemberAccessValueStack {
     void setExcludeProperties(Set<Pattern> excludeProperties);
 
-    void setAcceptedProperties(Set<Pattern> acceptedProperties);
+    void setAcceptProperties(Set<Pattern> acceptedProperties);
 }

File src/test/com/opensymphony/xwork2/interceptor/ParametersInterceptorTest.java

 
         ActionConfig config = configuration.getRuntimeConfiguration().getActionConfig("", MockConfigurationProvider.PARAM_INTERCEPTOR_ACTION_NAME);
         ParametersInterceptor pi =(ParametersInterceptor) config.getInterceptors().get(0).getInterceptor();
-        pi.setAcceptedParamNames("blah, baz");
+        pi.setAcceptParamNames("blah, baz");
 
         proxy.execute();