struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lukaszlen...@apache.org
Subject svn commit: r1459662 - /struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/conversion/impl/XWorkConverter.java
Date Fri, 22 Mar 2013 08:23:07 GMT
Author: lukaszlenart
Date: Fri Mar 22 08:23:07 2013
New Revision: 1459662

URL: http://svn.apache.org/r1459662
Log:
WW-4019 When looking for converter of primitive type fallback to defaultConverter

Modified:
    struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/conversion/impl/XWorkConverter.java

Modified: struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/conversion/impl/XWorkConverter.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/conversion/impl/XWorkConverter.java?rev=1459662&r1=1459661&r2=1459662&view=diff
==============================================================================
--- struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/conversion/impl/XWorkConverter.java
(original)
+++ struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/conversion/impl/XWorkConverter.java
Fri Mar 22 08:23:07 2013
@@ -394,6 +394,13 @@ public class XWorkConverter extends Defa
      * @return a TypeConverter to handle the specified class or null if none can be found
      */
     public TypeConverter lookup(Class clazz) {
+        if (clazz.isPrimitive()) {
+            /**
+             * if it is primitive use default converter which allows to define different
converters per type
+             * @see XWorkBasicConverter
+             */
+            return defaultTypeConverter;
+        }
         return lookup(clazz.getName());
     }
 



Mime
View raw message