File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed
Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change 33import java .math .BigDecimal ;
44import java .math .BigInteger ;
55
6- public class NumberConversionUtil {
6+ class NumberConversionUtil {
77
88 /**
99 * Converts a string to a number using the narrowest possible type. Possible
@@ -15,7 +15,7 @@ public class NumberConversionUtil {
1515 * @throws NumberFormatException thrown if the value is not a valid number. A public
1616 * caller should catch this and wrap it in a {@link JSONException} if applicable.
1717 */
18- public static Number stringToNumber (final String input ) throws NumberFormatException {
18+ static Number stringToNumber (final String input ) throws NumberFormatException {
1919 String val = input ;
2020 if (val .startsWith ("." )){
2121 val = "0" +val ;
@@ -88,7 +88,7 @@ public static Number stringToNumber(final String input) throws NumberFormatExcep
8888 * @param value
8989 * @return
9090 */
91- public static boolean potentialNumber (String value ){
91+ static boolean potentialNumber (String value ){
9292 if (value == null || value .isEmpty ()){
9393 return false ;
9494 }
Original file line number Diff line number Diff line change 1- package org .json . junit ;
1+ package org .json ;
22
3- import org .json .NumberConversionUtil ;
43import org .junit .Test ;
54
65import java .math .BigDecimal ;
You can’t perform that action at this time.
0 commit comments