Skip to content

Commit 5539722

Browse files
committed
stleary#813 - address PR review comment - brought down visibility.
1 parent 98b79ae commit 5539722

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

src/main/java/org/json/NumberConversionUtil.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import java.math.BigDecimal;
44
import 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
}

src/test/java/org/json/junit/NumberConversionUtilTest.java renamed to src/test/java/org/json/NumberConversionUtilTest.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
package org.json.junit;
1+
package org.json;
22

3-
import org.json.NumberConversionUtil;
43
import org.junit.Test;
54

65
import java.math.BigDecimal;

0 commit comments

Comments
 (0)