The following issues were found

src/test/java/com/alibaba/json/bvt/serializer/filters/ClassLevelFeatureConfigTest_private.java
2 issues
JUnit 4 tests that execute tests should use the @Test annotation, JUnit 5 tests should use @Test, @RepeatedTest, @TestFactory, @TestTemplate or @ParameterizedTest
Design

Line: 12

              import junit.framework.TestCase;

public class ClassLevelFeatureConfigTest_private extends TestCase {
    public void test_0() throws Exception {
        SerializeConfig config = new SerializeConfig();
        
        Model model = new Model();
        model.id = 1001;
        

            

Reported by PMD.

Found non-transient, non-static member. Please mark as transient or provide accessors.
Error

Line: 25

                  }
    
    private static class Model {
        public int id;
    }
}

            

Reported by PMD.

src/test/java/com/alibaba/json/bvt/parser/deser/ResolveFieldDeserializerTest.java
2 issues
JUnit tests should include assert() or fail()
Design

Line: 9

              

public class ResolveFieldDeserializerTest extends TestCase {
    public void test_0 () throws Exception {
        new ResolveFieldDeserializer(null, null).parseField(null, null, null, null);
        new ResolveFieldDeserializer(null, null, 0).parseField(null, null, null, null);
    }
}

            

Reported by PMD.

JUnit 4 tests that execute tests should use the @Test annotation, JUnit 5 tests should use @Test, @RepeatedTest, @TestFactory, @TestTemplate or @ParameterizedTest
Design

Line: 9

              

public class ResolveFieldDeserializerTest extends TestCase {
    public void test_0 () throws Exception {
        new ResolveFieldDeserializer(null, null).parseField(null, null, null, null);
        new ResolveFieldDeserializer(null, null, 0).parseField(null, null, null, null);
    }
}

            

Reported by PMD.

src/test/java/com/alibaba/json/bvt/parser/deser/ParseNullTest.java
2 issues
JUnit tests should include assert() or fail()
Design

Line: 9

              import junit.framework.TestCase;

public class ParseNullTest extends TestCase {
    public void test_parse_null() throws Exception {
        JSON.parseObject("{\"value\":null}", Model.class);
    }
    
    public static class Model {
        public JSONObject value;

            

Reported by PMD.

JUnit 4 tests that execute tests should use the @Test annotation, JUnit 5 tests should use @Test, @RepeatedTest, @TestFactory, @TestTemplate or @ParameterizedTest
Design

Line: 9

              import junit.framework.TestCase;

public class ParseNullTest extends TestCase {
    public void test_parse_null() throws Exception {
        JSON.parseObject("{\"value\":null}", Model.class);
    }
    
    public static class Model {
        public JSONObject value;

            

Reported by PMD.

src/test/java/com/alibaba/json/bvt/parser/deser/NumberDeserializerTest2.java
2 issues
JUnit 4 tests that execute tests should use the @Test annotation, JUnit 5 tests should use @Test, @RepeatedTest, @TestFactory, @TestTemplate or @ParameterizedTest
Design

Line: 11

              
public class NumberDeserializerTest2 extends TestCase {

    public void test_double2() throws Exception {
        Assert.assertTrue(123.0D == JSON.parseObject("123B", double.class));
        Assert.assertTrue(123.0D == JSON.parseObject("123B", Double.class).doubleValue());
    }
}

            

Reported by PMD.

Potential violation of Law of Demeter (method chain calls)
Design

Line: 13

              
    public void test_double2() throws Exception {
        Assert.assertTrue(123.0D == JSON.parseObject("123B", double.class));
        Assert.assertTrue(123.0D == JSON.parseObject("123B", Double.class).doubleValue());
    }
}

            

Reported by PMD.

src/test/java/com/alibaba/json/bvt/parser/deser/MapTest.java
2 issues
JUnit 4 tests that execute tests should use the @Test annotation, JUnit 5 tests should use @Test, @RepeatedTest, @TestFactory, @TestTemplate or @ParameterizedTest
Design

Line: 14

              
public class MapTest extends TestCase {

    public void test_0() throws Exception {
        Map<String, String> map = JSON.parseObject("{id:33}", new TypeReference<Map<String, String>>() {
        });

        Assert.assertEquals(1, map.size());
        Assert.assertEquals("33", map.get("id"));

            

Reported by PMD.

JUnit 4 tests that execute tests should use the @Test annotation, JUnit 5 tests should use @Test, @RepeatedTest, @TestFactory, @TestTemplate or @ParameterizedTest
Design

Line: 22

                      Assert.assertEquals("33", map.get("id"));
    }
    
