struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lukaszlen...@apache.org
Subject [2/3] git commit: WW-4266 Adds support for IBM JVM to reload resources
Date Sun, 02 Mar 2014 20:06:21 GMT
WW-4266 Adds support for IBM JVM to reload resources


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

Branch: refs/heads/feature/move-jsps-under-webinf
Commit: 9c5177c961fb850b80089ef4113a17d361c23fa6
Parents: 5d0cf8b
Author: Lukasz Lenart <lukaszlenart@apache.org>
Authored: Fri Feb 28 10:11:46 2014 +0100
Committer: Lukasz Lenart <lukaszlenart@apache.org>
Committed: Fri Feb 28 10:11:46 2014 +0100

----------------------------------------------------------------------
 .../com/opensymphony/xwork2/util/LocalizedTextUtil.java     | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/9c5177c9/xwork-core/src/main/java/com/opensymphony/xwork2/util/LocalizedTextUtil.java
----------------------------------------------------------------------
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/util/LocalizedTextUtil.java
b/xwork-core/src/main/java/com/opensymphony/xwork2/util/LocalizedTextUtil.java
index 1f77428..8256cfb 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/util/LocalizedTextUtil.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/util/LocalizedTextUtil.java
@@ -791,7 +791,14 @@ public class LocalizedTextUtil {
                 }
                 if (!reloaded) {
                     bundlesMap.clear();
-                    clearMap(ResourceBundle.class, null, "cacheList");
+                    try {
+                        clearMap(ResourceBundle.class, null, "cacheList");
+                    } catch (NoSuchFieldException e) {
+                        // happens in IBM JVM, that has a different ResourceBundle impl
+                        // it has a 'cache' member
+                        clearMap(ResourceBundle.class, null, "cache");
+                    }
+
                     // now, for the true and utter hack, if we're running in tomcat, clear
                     // it's class loader resource cache as well.
                     clearTomcatCache();


Mime
View raw message