The following issues were found
src/test/java/com/alibaba/json/bvt/bug/Issue101_NoneASM.java
2 issues
Line: 13
public class Issue101_NoneASM extends TestCase {
public void test_for_issure() throws Exception {
VO vo = new VO();
vo.a = new Object();
vo.b = vo.a;
vo.c = vo.a;
Reported by PMD.
Line: 24
}
@JSONType(serialzeFeatures=SerializerFeature.DisableCircularReferenceDetect)
private static class VO {
private Object a;
private Object b;
private Object c;
Reported by PMD.
src/test/java/com/alibaba/json/bvt/bug/Issue101_field.java
2 issues
Line: 13
public class Issue101_field extends TestCase {
public void test_for_issure() throws Exception {
VO vo = new VO();
vo.a = new Object();
vo.b = vo.a;
vo.c = vo.a;
Reported by PMD.
Line: 23
Assert.assertEquals("{\"a\":{},\"b\":{},\"c\":{\"$ref\":\"$.b\"}}", text);
}
public static class VO {
private Object a;
private Object b;
private Object c;
Reported by PMD.
src/test/java/com/alibaba/json/bvt/bug/Issue101_field_NoneASM.java
2 issues
Line: 13
public class Issue101_field_NoneASM extends TestCase {
public void test_for_issure() throws Exception {
VO vo = new VO();
vo.a = new Object();
vo.b = vo.a;
vo.c = vo.a;
Reported by PMD.
Line: 23
Assert.assertEquals("{\"a\":{},\"b\":{},\"c\":{\"$ref\":\"$.b\"}}", text);
}
private static class VO {
private Object a;
private Object b;
private Object c;
Reported by PMD.
src/main/java/com/alibaba/fastjson/support/spring/GenericFastJsonRedisSerializer.java
2 issues
Line: 25
}
try {
return JSON.toJSONBytes(object, SerializerFeature.WriteClassName);
} catch (Exception ex) {
throw new SerializationException("Could not serialize: " + ex.getMessage(), ex);
}
}
public Object deserialize(byte[] bytes) throws SerializationException {
Reported by PMD.
Line: 36
}
try {
return JSON.parseObject(new String(bytes, IOUtils.UTF8), Object.class, defaultRedisConfig);
} catch (Exception ex) {
throw new SerializationException("Could not deserialize: " + ex.getMessage(), ex);
}
}
}
Reported by PMD.
src/test/java/com/alibaba/json/bvt/asm/ClassReaderTest.java
2 issues
Line: 6
import junit.framework.TestCase;
public class ClassReaderTest extends TestCase {
public void test_read() throws Exception {
}
}
Reported by PMD.
Line: 6
import junit.framework.TestCase;
public class ClassReaderTest extends TestCase {
public void test_read() throws Exception {
}
}
Reported by PMD.
src/test/java/com/alibaba/json/bvt/annotation/SerializeUsingTest.java
2 issues
Line: 19
public class SerializeUsingTest extends TestCase {
public void test_annotation() throws Exception {
Model model = new Model();
model.value = 100;
String json = JSON.toJSONString(model);
Assert.assertEquals("{\"value\":\"100元\"}", json);
Reported by PMD.
Line: 32
public static class Model {
@JSONField(serializeUsing = ModelValueSerializer.class, deserializeUsing = ModelValueDeserializer.class)
public int value;
}
public static class ModelValueSerializer implements ObjectSerializer {
public void write(JSONSerializer serializer, Object object, Object fieldName, Type fieldType,
Reported by PMD.
src/test/java/com/alibaba/json/bvt/bug/Issue1075.java
2 issues
Line: 10
* Created by wenshao on 16/03/2017.
*/
public class Issue1075 extends TestCase {
public void test_for_issue() throws Exception {
String json = "{ \"question\": \"1+1=?\\u1505a\"}";
JSON.parseObject(json);
}
}
Reported by PMD.
Line: 10
* Created by wenshao on 16/03/2017.
*/
public class Issue1075 extends TestCase {
public void test_for_issue() throws Exception {
String json = "{ \"question\": \"1+1=?\\u1505a\"}";
JSON.parseObject(json);
}
}
Reported by PMD.
src/test/java/com/alibaba/json/bvt/bug/Issue94.java
2 issues
Line: 9
public class Issue94 extends TestCase {
public void test_for_issue() throws Exception {
JSONObject o = new JSONObject();
o.put("line", "{\"1\":\u0080}");
o.toString();
}
}
Reported by PMD.
Line: 9
public class Issue94 extends TestCase {
public void test_for_issue() throws Exception {
JSONObject o = new JSONObject();
o.put("line", "{\"1\":\u0080}");
o.toString();
}
}
Reported by PMD.
src/test/java/com/alibaba/fastjson/deserializer/issues3796/bean/ObjectW1.java
2 issues
Line: 9
import java.util.List;
public class ObjectW1 {
private int a;
Reported by PMD.
Line: 27
private List<CommonObject> e;
private int f = 0;
public int getA() {
return a;
}
Reported by PMD.
src/test/java/com/alibaba/json/bvt/bug/Issue118.java
2 issues
Line: 9
public class Issue118 extends TestCase {
public void test_for_issue() throws Exception {
String json = JSON.toJSONString("\0");
assertEquals("\"\\u0000\"", json);
}
}
Reported by PMD.
Line: 11
public class Issue118 extends TestCase {
public void test_for_issue() throws Exception {
String json = JSON.toJSONString("\0");
assertEquals("\"\\u0000\"", json);
}
}
Reported by PMD.