struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lukaszlen...@apache.org
Subject struts git commit: WW-4618 Supports custom redirect types which base on ServletRedirectResult
Date Fri, 13 May 2016 05:05:00 GMT
Repository: struts
Updated Branches:
  refs/heads/support-2-3 237432512 -> f052398cd


WW-4618 Supports custom redirect types which base on ServletRedirectResult


Project: http://git-wip-us.apache.org/repos/asf/struts/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/f052398c
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/f052398c
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/f052398c

Branch: refs/heads/support-2-3
Commit: f052398cd255f8fc2ff50cbd0f5828e62a0241a1
Parents: 2374325
Author: Lukasz Lenart <lukaszlenart@apache.org>
Authored: Fri May 13 07:04:50 2016 +0200
Committer: Lukasz Lenart <lukaszlenart@apache.org>
Committed: Fri May 13 07:04:50 2016 +0200

----------------------------------------------------------------------
 .../apache/struts2/interceptor/MessageStorePreResultListener.java | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/f052398c/core/src/main/java/org/apache/struts2/interceptor/MessageStorePreResultListener.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/struts2/interceptor/MessageStorePreResultListener.java
b/core/src/main/java/org/apache/struts2/interceptor/MessageStorePreResultListener.java
index 5415a73..532ec73 100644
--- a/core/src/main/java/org/apache/struts2/interceptor/MessageStorePreResultListener.java
+++ b/core/src/main/java/org/apache/struts2/interceptor/MessageStorePreResultListener.java
@@ -72,8 +72,7 @@ class MessageStorePreResultListener implements PreResultListener {
         try {
             ResultConfig resultConfig = invocation.getProxy().getConfig().getResults().get(resultCode);
             if (resultConfig != null) {
-                isRedirect = ServletRedirectResult.class.getName().equals(resultConfig.getClassName())
-                        || ServletActionRedirectResult.class.getName().equals(resultConfig.getClassName());
+                isRedirect = ServletRedirectResult.class.isAssignableFrom(Class.forName(resultConfig.getClassName()));
             }
         } catch (Exception e) {
             LOG.warn("Cannot read result!", e);


Mime
View raw message