WW-4019 When looking for converter of primitive type fallback to defaultConverter

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1459662 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Lukasz Lenart
2013-03-22 08:23:07 +00:00
parent 1815a9925b
commit 6e33b77ad8
@@ -394,6 +394,13 @@ public class XWorkConverter extends DefaultTypeConverter {
* @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());
}