git commit: Simplifies usage of NumberFormat

2014-08-21 Thread lukaszlenart
Repository: struts
Updated Branches:
  refs/heads/feature/locale-aware-converters fe329f502 -> 118b57589


Simplifies usage of NumberFormat


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

Branch: refs/heads/feature/locale-aware-converters
Commit: 118b57589eee1a42c8fd0b24b52d326104bb5af0
Parents: fe329f5
Author: Lukasz Lenart 
Authored: Thu Aug 21 09:22:22 2014 +0200
Committer: Lukasz Lenart 
Committed: Thu Aug 21 09:22:22 2014 +0200

--
 .../xwork2/conversion/string/StringDoubleConverter.java | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/struts/blob/118b5758/xwork-core/src/main/java/com/opensymphony/xwork2/conversion/string/StringDoubleConverter.java
--
diff --git 
a/xwork-core/src/main/java/com/opensymphony/xwork2/conversion/string/StringDoubleConverter.java
 
b/xwork-core/src/main/java/com/opensymphony/xwork2/conversion/string/StringDoubleConverter.java
index f32f518..c0b6ed4 100644
--- 
a/xwork-core/src/main/java/com/opensymphony/xwork2/conversion/string/StringDoubleConverter.java
+++ 
b/xwork-core/src/main/java/com/opensymphony/xwork2/conversion/string/StringDoubleConverter.java
@@ -18,9 +18,8 @@ public class StringDoubleConverter implements 
InternalConverter {
 }
 
 public String convert(Object value) {
-Double doubleValue = (Double) value;
-NumberFormat format = NumberFormat.getInstance(provider.getLocale());
-return format.format(doubleValue);
+NumberFormat format = 
NumberFormat.getNumberInstance(provider.getLocale());
+return format.format(value);
 }
 
 }



[05/12] git commit: Updates as stated in PR#20 comments.

2014-08-21 Thread lukaszlenart
Updates as stated in PR#20 comments.


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

Branch: refs/heads/develop
Commit: 00f424a3f6a36d75bb32bcbd5e9b95971fb88e7a
Parents: d65270b
Author: Luigi Fugaro 
Authored: Wed Jul 30 12:42:47 2014 +0200
Committer: Luigi Fugaro 
Committed: Wed Jul 30 12:42:47 2014 +0200

--
 .../xwork2/util/LocalizedTextUtil.java  | 27 ++--
 1 file changed, 13 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/struts/blob/00f424a3/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 dbaef27..953c6b2 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