    public void test_1() throws Exception {
        Map<String, BigDecimal> map = JSON.parseObject("{id:33}", new TypeReference<Map<String, BigDecimal>>() {
        });

        Assert.assertEquals(1, map.size());
        Assert.assertEquals(new BigDecimal("33"), map.get("id"));

            

Reported by PMD.

src/test/java/com/alibaba/json/bvt/parser/deser/FieldSerializerTest4.java
2 issues
Found non-transient, non-static member. Please mark as transient or provide accessors.
Error

Line: 37

                  }

    private static class Result<T>{
        private T data;

        public Result(T data) {
            this.data = data;
        }


            

Reported by PMD.

Private field 'data' could be made final; it is only initialized in the declaration or constructor.
Design

Line: 37

                  }

    private static class Result<T>{
        private T data;

        public Result(T data) {
            this.data = data;
        }


            

Reported by PMD.

src/test/java/com/alibaba/json/bvt/parser/deser/FieldSerializerTest3.java
2 issues
JUnit 4 tests that execute tests should use the @Test annotation, JUnit 5 tests should use @Test, @RepeatedTest, @TestFactory, @TestTemplate or @ParameterizedTest
Design

Line: 17

              
public class FieldSerializerTest3 extends TestCase {

    public void test_writeNull() throws Exception {
        String text = toJSONString(new Entity());
        Assert.assertEquals("{\"v\":\"xxx\"}", text);
    }
    
    public static final String toJSONString(Object object, SerializerFeature... features) {

            

Reported by PMD.

The class 'Entity' is suspected to be a Data Class (WOC=0.000%, NOPA=0, NOAM=4, WMC=4)
Design

Line: 67

                      }
    }

    private static class Entity {

        private int id;
        @JSONField(name = "v", serialzeFeatures = { SerializerFeature.WriteMapNullValue })
        private String        value;


            

Reported by PMD.

src/test/java/com/alibaba/json/bvt/parser/deser/FieldSerializerTest2.java
2 issues
JUnit 4 tests that execute tests should use the @Test annotation, JUnit 5 tests should use @Test, @RepeatedTest, @TestFactory, @TestTemplate or @ParameterizedTest
Design

Line: 17

              
public class FieldSerializerTest2 extends TestCase {

    public void test_writeNull() throws Exception {
        String text = toJSONString(new Entity());
        Assert.assertEquals("{\"value\":\"xxx\"}", text);
    }
    
    public static final String toJSONString(Object object, SerializerFeature... features) {

            

Reported by PMD.

The class 'Entity' is suspected to be a Data Class (WOC=0.000%, NOPA=0, NOAM=4, WMC=4)
Design

Line: 70

                      }
    }

    private static class Entity {

        private int id;
        @JSONField(name = "v", serialzeFeatures = { SerializerFeature.WriteMapNullValue })
        private String        value;


            

Reported by PMD.

src/test/java/com/alibaba/json/bvt/parser/deser/FieldSerializerTest.java
2 issues
JUnit 4 tests that execute tests should use the @Test annotation, JUnit 5 tests should use @Test, @RepeatedTest, @TestFactory, @TestTemplate or @ParameterizedTest
Design

Line: 12

              
public class FieldSerializerTest extends TestCase {

    public void test_writeNull() throws Exception {
        String text = JSON.toJSONString(new Entity());
        Assert.assertEquals("{\"v\":null}", text);
    }

    private static class Entity {

            

Reported by PMD.

The class 'Entity' is suspected to be a Data Class (WOC=0.000%, NOPA=0, NOAM=4, WMC=4)
Design

Line: 17

                      Assert.assertEquals("{\"v\":null}", text);
    }

    private static class Entity {

        private transient int id;
        @JSONField(name = "v", serialzeFeatures = { SerializerFeature.WriteMapNullValue })
        private String        value;


            

Reported by PMD.

src/test/java/com/alibaba/json/bvt/serializer/label/LabelIncludeTest.java
2 issues
JUnit 4 tests that execute tests should use the @Test annotation, JUnit 5 tests should use @Test, @RepeatedTest, @TestFactory, @TestTemplate or @ParameterizedTest
Design

Line: 13

              
public class LabelIncludeTest extends TestCase {

    public void test_includes() throws Exception {
        VO vo = new VO();
        vo.setId(123);
        vo.setName("wenshao");
        vo.setPassword("ooxxx");
        

            

Reported by PMD.

The class 'VO' is suspected to be a Data Class (WOC=0.000%, NOPA=0, NOAM=6, WMC=6)
Design

Line: 23

                      Assert.assertEquals("{\"id\":123,\"name\":\"wenshao\"}", text);
    }

    public static class VO {

        private int    id;
        private String name;
        private String password;


            

Reported by PMD.