You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by lu...@apache.org on 2020/05/03 10:09:51 UTC

[struts] 01/02: Merge branch 'master' into action-context-boost

This is an automated email from the ASF dual-hosted git repository.

lukaszlenart pushed a commit to branch action-context-boost
in repository https://gitbox.apache.org/repos/asf/struts.git

commit b96509f0773e1529b0c4c55a811b458841f0e1a6
Merge: 567ad9c 12539ed
Author: Lukasz Lenart <lu...@apache.org>
AuthorDate: Sun May 3 12:08:29 2020 +0200

    Merge branch 'master' into action-context-boost

 .../AnnotationValidationConfigurationBuilder.java  |  10 --
 .../xwork2/validator/annotations/Validation.java   | 141 ---------------------
 .../xwork2/SimpleAnnotationAction.java             |   6 +-
 .../xwork2/test/AnnotationDataAware.java           |   1 -
 .../opensymphony/xwork2/test/AnnotationUser.java   |  23 ++--
 .../xwork2/test/AnnotationUserMarker.java          |  22 ++--
 .../ValidateAnnotatedMethodOnlyAction.java         |   7 +-
 .../test/java/org/apache/struts2/TestUtils.java    |  94 --------------
 plugins/cdi/src/main/resources/struts-plugin.xml   |   2 -
 .../java/org/apache/struts2/json/JSONResult.java   |  21 ++-
 .../apache/struts2/json/DefaultJSONWriterTest.java |   1 +
 .../apache/struts2/json/JSONInterceptorTest.java   |   1 +
 .../org/apache/struts2/json/JSONPopulatorTest.java |   1 +
 .../org/apache/struts2/json/JSONResultTest.java    |   3 +-
 .../json/JSONValidationInterceptorTest.java        |   1 +
 .../java/org/apache/struts2/util}/TestUtils.java   |  58 +++++----
 .../ClassReloadingXMLWebApplicationContext.java    |   2 +-
 .../org/apache/struts2/spring/SpringConstants.java |   6 +-
 .../struts2/spring/StrutsSpringObjectFactory.java  |   6 +-
 .../config/entities/SpringConstantConfig.java      |   6 +-
 .../spring/src/main/resources/struts-plugin.xml    |   6 +-
 21 files changed, 87 insertions(+), 331 deletions(-)

diff --cc plugins/json/src/main/java/org/apache/struts2/json/JSONResult.java
index 2327244,26c1735..e1b83c7
--- a/plugins/json/src/main/java/org/apache/struts2/json/JSONResult.java
+++ b/plugins/json/src/main/java/org/apache/struts2/json/JSONResult.java
@@@ -18,12 -18,16 +18,13 @@@
   */
  package org.apache.struts2.json;
  
 -import java.io.IOException;
 -import java.util.ArrayList;
 -import java.util.List;
 -import java.util.Set;
 -import java.util.regex.Pattern;
 -
 -import javax.servlet.http.HttpServletRequest;
 -import javax.servlet.http.HttpServletResponse;
 -
 +import com.opensymphony.xwork2.ActionContext;
 +import com.opensymphony.xwork2.ActionInvocation;
+ import com.opensymphony.xwork2.ModelDriven;
 +import com.opensymphony.xwork2.Result;
 +import com.opensymphony.xwork2.inject.Inject;
 +import com.opensymphony.xwork2.util.ValueStack;
 +import com.opensymphony.xwork2.util.WildcardUtil;
  import org.apache.commons.lang3.BooleanUtils;
  import org.apache.commons.lang3.StringUtils;
  import org.apache.logging.log4j.LogManager;
@@@ -232,11 -245,10 +242,10 @@@ public class JSONResult implements Resu
  
      protected void writeToResponse(HttpServletResponse response, String json, boolean gzip) throws IOException {
          JSONUtil.writeJSONToResponse(new SerializationParams(response, getEncoding(), isWrapWithComments(),
 -                json, false, gzip, noCache, statusCode, errorCode, prefix, contentType, wrapPrefix,
 -                wrapSuffix));
 +            json, false, gzip, noCache, statusCode, errorCode, prefix, contentType, wrapPrefix,
 +            wrapSuffix));
      }
  
-     @SuppressWarnings("unchecked")
      protected org.apache.struts2.json.smd.SMD buildSMDObject(ActionInvocation invocation) {
          return new SMDGenerator(findRootObject(invocation), excludeProperties, ignoreInterfaces).generate(invocation);
      }
diff --cc plugins/json/src/test/java/org/apache/struts2/json/JSONInterceptorTest.java
index 48cfcb5,5b9ad8b..20fdad7
--- a/plugins/json/src/test/java/org/apache/struts2/json/JSONInterceptorTest.java
+++ b/plugins/json/src/test/java/org/apache/struts2/json/JSONInterceptorTest.java
@@@ -22,7 -22,9 +22,8 @@@ import java.util.Calendar
  import java.util.List;
  import java.util.Map;
  
 -import org.apache.struts2.StrutsStatics;
  import org.apache.struts2.StrutsTestCase;
+ import org.apache.struts2.util.TestUtils;
  import org.springframework.mock.web.MockHttpServletRequest;
  import org.springframework.mock.web.MockHttpServletResponse;
  import org.springframework.mock.web.MockServletContext;