mirror of
https://github.com/stleary/JSON-java.git
synced 2026-01-24 00:03:17 -05:00
Updating to work with java 1.6
This commit is contained in:
@@ -3296,7 +3296,6 @@ public class JSONObject {
|
||||
if (has(fieldName)) {
|
||||
Object value = get(fieldName);
|
||||
Type fieldType = field.getGenericType();
|
||||
Class<?> rawType = getRawType(fieldType);
|
||||
Object convertedValue = convertValue(value, fieldType);
|
||||
field.set(obj, convertedValue);
|
||||
}
|
||||
@@ -3333,9 +3332,9 @@ public class JSONObject {
|
||||
} else if (rawType == long.class || rawType == Long.class) {
|
||||
return ((Number) value).longValue();
|
||||
} else if (rawType == boolean.class || rawType == Boolean.class) {
|
||||
return (Boolean) value;
|
||||
return value;
|
||||
} else if (rawType == String.class) {
|
||||
return (String) value;
|
||||
return value;
|
||||
} else if (rawType == BigDecimal.class) {
|
||||
return new BigDecimal((String) value);
|
||||
} else if (rawType == BigInteger.class) {
|
||||
|
||||
Reference in New Issue
Block a user