diff --git a/json-smart-mini/src/main/java/net/minidev/json/parser/JSONParserStream.java b/json-smart-mini/src/main/java/net/minidev/json/parser/JSONParserStream.java
index 881abb4..854f39a 100644
--- a/json-smart-mini/src/main/java/net/minidev/json/parser/JSONParserStream.java
+++ b/json-smart-mini/src/main/java/net/minidev/json/parser/JSONParserStream.java
@@ -7,8 +7,8 @@
import java.util.List;
import java.util.Map;
-import net.minidev.json.parser.ContainerFactory;
-import net.minidev.json.parser.ParseException;
+
+
import static net.minidev.json.parser.ParseException.*;
import static net.minidev.json.parser.JSONParser.*;
diff --git a/json-smart/pom.xml b/json-smart/pom.xml
index 6cb535e..d7bd7ff 100644
--- a/json-smart/pom.xml
+++ b/json-smart/pom.xml
@@ -5,7 +5,6 @@
json-smart
bundle
- 1.3.2
net.minidev
diff --git a/json-smart/src/test/java/net/minidev/json/test/Issue26.java b/json-smart/src/test/java/net/minidev/json/test/Issue26.java
index d4e8b1c..55bd4ca 100644
--- a/json-smart/src/test/java/net/minidev/json/test/Issue26.java
+++ b/json-smart/src/test/java/net/minidev/json/test/Issue26.java
@@ -57,7 +57,6 @@ public void setPlugin(boolean plugin) {
public void testIssue26() {
App dbApp = new App();
dbApp.setSoftname("sssssssssss");
- System.out.println();
assertTrue(JSONValue.toJSONString(dbApp).contains("sssssssssss"));
}
diff --git a/json-smart/src/test/java/net/minidev/json/test/TestBigValue.java b/json-smart/src/test/java/net/minidev/json/test/TestBigValue.java
index 884d1b7..b20b388 100644
--- a/json-smart/src/test/java/net/minidev/json/test/TestBigValue.java
+++ b/json-smart/src/test/java/net/minidev/json/test/TestBigValue.java
@@ -4,8 +4,11 @@
import java.math.BigInteger;
import java.util.HashMap;
+import org.junit.Test;
+
import net.minidev.json.JSONObject;
import net.minidev.json.JSONValue;
+import net.minidev.json.parser.JSONParser;
import junit.framework.TestCase;
public class TestBigValue extends TestCase {
@@ -14,6 +17,7 @@ public class TestBigValue extends TestCase {
/**
* test BigDecimal serialization
*/
+ @Test
public void testBigDecimal() {
HashMap map = new HashMap();
BigDecimal bigDec = new BigDecimal(bigStr + "." + bigStr);
@@ -29,6 +33,7 @@ public void testBigDecimal() {
/**
* test BigInteger serialization
*/
+ @Test
public void testBigInteger() {
HashMap map = new HashMap();
BigInteger bigInt = new BigInteger(bigStr);
@@ -45,10 +50,12 @@ public void testBigInteger() {
*/
@Test
public void testBigDouble() throws Exception {
- String content = "{\"customDouble\": 3.14159265358979323846}";
- System.out.printf("Input: %s\n", content);
- JSONParser parser = new JSONParser(DEFAULT_PERMISSIVE_MODE);
+ String content = "{\"customDouble\":3.14159265358979323846}";
+ // System.out.printf("Input: %s\n", content);
+ JSONParser parser = new JSONParser(JSONParser.DEFAULT_PERMISSIVE_MODE);
JSONObject jwtContent = (JSONObject) parser.parse(content);
- System.out.printf("Output: %s\n", jwtContent.toJSONString());
+ String serialized = jwtContent.toJSONString();
+ // System.out.printf("Output: %s\n", serialized);
+ assertEquals("should not loose precision", serialized, content);
}
}
diff --git a/json-smart/src/test/java/net/minidev/json/test/TestMisc.java b/json-smart/src/test/java/net/minidev/json/test/TestMisc.java
index d350662..3bf870d 100644
--- a/json-smart/src/test/java/net/minidev/json/test/TestMisc.java
+++ b/json-smart/src/test/java/net/minidev/json/test/TestMisc.java
@@ -45,13 +45,13 @@ public void testIntOffset() throws Exception {
public void testFloat() throws Exception {
String s = "123.5";
Object o = JSONValue.parseWithException(s);
- assertEquals(o, new Double(123.5));
+ assertEquals(o, Double.valueOf(123.5));
}
public void testFloat2() throws Exception {
String s = "123.5E1";
Object o = JSONValue.parseWithException(s);
- assertEquals(o, new Double(1235));
+ assertEquals(o, Double.valueOf(1235));
}
public void testFloat3() throws Exception {
diff --git a/json-smart/src/test/java/net/minidev/json/test/TestUtf8.java b/json-smart/src/test/java/net/minidev/json/test/TestUtf8.java
index f802958..054bd41 100644
--- a/json-smart/src/test/java/net/minidev/json/test/TestUtf8.java
+++ b/json-smart/src/test/java/net/minidev/json/test/TestUtf8.java
@@ -17,7 +17,7 @@ public void testString() throws Exception {
String s = "{\"key\":\"" + nonLatinText + "\"}";
JSONObject obj = (JSONObject) JSONValue.parse(s);
String v = (String) obj.get("key"); // result is incorrect
- System.out.println(v);
+ // System.out.println(v);
assertEquals(v, nonLatinText);
}
}
@@ -29,7 +29,7 @@ public void testReader() throws Exception {
JSONObject obj = (JSONObject) JSONValue.parse(reader);
String v = (String) obj.get("key"); // result is incorrect
- System.out.println(v);
+ // System.out.println(v);
assertEquals(v, nonLatinText);
}
}
@@ -40,7 +40,7 @@ public void testInputStream() throws Exception {
ByteArrayInputStream bis = new ByteArrayInputStream(s.getBytes("utf8"));
JSONObject obj = (JSONObject) JSONValue.parse(bis);
String v = (String) obj.get("key"); // result is incorrect
- System.out.println(v);
+ // System.out.println(v);
assertEquals(v, nonLatinText);
}
}
@@ -51,7 +51,7 @@ public void testBytes() throws Exception {
byte[] bs = s.getBytes("utf8");
JSONObject obj = (JSONObject) JSONValue.parse(bs);
String v = (String) obj.get("key"); // result is incorrect
- System.out.println(v);
+ // System.out.println(v);
assertEquals(v, nonLatinText);
}
}
diff --git a/parent/pom.xml b/parent/pom.xml
index 8541507..6e0ad95 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -148,18 +148,8 @@
-
-
-
-
-
../json-smart
-
-
-
-
-
@@ -277,7 +267,7 @@
junit
junit
- [4.13.1,)
+ [4.13.2,)