[ 
https://issues.apache.org/jira/browse/WW-3755?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13211667#comment-13211667
 ] 

zhouyanming edited comment on WW-3755 at 2/20/12 4:54 AM:
----------------------------------------------------------

@Maurizio, I want reuse acceptedPattern for security in my action class
{code:java}
                        ValueStack temp = valueStackFactory.createValueStack();
                        temp.set(getEntityName(), entity);
                        Map<String, Object> context = temp.getContext();
                        Map<String, Object> parameters = 
ActionContext.getContext()
                                        .getParameters();
                        try {
                                
ReflectionContextState.setCreatingNullObjects(context, true);
                                
ReflectionContextState.setDenyMethodExecution(context, true);
                                for (Map.Entry<String, Object> entry : 
parameters.entrySet())
                                        if 
(acceptedPattern.matcher(entry.getKey()).matches())
                                                temp.setValue(entry.getKey(), 
entry.getValue());
                        } finally {
                                
ReflectionContextState.setCreatingNullObjects(context, false);
                                
ReflectionContextState.setDenyMethodExecution(context, false);
                        }
{code}
                
      was (Author: quaff):
    @Maurizio, I want reuse acceptedPattern for security in my action class
[code]
                        ValueStack temp = valueStackFactory.createValueStack();
                        temp.set(getEntityName(), entity);
                        Map<String, Object> context = temp.getContext();
                        Map<String, Object> parameters = 
ActionContext.getContext()
                                        .getParameters();
                        try {
                                
ReflectionContextState.setCreatingNullObjects(context, true);
                                
ReflectionContextState.setDenyMethodExecution(context, true);
                                for (Map.Entry<String, Object> entry : 
parameters.entrySet())
                                        if 
(acceptedPattern.matcher(entry.getKey()).matches())
                                                temp.setValue(entry.getKey(), 
entry.getValue());
                        } finally {
                                
ReflectionContextState.setCreatingNullObjects(context, false);
                                
ReflectionContextState.setDenyMethodExecution(context, false);
                        }
[/code]
                  
> make ParametersInterceptor.acceptedParamNames public and static
> ---------------------------------------------------------------
>
>                 Key: WW-3755
>                 URL: https://issues.apache.org/jira/browse/WW-3755
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Core Interceptors
>            Reporter: zhouyanming
>         Attachments: patch.txt
>
>
> let it can be referenced by other classes

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to