@@ -105,7 +105,7 @@ public class LocalizedTextUtil {
  * Clears the internal list of resource bundles.
  */
 public static void clearDefaultResourceBundles() {
-ClassLoader ccl = getThreadCurrentThreadGetContextClassLoader();
+ClassLoader ccl = getCurrentThreadContextClassLoader();
 List bundles = new ArrayList();
 classLoaderMap.put(ccl.hashCode(), bundles);
 bundles.add(0, XWORK_MESSAGES_BUNDLE);
@@ -131,7 +131,7 @@ public class LocalizedTextUtil {
 //make sure this doesn't get added more than once
 ClassLoader ccl = null;
 synchronized (classLoaderMap) {
-ccl = getThreadCurrentThreadGetContextClassLoader();
+ccl = getCurrentThreadContextClassLoader();
 List bundles = classLoaderMap.get(ccl.hashCode());
 if (bundles == null) {
 bundles = new ArrayList();
@@ -143,7 +143,7 @@ public class LocalizedTextUtil {
 }
 
 if (LOG.isDebugEnabled()) {
-LOG.debug("Added default resource bundle '" + resourceBundleName + 
"' to default resource bundles for the following classloader " + 
ccl.toString());
+LOG.debug("Added default resource bundle '{}' to default resource 
bundles for the following classloader '{}'", resourceBundleName, 
ccl.toString());
 }
 }
 
@@ -198,7 +198,7 @@ public class LocalizedTextUtil {
  * @return a localized message based on the specified key, or null if no 
localized message can be found for it
  */
 public static String findDefaultText(String aTextName, Locale locale) {
-List localList = 
classLoaderMap.get(getThreadCurrentThreadGetContextClassLoader().hashCode());
+List localList = 
classLoaderMap.get(getCurrentThreadContextClassLoader().hashCode());
 
 for (String bundleName : localList) {
 ResourceBundle bundle = findResourceBundle(bundleName, locale);
@@ -243,14 +243,12 @@ public class LocalizedTextUtil {
  * @return the bundle, null if not found.
  */
 public static ResourceBundle findResourceBundle(String aBundleName, Locale 
locale) {
-String key = createMissesKey(aBundleName, locale);
 
 ResourceBundle bundle = null;
 
-ClassLoader classLoader = 
getThreadCurrentThreadGetContextClassLoader();
+ClassLoader classLoader = getCurrentThreadContextClassLoader();
+String key = createMissesKey(String.valueOf(classLoader.hashCode()), 
aBundleName, locale);
 try {
-key = classLoader.hashCode()+key;
-
 if (!bundlesMap.containsKey(key)) {
 bundle = ResourceBundle.getBundle(aBundleName, locale, 
classLoader);
 bundlesMap.putIfAbsent(key, bundle);
@@ -280,7 +278,7 @@ public class LocalizedTextUtil {
  */
 public static void setDelegatedClassLoader(final ClassLoader classLoader) {
 synchronized (bundlesMap) {
-
delegatedClassLoaderMap.put(getThreadCurrentThreadGetContextClassLoader().hashCode(),
 classLoader);
+
delegatedClassLoaderMap.put(getCurrentThreadContextClassLoader().hashCode(), 
classLoader);
 }
 }
 
@@ -290,19 +288,20 @@ public class LocalizedTextUtil {
  * @param bundleName
  */
 public static void clearBundle(final String bundleName) {
-
bundlesMap.remove(getThreadCurrentThreadGetContextClassLoader().hashCode() + 
bundleName);
+bundlesMap.remove(getCurrentThreadContextClassLoader().hashCode() + 
bundleName);
 }
 
 
 /**
  * Creates a key to used for lookup/storing in the bundle misses cache.
  *

[09/12] git commit: Added the FIXME notation

2014-08-21 Thread lukaszlenart
Added the FIXME notation


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

Branch: refs/heads/develop
Commit: be7201062b472b3328ed6ae008997ce1d03d19a9
Parents: 939a3e2
Author: Luigi Fugaro 
Authored: Tue Aug 5 15:48:12 2014 +0200
Committer: Luigi Fugaro 
Committed: Tue Aug 5 15:48:12 2014 +0200

--
 .../java/com/opensymphony/xwork2/util/LocalizedTextUtilTest.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/struts/blob/be720106/xwork-core/src/test/java/com/opensymphony/xwork2/util/LocalizedTextUtilTest.java
--
diff --git 
a/xwork-core/src/test/java/com/opensymphony/xwork2/util/LocalizedTextUtilTest.java
 
b/xwork-core/src/test/java/com/opensymphony/xwork2/util/LocalizedTextUtilTest.java
index 2298297..02e493d 100644
--- 
a/xwork-core/src/test/java/com/opensymphony/xwork2/util/LocalizedTextUtilTest.java
+++ 
b/xwork-core/src/test/java/com/opensymphony/xwork2/util/LocalizedTextUtilTest.java
@@ -133,7 +133,7 @@ public class LocalizedTextUtilTest extends XWorkTestCase {
 assertEquals("Error during Action invocation", message);
 }
 
-/*
+/* FIXME
 Stated that property's management does not care about ordering,
 in fact it's held by a Set instead of List,
 you cannot override a previous bundle, thus the test is wrong.



[02/12] git commit: Added pom's version as 2.3.16.4-SNAPSHOT

2014-08-21 Thread lukaszlenart
Added pom's version as 2.3.16.4-SNAPSHOT


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

Branch: refs/heads/develop
Commit: 4586d1f148ef43c7582038306a626144c75d0e49
Parents: 2de0f4b
Author: Luigi Fugaro 
Authored: Tue Jul 29 17:46:04 2014 +0200
Committer: Luigi Fugaro 
Committed: Tue Jul 29 17:46:04 2014 +0200

--
 xwork-core/pom.xml | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/struts/blob/4586d1f1/xwork-core/pom.xml
--
diff --git a/xwork-core/pom.xml b/xwork-core/pom.xml
index 710f635..aac5da0 100644
--- a/xwork-core/pom.xml
+++ b/xwork-core/pom.xml
@@ -10,6 +10,7 @@
 
 org.apache.struts.xwork
 xwork-core
+2.3.16.4-SNAPSHOT
 jar
 XWork: Core
 



[12/12] git commit: WW-4379 Adds posibility to LocalizedTestUtil by ClassLoader

2014-08-21 Thread lukaszlenart
WW-4379 Adds posibility to LocalizedTestUtil by ClassLoader


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

Branch: refs/heads/develop
Commit: b19ffe9d5964b0dd909bf075810075aa1b0a72a0
Parents: d749bb8 685bb1d
Author: Lukasz Lenart 
Authored: Thu Aug 21 09:44:24 2014 +0200
Committer: Lukasz Lenart 
Committed: Thu Aug 21 09:44:24 2014 +0200

--
 .../xwork2/util/LocalizedTextUtil.java  | 83 ++--
 1 file changed, 41 insertions(+), 42 deletions(-)
--




[08/12] git commit: Updates as stated in PR#20 comments - synchronized code block inside addDefaultResourceBundle method using XWORK_MESSAGES_BUNDLE.

2014-08-21 Thread lukaszlenart
Updates as stated in PR#20 comments - synchronized code block inside 
addDefaultResourceBundle method using XWORK_MESSAGES_BUNDLE.


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

Branch: refs/heads/develop
Commit: 939a3e20400d915de809fbd0e304c1bd2fac5813
Parents: 9254aaa
Author: Luigi Fugaro 
Authored: Thu Jul 31 12:08:30 2014 +0200
Committer: Luigi Fugaro 
Committed: Thu Jul 31 12:08:30 2014 +0200

--
 .../main/java/com/opensymphony/xwork2/util/LocalizedTextUtil.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/struts/blob/939a3e20/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 4e9d4eb..3219450 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
@@ -130,7 +130,7 @@ public class LocalizedTextUtil {
 public static void addDefaultResourceBundle(String resourceBundleName) {
 //make sure this doesn't get added more than once
 ClassLoader ccl = null;
-synchronized (classLoaderMap) {
+synchronized (XWORK_MESSAGES_BUNDLE) {
 ccl = getCurrentThreadContextClassLoader();
 Set bundles = classLoaderMap.get(ccl.hashCode());
 if (bundles == null) {



[10/12] git commit: Restored the ordering feature.

2014-08-21 Thread lukaszlenart
Restored the ordering feature.


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

Branch: refs/heads/develop
Commit: c74f283626ac0c08f66e52b6102fcaa3d6614903
Parents: be72010
Author: Luigi Fugaro 
Authored: Mon Aug 18 16:25:42 2014 +0200
Committer: Luigi Fugaro 
Committed: Mon Aug 18 16:25:42 2014 +0200

--
 .../opensymphony/xwork2/util/LocalizedTextUtil.java  | 15 ---
 1 file changed, 8 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/struts/blob/c74f2836/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 3219450..9aad928 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
@@ -86,7 +86,7 @@ import java.util.concurrent.ConcurrentMap;
  */
 public class LocalizedTextUtil {
 
-private static final ConcurrentMap> classLoaderMap = 
new ConcurrentHashMap>();
+private static final ConcurrentMap> classLoaderMap = 
new ConcurrentHashMap>();
 private static final Logger LOG = 
LoggerFactory.getLogger(LocalizedTextUtil.class);
 private static boolean reloadBundles = false;
 private static final ConcurrentMap bundlesMap = 
new ConcurrentHashMap();
@@ -106,9 +106,9 @@ public class LocalizedTextUtil {
  */
 public static void clearDefaultResourceBundles() {
 ClassLoader ccl = getCurrentThreadContextClassLoader();
-Set bundles = new HashSet();
+List bundles = new ArrayList();
 classLoaderMap.put(ccl.hashCode(), bundles);
-bundles.add(XWORK_MESSAGES_BUNDLE);
+bundles.add(0, XWORK_MESSAGES_BUNDLE);
 }
 
 /**
@@ -132,13 +132,14 @@ public class LocalizedTextUtil {
 ClassLoader ccl = null;
 synchronized (XWORK_MESSAGES_BUNDLE) {
 ccl = getCurrentThreadContextClassLoader();
-Set bundles = classLoaderMap.get(ccl.hashCode());
+List bundles = classLoaderMap.get(ccl.hashCode());
 if (bundles == null) {
-bundles = new HashSet();
+bundles = new ArrayList();
 classLoaderMap.put(ccl.hashCode(), bundles);
 bundles.add(XWORK_MESSAGES_BUNDLE);
 }
-bundles.add(resourceBundleName);
+bundles.remove(resourceBundleName);
+bundles.add(0, resourceBundleName);
 }
 
 if (LOG.isDebugEnabled()) {
@@ -197,7 +198,7 @@ public class LocalizedTextUtil {
  * @return a localized message based on the specified key, or null if no 
localized message can be found for it
  */
 public static String findDefaultText(String aTextName, Locale locale) {
-Set localList = 
classLoaderMap.get(getCurrentThreadContextClassLoader().hashCode());
+List localList = 
classLoaderMap.get(Thread.currentThread().getContextClassLoader().hashCode());
 
 for (String bundleName : localList) {
 ResourceBundle bundle = findResourceBundle(bundleName, locale);



[07/12] git commit: Updates as stated in PR#20 comments - removed test method testDefaultMessageOverride.

2014-08-21 Thread lukaszlenart
Updates as stated in PR#20 comments - removed test method 
testDefaultMessageOverride.


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

Branch: refs/heads/develop
Commit: 9254aaaefefbf0cc523c1bd710b60b9b815825e2
Parents: da9afaf
Author: Luigi Fugaro 
Authored: Wed Jul 30 14:29:47 2014 +0200
Committer: Luigi Fugaro 
Committed: Wed Jul 30 14:29:47 2014 +0200

--
 .../com/opensymphony/xwork2/util/LocalizedTextUtilTest.java| 6 ++
 1 file changed, 6 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/struts/blob/9254aaae/xwork-core/src/test/java/com/opensymphony/xwork2/util/LocalizedTextUtilTest.java
--
diff --git 
a/xwork-core/src/test/java/com/opensymphony/xwork2/util/LocalizedTextUtilTest.java
 
b/xwork-core/src/test/java/com/opensymphony/xwork2/util/LocalizedTextUtilTest.java
index bac41ba..2298297 100644
--- 
a/xwork-core/src/test/java/com/opensymphony/xwork2/util/LocalizedTextUtilTest.java
+++ 
b/xwork-core/src/test/java/com/opensymphony/xwork2/util/LocalizedTextUtilTest.java
@@ -133,6 +133,11 @@ public class LocalizedTextUtilTest extends XWorkTestCase {
 assertEquals("Error during Action invocation", message);
 }
 
+/*
+Stated that property's management does not care about ordering,
+in fact it's held by a Set instead of List,
+you cannot override a previous bundle, thus the test is wrong.
+
 public void testDefaultMessageOverride() throws Exception {
 String message = 
LocalizedTextUtil.findDefaultText(XWorkMessages.ACTION_EXECUTION_ERROR, 
Locale.getDefault());
 assertEquals("Error during Action invocation", message);
@@ -142,6 +147,7 @@ public class LocalizedTextUtilTest extends XWorkTestCase {
 message = 
LocalizedTextUtil.findDefaultText(XWorkMessages.ACTION_EXECUTION_ERROR, 
Locale.getDefault());
 assertEquals("Testing resource bundle override", message);
 }
+*/
 
 public void testFindTextInChildProperty() throws Exception {
 ModelDriven action = new ModelDrivenAction2();



[01/12] git commit: This update enables struts to be used as JBoss AS 7/WildFly 8/JBoss EAP 6 module.

2014-08-21 Thread lukaszlenart
Repository: struts
Updated Branches:
  refs/heads/develop d749bb8f7 -> b19ffe9d5


This update enables struts to be used as JBoss AS 7/WildFly 8/JBoss EAP 6 
module.


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

Branch: refs/heads/develop
Commit: 2de0f4b5b10627c53f85a895d310fdaa53c0d2b0
Parents: d2663ce
Author: Luigi Fugaro 
Authored: Tue Jul 29 17:44:28 2014 +0200
Committer: Luigi Fugaro 
Committed: Tue Jul 29 17:44:28 2014 +0200

--
 .../xwork2/util/LocalizedTextUtil.java  | 51 +++-
 1 file changed, 27 insertions(+), 24 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/struts/blob/2de0f4b5/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 8256cfb..dae9925 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
@@ -38,7 +38,6 @@ import java.text.MessageFormat;
 import java.util.*;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentMap;
-import java.util.concurrent.CopyOnWriteArrayList;
 
 
 /**
@@ -87,7 +86,8 @@ import java.util.concurrent.CopyOnWriteArrayList;
  */
 public class LocalizedTextUtil {
 
-private static final List DEFAULT_RESOURCE_BUNDLES = new 
CopyOnWriteArrayList();
+private static final ConcurrentMap> classLoaderMap = 
new ConcurrentHashMap>();
+//private static final List DEFAULT_RESOURCE_BUNDLES = new 
CopyOnWriteArrayList();
 private static final Logger LOG = 
LoggerFactory.getLogger(LocalizedTextUtil.class);
 private static boolean reloadBundles = false;
 private static final ResourceBundle EMPTY_BUNDLE = new 
EmptyResourceBundle();
@@ -96,6 +96,7 @@ public class LocalizedTextUtil {
 
 private static ClassLoader delegatedClassLoader;
 private static final String RELOADED = 
"com.opensymphony.xwork2.util.LocalizedTextUtil.reloaded";
+private static final String XWORK_MESSAGES_BUNDLE = 
"com/opensymphony/xwork2/xwork-messages";
 
 static {
 clearDefaultResourceBundles();
@@ -106,16 +107,12 @@ public class LocalizedTextUtil {
  * Clears the internal list of resource bundles.
  */
 public static void clearDefaultResourceBundles() {
-if (DEFAULT_RESOURCE_BUNDLES != null) {
-synchronized (DEFAULT_RESOURCE_BUNDLES) {
-DEFAULT_RESOURCE_BUNDLES.clear();
-
DEFAULT_RESOURCE_BUNDLES.add("com/opensymphony/xwork2/xwork-messages");
-}
-} else {
-synchronized (DEFAULT_RESOURCE_BUNDLES) {
-
DEFAULT_RESOURCE_BUNDLES.add("com/opensymphony/xwork2/xwork-messages");
-}
-}
+//DEFAULT_RESOURCE_BUNDLES.clear();
+//DEFAULT_RESOURCE_BUNDLES.add(XWORK_MESSAGES_BUNDLE);
+ClassLoader ccl = Thread.currentThread().getContextClassLoader();
+List bundles = new ArrayList();
+classLoaderMap.put(ccl.hashCode(), bundles);
+bundles.add(0, XWORK_MESSAGES_BUNDLE);
 }
 
 /**
@@ -136,13 +133,20 @@ public class LocalizedTextUtil {
  */
 public static void addDefaultResourceBundle(String resourceBundleName) {
 //make sure this doesn't get added more than once
-synchronized (DEFAULT_RESOURCE_BUNDLES) {
-DEFAULT_RESOURCE_BUNDLES.remove(resourceBundleName);
-DEFAULT_RESOURCE_BUNDLES.add(0, resourceBundleName);
+synchronized (classLoaderMap) {
+ClassLoader ccl = Thread.currentThread().getContextClassLoader();
+List bundles = classLoaderMap.get(ccl.hashCode());
+if (bundles == null) {
+bundles = new ArrayList();
+classLoaderMap.put(ccl.hashCode(), bundles);
+bundles.add(XWORK_MESSAGES_BUNDLE);
+}
+bundles.remove(resourceBundleName);
+bundles.add(0, resourceBundleName);
 }
 
 if (LOG.isDebugEnabled()) {
-LOG.debug("Added default resource bundle '" + resourceBundleName + 
"' to default resource bundles = " + DEFAULT_RESOURCE_BUNDLES);
+//LOG.debug("Added default resource bundle '" + resourceBundleName 
+ "' to default resource bundles = " + DEFAULT_RESOURCE_BUNDLES);
 }
 }
 
@@ -197,7 +201,7 @@ public class LocalizedTextUtil {
  * @return a localized message based on the spec

[06/12] git commit: Updates as stated in PR#20 comments.

2014-08-21 Thread lukaszlenart
Updates as stated in PR#20 comments.


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

Branch: refs/heads/develop
Commit: da9afaf84e367f0e195cc8f221778eb798595fb6
Parents: 00f424a
Author: Luigi Fugaro 
Authored: Wed Jul 30 14:29:03 2014 +0200
Committer: Luigi Fugaro 
Committed: Wed Jul 30 14:29:03 2014 +0200

--
 .../opensymphony/xwork2/util/LocalizedTextUtil.java  | 15 +++
 1 file changed, 7 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/struts/blob/da9afaf8/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 953c6b2..4e9d4eb 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
@@ -86,7 +86,7 @@ import java.util.concurrent.ConcurrentMap;
  */
 public class LocalizedTextUtil {
 
-private static final ConcurrentMap> classLoaderMap = 
new ConcurrentHashMap>();
+private static final ConcurrentMap> classLoaderMap = 
new ConcurrentHashMap>();
 private static final Logger LOG = 
LoggerFactory.getLogger(LocalizedTextUtil.class);
 private static boolean reloadBundles = false;
 private static final ConcurrentMap bundlesMap = 
new ConcurrentHashMap();
@@ -106,9 +106,9 @@ public class LocalizedTextUtil {
  */
 public static void clearDefaultResourceBundles() {
 ClassLoader ccl = getCurrentThreadContextClassLoader();
-List bundles = new ArrayList();
+Set bundles = new HashSet();
 classLoaderMap.put(ccl.hashCode(), bundles);
-bundles.add(0, XWORK_MESSAGES_BUNDLE);
+bundles.add(XWORK_MESSAGES_BUNDLE);
 }
 
 /**
@@ -132,14 +132,13 @@ public class LocalizedTextUtil {
 ClassLoader ccl = null;
 synchronized (classLoaderMap) {
 ccl = getCurrentThreadContextClassLoader();
-List bundles = classLoaderMap.get(ccl.hashCode());
+Set bundles = classLoaderMap.get(ccl.hashCode());
 if (bundles == null) {
-bundles = new ArrayList();
+bundles = new HashSet();
 classLoaderMap.put(ccl.hashCode(), bundles);
 bundles.add(XWORK_MESSAGES_BUNDLE);
 }
-bundles.remove(resourceBundleName);
-bundles.add(0, resourceBundleName);
+bundles.add(resourceBundleName);
 }
 
 if (LOG.isDebugEnabled()) {
@@ -198,7 +197,7 @@ public class LocalizedTextUtil {
  * @return a localized message based on the specified key, or null if no 
localized message can be found for it
  */
 public static String findDefaultText(String aTextName, Locale locale) {
-List localList = 
classLoaderMap.get(getCurrentThreadContextClassLoader().hashCode());
+Set localList = 
classLoaderMap.get(getCurrentThreadContextClassLoader().hashCode());
 
 for (String bundleName : localList) {
 ResourceBundle bundle = findResourceBundle(bundleName, locale);



[11/12] git commit: Previous commit restored the ordering feature, thus testFindTextInChildProperty test also has been restored.

2014-08-21 Thread lukaszlenart
Previous commit restored the ordering feature, thus testFindTextInChildProperty 
test also has been restored.


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

Branch: refs/heads/develop
Commit: 685bb1d069623d59103187d7fee4671e31c353cb
Parents: c74f283
Author: Luigi Fugaro 
Authored: Mon Aug 18 16:27:13 2014 +0200
Committer: Luigi Fugaro 
Committed: Mon Aug 18 16:27:13 2014 +0200

--
 .../com/opensymphony/xwork2/util/LocalizedTextUtilTest.java| 6 --
 1 file changed, 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/struts/blob/685bb1d0/xwork-core/src/test/java/com/opensymphony/xwork2/util/LocalizedTextUtilTest.java
--
diff --git 
a/xwork-core/src/test/java/com/opensymphony/xwork2/util/LocalizedTextUtilTest.java
 
b/xwork-core/src/test/java/com/opensymphony/xwork2/util/LocalizedTextUtilTest.java
index 02e493d..bac41ba 100644
--- 
a/xwork-core/src/test/java/com/opensymphony/xwork2/util/LocalizedTextUtilTest.java
+++ 
b/xwork-core/src/test/java/com/opensymphony/xwork2/util/LocalizedTextUtilTest.java
@@ -133,11 +133,6 @@ public class LocalizedTextUtilTest extends XWorkTestCase {
 assertEquals("Error during Action invocation", message);
 }
 
-/* FIXME
-Stated that property's management does not care about ordering,
-in fact it's held by a Set instead of List,
-you cannot override a previous bundle, thus the test is wrong.
-
 public void testDefaultMessageOverride() throws Exception {
 String message = 
LocalizedTextUtil.findDefaultText(XWorkMessages.ACTION_EXECUTION_ERROR, 
Locale.getDefault());
 assertEquals("Error during Action invocation", message);
@@ -147,7 +142,6 @@ public class LocalizedTextUtilTest extends XWorkTestCase {
 message = 
LocalizedTextUtil.findDefaultText(XWorkMessages.ACTION_EXECUTION_ERROR, 
Locale.getDefault());
 assertEquals("Testing resource bundle override", message);
 }
-*/
 
 public void testFindTextInChildProperty() throws Exception {
 ModelDriven action = new ModelDrivenAction2();



[04/12] git commit: Deleted internal versioning.

2014-08-21 Thread lukaszlenart
Deleted internal versioning.


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

Branch: refs/heads/develop
Commit: d65270b9bb061bf16072e706f53060d3d9ab78ca
Parents: c826d97
Author: Luigi Fugaro 
Authored: Wed Jul 30 11:42:46 2014 +0200
Committer: Luigi Fugaro 
Committed: Wed Jul 30 11:42:46 2014 +0200

--
 xwork-core/pom.xml | 1 -
 1 file changed, 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/struts/blob/d65270b9/xwork-core/pom.xml
--
diff --git a/xwork-core/pom.xml b/xwork-core/pom.xml
index aac5da0..710f635 100644
--- a/xwork-core/pom.xml
+++ b/xwork-core/pom.xml
@@ -10,7 +10,6 @@
 
 org.apache.struts.xwork
 xwork-core
-2.3.16.4-SNAPSHOT
 jar
 XWork: Core
 



[03/12] git commit: Removed unused code, comments and variables. Also, added delegatedClassLoaderMap to handle delegatedClassLoader as per Tomcat.

2014-08-21 Thread lukaszlenart
Removed unused code, comments and variables. Also, added 
delegatedClassLoaderMap to handle delegatedClassLoader as per Tomcat.


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

Branch: refs/heads/develop
Commit: c826d97cafafc9ce54e15745b23cd211e233c2fa
Parents: 4586d1f
Author: Luigi Fugaro 
Authored: Tue Jul 29 18:44:50 2014 +0200
Committer: Luigi Fugaro 
Committed: Tue Jul 29 18:44:50 2014 +0200

--
 .../xwork2/util/LocalizedTextUtil.java  | 45 +---
 1 file changed, 21 insertions(+), 24 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/struts/blob/c826d97c/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 dae9925..dbaef27 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
@@ -87,14 +87,12 @@ import java.util.concurrent.ConcurrentMap;
 public class LocalizedTextUtil {
 
 private static final ConcurrentMap> classLoaderMap = 
new ConcurrentHashMap>();
-//private static final List DEFAULT_RESOURCE_BUNDLES = new 
CopyOnWriteArrayList();
 private static final Logger LOG = 
LoggerFactory.getLogger(LocalizedTextUtil.class);
 private static boolean reloadBundles = false;
-private static final ResourceBundle EMPTY_BUNDLE = new 
EmptyResourceBundle();
 private static final ConcurrentMap bundlesMap = 
new ConcurrentHashMap();
 private static final ConcurrentMap 
messageFormats = new ConcurrentHashMap();
+private static final ConcurrentMap 
delegatedClassLoaderMap = new ConcurrentHashMap();
 
-private static ClassLoader delegatedClassLoader;
 private static final String RELOADED = 
"com.opensymphony.xwork2.util.LocalizedTextUtil.reloaded";
 private static final String XWORK_MESSAGES_BUNDLE = 
"com/opensymphony/xwork2/xwork-messages";
 
@@ -107,9 +105,7 @@ public class LocalizedTextUtil {
  * Clears the internal list of resource bundles.
  */
 public static void clearDefaultResourceBundles() {
-//DEFAULT_RESOURCE_BUNDLES.clear();
-//DEFAULT_RESOURCE_BUNDLES.add(XWORK_MESSAGES_BUNDLE);
-ClassLoader ccl = Thread.currentThread().getContextClassLoader();
+ClassLoader ccl = getThreadCurrentThreadGetContextClassLoader();
 List bundles = new ArrayList();
 classLoaderMap.put(ccl.hashCode(), bundles);
 bundles.add(0, XWORK_MESSAGES_BUNDLE);
@@ -133,8 +129,9 @@ public class LocalizedTextUtil {
  */
 public static void addDefaultResourceBundle(String resourceBundleName) {
 //make sure this doesn't get added more than once
+ClassLoader ccl = null;
 synchronized (classLoaderMap) {
-ClassLoader ccl = Thread.currentThread().getContextClassLoader();
+ccl = getThreadCurrentThreadGetContextClassLoader();
 List bundles = classLoaderMap.get(ccl.hashCode());
 if (bundles == null) {
 bundles = new ArrayList();
@@ -146,7 +143,7 @@ public class LocalizedTextUtil {
 }
 
 if (LOG.isDebugEnabled()) {
-//LOG.debug("Added default resource bundle '" + resourceBundleName 
+ "' to default resource bundles = " + DEFAULT_RESOURCE_BUNDLES);
+LOG.debug("Added default resource bundle '" + resourceBundleName + 
"' to default resource bundles for the following classloader " + 
ccl.toString());
 }
 }
 
@@ -201,7 +198,7 @@ public class LocalizedTextUtil {
  * @return a localized message based on the specified key, or null if no 
localized message can be found for it
  */
 public static String findDefaultText(String aTextName, Locale locale) {
-List localList = 
classLoaderMap.get(Thread.currentThread().getContextClassLoader().hashCode());
+List localList = 
classLoaderMap.get(getThreadCurrentThreadGetContextClassLoader().hashCode());
 
 for (String bundleName : localList) {
 ResourceBundle bundle = findResourceBundle(bundleName, locale);
@@ -240,8 +237,6 @@ public class LocalizedTextUtil {
  * Finds the given resorce bundle by it's name.
  * 
  * Will use Thread.currentThread().getContextClassLoader() as 
the classloader.
- * If {@link #delegatedClassLoader} is defined and the bundle cannot be 
found the current
- * classloader it will delegate to that.
  *
  * @

[2/2] git commit: WW-4387 solves problem with preselcting multiple options in when key is not a string

2014-08-21 Thread lukaszlenart
WW-4387 solves problem with preselcting multiple options in  when 
key is not a string


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

Branch: refs/heads/develop
Commit: bd56838f47fb22bb02c55c2d1b6440d2dbb3d71b
Parents: b19ffe9 0c63de2
Author: Lukasz Lenart 
Authored: Thu Aug 21 15:14:10 2014 +0200
Committer: Lukasz Lenart 
Committed: Thu Aug 21 15:14:10 2014 +0200

--
 .../main/resources/template/simple/optgroup.ftl |  2 +-
 .../struts2/views/jsp/ui/OptGroupTest.java  | 31 ++
 .../apache/struts2/views/jsp/ui/OptGroup-7.txt  | 43 
 3 files changed, 75 insertions(+), 1 deletion(-)
--




[1/2] git commit: WW-4387 - using original key type for contains method.

2014-08-21 Thread lukaszlenart
Repository: struts
Updated Branches:
  refs/heads/develop b19ffe9d5 -> bd56838f4


WW-4387 - using original key type for contains method.


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

Branch: refs/heads/develop
Commit: 0c63de2fa91a76e989848d66afc40c4e50d18622
Parents: d749bb8
Author: Aleksandr Mashchenko 
Authored: Mon Aug 18 19:17:13 2014 +0300
Committer: Aleksandr Mashchenko 
Committed: Mon Aug 18 19:17:13 2014 +0300

--
 .../main/resources/template/simple/optgroup.ftl |  2 +-
 .../struts2/views/jsp/ui/OptGroupTest.java  | 31 ++
 .../apache/struts2/views/jsp/ui/OptGroup-7.txt  | 43 
 3 files changed, 75 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/struts/blob/0c63de2f/core/src/main/resources/template/simple/optgroup.ftl
--
diff --git a/core/src/main/resources/template/simple/optgroup.ftl 
b/core/src/main/resources/template/simple/optgroup.ftl
index 8f704f2..c2a15a3 100644
--- a/core/src/main/resources/template/simple/optgroup.ftl
+++ b/core/src/main/resources/template/simple/optgroup.ftl
@@ -39,7 +39,7 @@
<#assign 
tmpValue=stack.findValue(optGroupInternalListUiBean.parameters.listValue) />
<#assign tmpKeyStr = tmpKey.toString() />

+   <#if tag.contains(parameters.nameValue, tmpKey) == true>
selected="selected"

>${tmpValue?html}

http://git-wip-us.apache.org/repos/asf/struts/blob/0c63de2f/core/src/test/java/org/apache/struts2/views/jsp/ui/OptGroupTest.java
--
diff --git 
a/core/src/test/java/org/apache/struts2/views/jsp/ui/OptGroupTest.java 
b/core/src/test/java/org/apache/struts2/views/jsp/ui/OptGroupTest.java
index bee7ade..308abca 100644
--- a/core/src/test/java/org/apache/struts2/views/jsp/ui/OptGroupTest.java
+++ b/core/src/test/java/org/apache/struts2/views/jsp/ui/OptGroupTest.java
@@ -121,6 +121,37 @@ public class OptGroupTest extends AbstractUITagTest {
 verify(SelectTag.class.getResource("OptGroup-3.txt"));
 }
 
+public void testOptGroupWithMultipleSelectIntKey() throws Exception {
+  SelectTag selectTag = new SelectTag();
+  selectTag.setMultiple("true");
+  selectTag.setName("mySelection");
+  selectTag.setLabel("My Selection");
+  selectTag.setList("%{#{1:'one',2:'two',3:'three'}}");
+  selectTag.setValue("%{{22,12,2}}");
+
+  OptGroupTag optGroupTag1 = new OptGroupTag();
+  optGroupTag1.setLabel("My Label 1");
+  optGroupTag1.setList("%{#{11:'aaa',12:'bbb',13:'ccc'}}");
+
+  OptGroupTag optGroupTag2 = new OptGroupTag();
+  optGroupTag2.setLabel("My Label 2");
+  optGroupTag2.setList("%{#{21:'ddd',22:'eee',23:'fff'}}");
+
+  selectTag.setPageContext(pageContext);
+  selectTag.doStartTag();
+  optGroupTag1.setPageContext(pageContext);
+  optGroupTag1.doStartTag();
+  optGroupTag1.doEndTag();
+  optGroupTag2.setPageContext(pageContext);
+  optGroupTag2.doStartTag();
+  optGroupTag2.doEndTag();
+  selectTag.doEndTag();
+
+
+  //System.out.println(writer.toString());
+  verify(SelectTag.class.getResource("OptGroup-7.txt"));
+  }
+
 public void testOptGroupNumbers() throws Exception {

((TestAction)action).setMap(new LinkedHashMap() {{

http://git-wip-us.apache.org/repos/asf/struts/blob/0c63de2f/core/src/test/resources/org/apache/struts2/views/jsp/ui/OptGroup-7.txt
--
diff --git 
a/core/src/test/resources/org/apache/struts2/views/jsp/ui/OptGroup-7.txt 
b/core/src/test/resources/org/apache/struts2/views/jsp/ui/OptGroup-7.txt
new file mode 100644
index 000..9a31727
--- /dev/null
+++ b/core/src/test/resources/org/apache/struts2/views/jsp/ui/OptGroup-7.txt
@@ -0,0 +1,43 @@
+
+My 
Selection:
+
+
+one
+two
+three
+
+
+
+   aaa
+   
+   bbb
+   
+   ccc
+   
+
+
+
+   ddd
+   
+   eee
+   
+   fff
+   
+
+
+
+
+
+
\ No newline at end of file



git commit: WW-4389 Solves typo in error message and introduces new message variable

2014-08-21 Thread lukaszlenart
Repository: struts
Updated Branches:
  refs/heads/develop bd56838f4 -> 91225ce17


WW-4389 Solves typo in error message and introduces new message variable


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

Branch: refs/heads/develop
Commit: 91225ce17a5e135c303c55a6c92694e5ebed7f8e
Parents: bd56838
Author: Lukasz Lenart 
Authored: Thu Aug 21 15:53:30 2014 +0200
Committer: Lukasz Lenart 
Committed: Thu Aug 21 15:53:30 2014 +0200

--
 .../org/apache/struts2/interceptor/FileUploadInterceptor.java | 7 ++-
 .../resources/org/apache/struts2/struts-messages.properties   | 2 +-
 2 files changed, 7 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/struts/blob/91225ce1/core/src/main/java/org/apache/struts2/interceptor/FileUploadInterceptor.java
--
diff --git 
a/core/src/main/java/org/apache/struts2/interceptor/FileUploadInterceptor.java 
b/core/src/main/java/org/apache/struts2/interceptor/FileUploadInterceptor.java
index 05f4946..0ce91bc 100644
--- 
a/core/src/main/java/org/apache/struts2/interceptor/FileUploadInterceptor.java
+++ 
b/core/src/main/java/org/apache/struts2/interceptor/FileUploadInterceptor.java
@@ -40,6 +40,7 @@ import 
org.apache.struts2.dispatcher.multipart.MultiPartRequestWrapper;
 
 import javax.servlet.http.HttpServletRequest;
 import java.io.File;
+import java.text.NumberFormat;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
@@ -350,7 +351,7 @@ public class FileUploadInterceptor extends 
AbstractInterceptor {
 LOG.warn(errMsg);
 }
 } else if (maximumSize != null && maximumSize < file.length()) {
-String errMsg = getTextMessage(action, 
"struts.messages.error.file.too.large", new String[]{inputName, filename, 
file.getName(), "" + file.length()});
+String errMsg = getTextMessage(action, 
"struts.messages.error.file.too.large", new String[]{inputName, filename, 
file.getName(), "" + file.length(), getMaximumSizeStr(action)});
 if (validation != null) {
 validation.addFieldError(inputName, errMsg);
 }
@@ -383,6 +384,10 @@ public class FileUploadInterceptor extends 
AbstractInterceptor {
 return fileIsAcceptable;
 }
 
+private String getMaximumSizeStr(Object action) {
+return 
NumberFormat.getNumberInstance(getLocaleProvider(action).getLocale()).format(maximumSize);
+}
+
 /**
  * @param extensionCollection - Collection of extensions (all lowercase).
  * @param filename- filename to check.

http://git-wip-us.apache.org/repos/asf/struts/blob/91225ce1/core/src/main/resources/org/apache/struts2/struts-messages.properties
--
diff --git 
a/core/src/main/resources/org/apache/struts2/struts-messages.properties 
b/core/src/main/resources/org/apache/struts2/struts-messages.properties
index 43d76a6..b25cefb 100644
--- a/core/src/main/resources/org/apache/struts2/struts-messages.properties
+++ b/core/src/main/resources/org/apache/struts2/struts-messages.properties
@@ -27,7 +27,7 @@ struts.messages.invalid.file=Could not find a Filename for 
{0}. Verify that a va
 struts.messages.invalid.content.type=Could not find a Content-Type for {0}. 
Verify that a valid file was submitted.
 struts.messages.removing.file=Removing file {0} {1}
 struts.messages.error.uploading=Error uploading: {0}
-struts.messages.error.file.too.large=The file is to large to be uploaded: {0} 
"{1}" "{2}" {3}
+struts.messages.error.file.too.large=File {0} is too large to be uploaded. 
Maximum allowed size is {4} bytes?
 struts.messages.error.content.type.not.allowed=Content-Type not allowed: {0} 
"{1}" "{2}" {3}
 struts.messages.error.file.extension.not.allowed=File extension not allowed: 
{0} "{1}" "{2}" {3}
 



git commit: WW-4389 Replaces question mark with exclamation

2014-08-21 Thread lukaszlenart
Repository: struts
Updated Branches:
  refs/heads/develop 91225ce17 -> 6d62aaedb


WW-4389 Replaces question mark with exclamation


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

Branch: refs/heads/develop
Commit: 6d62aaedb4afcf593eba0ad6ccf73fee2078cef7
Parents: 91225ce
Author: Lukasz Lenart 
Authored: Thu Aug 21 20:28:14 2014 +0200
Committer: Lukasz Lenart 
Committed: Thu Aug 21 20:28:14 2014 +0200

--
 .../main/resources/org/apache/struts2/struts-messages.properties   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/struts/blob/6d62aaed/core/src/main/resources/org/apache/struts2/struts-messages.properties
--
diff --git 
a/core/src/main/resources/org/apache/struts2/struts-messages.properties 
b/core/src/main/resources/org/apache/struts2/struts-messages.properties
index b25cefb..e4e5a21 100644
--- a/core/src/main/resources/org/apache/struts2/struts-messages.properties
+++ b/core/src/main/resources/org/apache/struts2/struts-messages.properties
@@ -27,7 +27,7 @@ struts.messages.invalid.file=Could not find a Filename for 
{0}. Verify that a va
 struts.messages.invalid.content.type=Could not find a Content-Type for {0}. 
Verify that a valid file was submitted.
 struts.messages.removing.file=Removing file {0} {1}
 struts.messages.error.uploading=Error uploading: {0}
-struts.messages.error.file.too.large=File {0} is too large to be uploaded. 
Maximum allowed size is {4} bytes?
+struts.messages.error.file.too.large=File {0} is too large to be uploaded. 
Maximum allowed size is {4} bytes!
 struts.messages.error.content.type.not.allowed=Content-Type not allowed: {0} 
"{1}" "{2}" {3}
 struts.messages.error.file.extension.not.allowed=File extension not allowed: 
{0} "{1}" "{2}" {3}
 



git commit: WW-4391 FreemarkerResult uses response content encoding in first place

2014-08-21 Thread lukaszlenart
Repository: struts
Updated Branches:
  refs/heads/develop 6d62aaedb -> 1a034053b


WW-4391 FreemarkerResult uses response content encoding in first place


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

Branch: refs/heads/develop
Commit: 1a034053bcf82ce05fe21680ca658ddae03bb159
Parents: 6d62aae
Author: Lukasz Lenart 
Authored: Thu Aug 21 20:58:10 2014 +0200
Committer: Lukasz Lenart 
Committed: Thu Aug 21 20:58:10 2014 +0200

--
 .../org/apache/struts2/views/freemarker/FreemarkerResult.java   | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/struts/blob/1a034053/core/src/main/java/org/apache/struts2/views/freemarker/FreemarkerResult.java
--
diff --git 
a/core/src/main/java/org/apache/struts2/views/freemarker/FreemarkerResult.java 
b/core/src/main/java/org/apache/struts2/views/freemarker/FreemarkerResult.java
index 3ded53b..95e4073 100644
--- 
a/core/src/main/java/org/apache/struts2/views/freemarker/FreemarkerResult.java
+++ 
b/core/src/main/java/org/apache/struts2/views/freemarker/FreemarkerResult.java
@@ -343,7 +343,10 @@ public class FreemarkerResult extends StrutsResultSupport {
 contentType = "text/html";
 }
 
-String encoding = template.getEncoding();
+String encoding = response.getCharacterEncoding();
+if(encoding == null) {
+encoding = template.getEncoding();
+}
 
 if (encoding != null) {
 contentType = contentType + "; charset=" + encoding;



[CONF] Confluence Changes in the last 24 hours

2014-08-21 Thread Anonymous (Confluence)
















  Confluence Changes in the last 24 hours  




 Apache ActiveMQ 

Pages

 Page: VM Transport Reference edited by Torsten Mielke [11:39 AM] (View Changes) 
 Page: Encrypted passwords edited by Fintan Bolton [09:21 AM] (View Changes) 


 Apache Camel 

Pages

 Page: Infinispan edited by Bilgin Ibryam [12:14 AM] (View Changes) 


 Apache Cloudstack 

Pages

 Page: SystemVm.iso edited by Nitin Mehta [09:48 PM] (View Changes) 
 Page: LXC Enhancements edited by Kishan Kavala [04:07 AM] (View Changes) 


 Apache Mesos 

Pages

 Page: Electricians Las Vegas created by ideal services [11:46 AM] 
 Page: Fast CDR processing created by r-r tele [07:03 AM] 


 OFBiz (Open For Business) Project Open Wiki 

Pages

 Page: OFBTECH Page Review edited by Ron Wheeler [03:51 PM] (View Changes) 
 Page: OFBiz Tutorial - A Beginners Development Guide edited by Ron Wheeler [03:33 PM] (View Changes) 
 Page: Handling of External data edited by Malin Nicolas [01:13 PM] (View Changes) 



Comments

 Page: OFBiz Tutorial - A Beginners Development Guide has a new comment [ Ron Wheeler ] 


 Apache OpenOffice Community 

Pages

 Page: AOO 4.1.1 Release Notes edited by Juergen Schmidt [03:49 PM] (View Changes) 
 Page: AOO 4.1.1 Release Notes (Nederlands) edited by Dick Groskamp [03:01 PM] (View Changes) 
 Page: AOO 4.1.1 Kiadási megjegyzések (HU) edited by Zoltan Reizinger [02:00 PM] (View Changes) 
 Page: Notas de lançamento do AOO 4.1.1 created by Pedro Albuquerque [07:27 AM] 
 Page: AOO 4.1.1 发行说明(简体中文) created by Shenfeng Liu [07:33 AM] 
 Page: Informazioni su Apache OpenOffice 4.1.1 IT edited by Andrea Pescetti [07:17 AM] (View Changes)