Updating to work with java 1.6

This commit is contained in:
sk02241994
2025-10-28 13:06:11 +11:00
parent f92f281620
commit 42800c208a

View File

@@ -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) {