< prev index next >

src/jdk/nashorn/internal/parser/JSONParser.java

Print this page

        

@@ -291,12 +291,10 @@
     }
 
     private static Class<?> getType(final Object value) {
         if (value instanceof Integer) {
             return int.class;
-        } else if (value instanceof Long) {
-            return long.class;
         } else if (value instanceof Double) {
             return double.class;
         } else {
             return Object.class;
         }

@@ -475,12 +473,10 @@
         }
 
         final double d = Double.parseDouble(source.substring(start, pos));
         if (JSType.isRepresentableAsInt(d)) {
             return (int) d;
-        } else if (JSType.isRepresentableAsLong(d)) {
-            return (long) d;
         }
         return d;
     }
 
     private Object parseKeyword(final String keyword, final Object value) {
< prev index next >