The following issues were found
src/test/java/com/alibaba/json/bvt/parser/number/NumberValueTest4.java
2 issues
Line: 12
public class NumberValueTest4 extends TestCase {
public void test_0() throws Exception {
String text = "{\"value\":21474836481}";
JSONObject obj = (JSONObject) JSON.parse(text);
Assert.assertEquals(Long.valueOf(21474836481L), obj.get("value"));
}
Reported by PMD.
Line: 15
public void test_0() throws Exception {
String text = "{\"value\":21474836481}";
JSONObject obj = (JSONObject) JSON.parse(text);
Assert.assertEquals(Long.valueOf(21474836481L), obj.get("value"));
}
}
Reported by PMD.
src/test/java/com/alibaba/json/bvt/parser/number/NumberValueTest_error_0.java
2 issues
Line: 12
public class NumberValueTest_error_0 extends TestCase {
public void test_0() throws Exception {
Exception error = null;
try {
String text = "{\"value\":33e}";
JSON.parse(text);
} catch (JSONException e) {
Reported by PMD.
Line: 13
public class NumberValueTest_error_0 extends TestCase {
public void test_0() throws Exception {
Exception error = null;
try {
String text = "{\"value\":33e}";
JSON.parse(text);
} catch (JSONException e) {
error = e;
Reported by PMD.
src/test/java/com/alibaba/json/bvt/parser/number/NumberValueTest_error_1.java
2 issues
Line: 12
public class NumberValueTest_error_1 extends TestCase {
public void test_0() throws Exception {
Exception error = null;
try {
String text = "33e";
JSON.parse(text);
} catch (JSONException e) {
Reported by PMD.
Line: 13
public class NumberValueTest_error_1 extends TestCase {
public void test_0() throws Exception {
Exception error = null;
try {
String text = "33e";
JSON.parse(text);
} catch (JSONException e) {
error = e;
Reported by PMD.
src/test/java/com/alibaba/json/bvt/parser/number/NumberValueTest_error_10.java
2 issues
Line: 12
public class NumberValueTest_error_10 extends TestCase {
public void test_0() throws Exception {
Exception error = null;
try {
String text = "{\"value\":3e-";
JSON.parse(text);
} catch (JSONException e) {
Reported by PMD.
Line: 13
public class NumberValueTest_error_10 extends TestCase {
public void test_0() throws Exception {
Exception error = null;
try {
String text = "{\"value\":3e-";
JSON.parse(text);
} catch (JSONException e) {
error = e;
Reported by PMD.
src/test/java/com/alibaba/json/bvt/parser/number/NumberValueTest_error_11.java
2 issues
Line: 12
public class NumberValueTest_error_11 extends TestCase {
public void test_0() throws Exception {
Exception error = null;
try {
String text = "{\"value\":3e-1";
JSON.parse(text);
} catch (JSONException e) {
Reported by PMD.
Line: 13
public class NumberValueTest_error_11 extends TestCase {
public void test_0() throws Exception {
Exception error = null;
try {
String text = "{\"value\":3e-1";
JSON.parse(text);
} catch (JSONException e) {
error = e;
Reported by PMD.
src/test/java/com/alibaba/json/bvt/parser/number/NumberValueTest_error_12.java
2 issues
Line: 12
public class NumberValueTest_error_12 extends TestCase {
public void test_0() throws Exception {
Exception error = null;
try {
String text = "{\"value\":33.33";
JSON.parse(text);
} catch (JSONException e) {
Reported by PMD.
Line: 13
public class NumberValueTest_error_12 extends TestCase {
public void test_0() throws Exception {
Exception error = null;
try {
String text = "{\"value\":33.33";
JSON.parse(text);
} catch (JSONException e) {
error = e;
Reported by PMD.
src/test/java/com/alibaba/json/bvt/parser/deser/generic/ListStrFieldTest.java
2 issues
Line: 12
import junit.framework.TestCase;
public class ListStrFieldTest extends TestCase {
public void test_0() throws Exception {
Model model = JSON.parseObject("{\"values\":null}", Model.class);
Assert.assertNull(model.values);
}
public static class Model {
Reported by PMD.
Line: 18
}
public static class Model {
public List<String> values;
}
}
Reported by PMD.
src/test/java/com/alibaba/json/bvt/parser/number/NumberValueTest_error_2.java
2 issues
Line: 12
public class NumberValueTest_error_2 extends TestCase {
public void test_0() throws Exception {
Exception error = null;
try {
String text = "{\"value\":33e";
JSON.parse(text);
} catch (JSONException e) {
Reported by PMD.
Line: 13
public class NumberValueTest_error_2 extends TestCase {
public void test_0() throws Exception {
Exception error = null;
try {
String text = "{\"value\":33e";
JSON.parse(text);
} catch (JSONException e) {
error = e;
Reported by PMD.
src/test/java/com/alibaba/json/bvt/parser/number/NumberValueTest_error_3.java
2 issues
Line: 12
public class NumberValueTest_error_3 extends TestCase {
public void test_0() throws Exception {
Exception error = null;
try {
String text = "{\"value\":33e+}";
JSON.parse(text);
} catch (JSONException e) {
Reported by PMD.
Line: 13
public class NumberValueTest_error_3 extends TestCase {
public void test_0() throws Exception {
Exception error = null;
try {
String text = "{\"value\":33e+}";
JSON.parse(text);
} catch (JSONException e) {
error = e;
Reported by PMD.
src/test/java/com/alibaba/json/bvt/parser/number/NumberValueTest_error_4.java
2 issues
Line: 12
public class NumberValueTest_error_4 extends TestCase {
public void test_0() throws Exception {
Exception error = null;
try {
String text = "{\"value\":33e-}";
JSON.parse(text);
} catch (JSONException e) {
Reported by PMD.
Line: 13
public class NumberValueTest_error_4 extends TestCase {
public void test_0() throws Exception {
Exception error = null;
try {
String text = "{\"value\":33e-}";
JSON.parse(text);
} catch (JSONException e) {
error = e;
Reported by PMD.