mirror of
https://github.com/apache/struts.git
synced 2026-08-31 03:14:28 +00:00
Simplify nested else/if
This commit is contained in:
+2
-4
@@ -153,10 +153,8 @@ public abstract class DefaultTypeConverter implements TypeConverter {
|
||||
if (Enum.class.isAssignableFrom(toType))
|
||||
result = enumValue(toType, value);
|
||||
}
|
||||
} else {
|
||||
if (toType.isPrimitive()) {
|
||||
result = primitiveDefaults.get(toType);
|
||||
}
|
||||
} else if (toType.isPrimitive()) {
|
||||
result = primitiveDefaults.get(toType);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user