The following issues were found
src/test/java/com/alibaba/json/bvt/feature/IgnoreErrorGetterTest_private.java
1 issues
Line: 12
public class IgnoreErrorGetterTest_private extends TestCase {
public void test_feature() throws Exception {
Model model = new Model();
model.setId(1001);
String text = JSON.toJSONString(model, SerializerFeature.IgnoreErrorGetter);
Assert.assertEquals("{\"id\":1001}", text);
}
Reported by PMD.
src/test/java/com/alibaba/json/bvt/parser/ParseContextTest.java
1 issues
Line: 11
public class ParseContextTest extends TestCase {
public void test_toString() throws Exception {
Assert.assertEquals("$", new ParseContext(null, new Object(), "id").toString());
}
}
Reported by PMD.
src/test/java/com/alibaba/json/bvt/issue_1700/issue1763_2/bean/BaseResult.java
1 issues
Line: 10
*
* @author cnlyml
*/
public class BaseResult<T> {
private static final Integer SUCCESS_CODE = 0;
private Integer code;
private String message;
@JSONField(name = "content")
Reported by PMD.
src/test/java/com/alibaba/json/bvt/issue_2200/issue2224_5/MA2StringGroupedCollection.java
1 issues
Line: 5
import java.util.Map;
abstract class MA2StringGroupedCollection<TItem> extends MA2GroupedCollection<TItem, Map<TItem, TItem[]>> {
}
Reported by PMD.
src/test/java/com/alibaba/json/bvt/issue_2200/issue2224_2/GroupedCollection.java
1 issues
Line: 7
import java.util.List;
abstract class GroupedCollection<TKey, TItem> extends KeyedCollection<TKey, List<TItem>> {
}
Reported by PMD.
src/test/java/com/alibaba/json/bvt/parser/bug/EmptyParseArrayTest.java
1 issues
Line: 10
import junit.framework.TestCase;
public class EmptyParseArrayTest extends TestCase {
public void test_0() throws Exception {
Assert.assertNull(JSON.parseArray("", VO.class));
}
public static class VO {
Reported by PMD.
src/test/java/com/alibaba/json/bvt/issue_2200/issue2224_3/ArrayStringGroupedCollection.java
1 issues
Line: 3
package com.alibaba.json.bvt.issue_2200.issue2224_3;
abstract class ArrayStringGroupedCollection<TItem> extends ArrayGroupedCollection<String, TItem> {
}
Reported by PMD.
src/test/java/com/alibaba/json/bvt/parser/JSONReaderScannerTest_jsonobject.java
1 issues
Line: 14
public class JSONReaderScannerTest_jsonobject extends TestCase {
public void test_e() throws Exception {
JSONReader reader = new JSONReader(new StringReader("{\"type\\t\":'AA'}"));
JSONObject vo = new JSONObject();
reader.readObject(vo);
Assert.assertEquals("AA", vo.get("type\t"));
reader.close();
Reported by PMD.
src/test/java/com/alibaba/json/bvt/issue_2200/issue2224_2/StringGroupedCollection.java
1 issues
Line: 3
package com.alibaba.json.bvt.issue_2200.issue2224_2;
abstract class StringGroupedCollection<TItem> extends GroupedCollection<String, TItem> {
}
Reported by PMD.
src/test/java/com/alibaba/json/bvt/feature/IgnoreErrorGetterTest_field.java
1 issues
Line: 12
public class IgnoreErrorGetterTest_field extends TestCase {
public void test_feature() throws Exception {
Model model = new Model();
model.setId(1001);
String text = JSON.toJSONString(model, SerializerFeature.IgnoreErrorGetter);
Assert.assertEquals("{\"id\":1001}", text);
}
Reported by PMD.