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/04/27 06:20:57 UTC

[struts] branch WW-5070-root-action-model updated (19c71ff -> d826efb)

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

lukaszlenart pushed a change to branch WW-5070-root-action-model
in repository https://gitbox.apache.org/repos/asf/struts.git.


    from 19c71ff  WW-5070 Adds more sophisticated logic to search for the Root
     new 333f781  WW-5070 Generates a new serialVersionUID
     new 48435c4  WW-5070 Uses else if to avoid double operation on stack
     new d826efb  WW-5070 Re-phrases JavaDoc for setRoot() method

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../src/main/java/org/apache/struts2/json/JSONResult.java     | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)


[struts] 02/03: WW-5070 Uses else if to avoid double operation on stack

Posted by lu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

lukaszlenart pushed a commit to branch WW-5070-root-action-model
in repository https://gitbox.apache.org/repos/asf/struts.git

commit 48435c42095b201f606eb39e86137cb213bfbd4d
Author: Lukasz Lenart <lu...@apache.org>
AuthorDate: Mon Apr 27 08:19:29 2020 +0200

    WW-5070 Uses else if to avoid double operation on stack
---
 plugins/json/src/main/java/org/apache/struts2/json/JSONResult.java | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/plugins/json/src/main/java/org/apache/struts2/json/JSONResult.java b/plugins/json/src/main/java/org/apache/struts2/json/JSONResult.java
index bb35bf2..ba46d96 100644
--- a/plugins/json/src/main/java/org/apache/struts2/json/JSONResult.java
+++ b/plugins/json/src/main/java/org/apache/struts2/json/JSONResult.java
@@ -224,9 +224,8 @@ public class JSONResult implements Result {
             if (rootObject instanceof ModelDriven) {
                 LOG.debug("Action is an instance of ModelDriven, assuming model is on the top of the stack and using it");
                 rootObject = stack.peek();
-            }
-            if (rootObject == null) {
-                LOG.debug("Neither #action nor ModelDriven, peeking up object from top of the stack");
+            } else if (rootObject == null) {
+                LOG.debug("Neither #action nor ModelDriven, peeking up object from the top of the stack");
                 rootObject = stack.peek();
             }
         }


[struts] 01/03: WW-5070 Generates a new serialVersionUID

Posted by lu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

lukaszlenart pushed a commit to branch WW-5070-root-action-model
in repository https://gitbox.apache.org/repos/asf/struts.git

commit 333f7812073a51530407538033fa6ff747470c02
Author: Lukasz Lenart <lu...@apache.org>
AuthorDate: Mon Apr 27 08:17:35 2020 +0200

    WW-5070 Generates a new serialVersionUID
---
 plugins/json/src/main/java/org/apache/struts2/json/JSONResult.java | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/plugins/json/src/main/java/org/apache/struts2/json/JSONResult.java b/plugins/json/src/main/java/org/apache/struts2/json/JSONResult.java
index 5c38e58..bb35bf2 100644
--- a/plugins/json/src/main/java/org/apache/struts2/json/JSONResult.java
+++ b/plugins/json/src/main/java/org/apache/struts2/json/JSONResult.java
@@ -69,6 +69,8 @@ import com.opensymphony.xwork2.util.WildcardUtil;
  */
 public class JSONResult implements Result {
 
+    private static final long serialVersionUID = 233903199020467341L;
+
     private static final Logger LOG = LogManager.getLogger(JSONResult.class);
 
     /**


[struts] 03/03: WW-5070 Re-phrases JavaDoc for setRoot() method

Posted by lu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

lukaszlenart pushed a commit to branch WW-5070-root-action-model
in repository https://gitbox.apache.org/repos/asf/struts.git

commit d826efb9d09d2fc0b09a2eafde5bafc38ff3c6a8
Author: Lukasz Lenart <lu...@apache.org>
AuthorDate: Mon Apr 27 08:20:39 2020 +0200

    WW-5070 Re-phrases JavaDoc for setRoot() method
---
 plugins/json/src/main/java/org/apache/struts2/json/JSONResult.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/plugins/json/src/main/java/org/apache/struts2/json/JSONResult.java b/plugins/json/src/main/java/org/apache/struts2/json/JSONResult.java
index ba46d96..26c1735 100644
--- a/plugins/json/src/main/java/org/apache/struts2/json/JSONResult.java
+++ b/plugins/json/src/main/java/org/apache/struts2/json/JSONResult.java
@@ -296,8 +296,8 @@ public class JSONResult implements Result {
 
     /**
      * Sets the root object to be serialized, defaults to the Action.
-     * If the Action implements {@link ModelDriven}, model will be used instead
-     * and assumptions is the Model was pushed on the top of the stack
+     * If the Action implements {@link ModelDriven}, the Model will be used instead,
+     * with the logic assuming the Model was pushed onto the top of the stack.
      *
      * @param root OGNL expression of root object to be serialized
      */