1. opensymphony
  2. xwork

Commits

tmjee  committed ff92685

- Refactor code to use OgnlContextState's static method instead of using setting into ActionContext context map directly

Issue number:
Obtained from:
Submitted by:
Reviewed by:

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

  • Participants
  • Parent commits 9c3a599
  • Branches master

Comments (0)

Files changed (1)

File java/com/opensymphony/xwork/interceptor/ParametersInterceptor.java

View file
  • Ignore whitespace
             }
 
             if (parameters != null) {
+            	Map contextMap = ac.getContextMap();
                 try {
-                    ac.put(InstantiatingNullHandler.CREATE_NULL_OBJECTS, Boolean.TRUE);
-                    ac.put(XWorkMethodAccessor.DENY_METHOD_EXECUTION, Boolean.TRUE);
-                    ac.put(XWorkConverter.REPORT_CONVERSION_ERRORS, Boolean.TRUE);
+                	OgnlContextState.setCreatingNullObjects(contextMap, true);
+                	OgnlContextState.setDenyMethodExecution(contextMap, true);
+                	OgnlContextState.setReportingConversionErrors(contextMap, true);
 
                     OgnlValueStack stack = ac.getValueStack();
                     setParameters(invocation.getAction(), stack, parameters);
                 } finally {
-                    ac.put(InstantiatingNullHandler.CREATE_NULL_OBJECTS, Boolean.FALSE);
-                    ac.put(XWorkMethodAccessor.DENY_METHOD_EXECUTION, Boolean.FALSE);
-                    ac.put(XWorkConverter.REPORT_CONVERSION_ERRORS, Boolean.FALSE);
+                	OgnlContextState.setCreatingNullObjects(contextMap, false);
+                	OgnlContextState.setDenyMethodExecution(contextMap, false);
+                	OgnlContextState.setReportingConversionErrors(contextMap, false);
                 }
             }
         }