mirror of
https://github.com/apache/struts.git
synced 2026-08-11 01:27:14 +00:00
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:
@@ -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());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user