The following issues were found

src/test/java/com/alibaba/json/bvt/parser/deser/asm/TestASM_char.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: 10

              
public class TestASM_char extends TestCase {

    public void test_asm() throws Exception {
        V0 v = new V0();
        String text = JSON.toJSONString(v);
        V0 v1 = JSON.parseObject(text, V0.class);
        
        Assert.assertEquals(v.getValue(), v1.getValue());

            

Reported by PMD.

Potential violation of Law of Demeter (object not created locally)
Design

Line: 15

                      String text = JSON.toJSONString(v);
        V0 v1 = JSON.parseObject(text, V0.class);
        
        Assert.assertEquals(v.getValue(), v1.getValue());
    }

    public static class V0 {

        private char value = '中';

            

Reported by PMD.

src/test/java/com/alibaba/json/bvt/parser/deser/asm/TestASM_byte.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: 10

              
public class TestASM_byte extends TestCase {

    public void test_asm() throws Exception {
        V0 v = new V0();
        String text = JSON.toJSONString(v);
        V0 v1 = JSON.parseObject(text, V0.class);
        
        Assert.assertEquals(v.getI(), v1.getI());

            

Reported by PMD.

Potential violation of Law of Demeter (object not created locally)
Design

Line: 15

                      String text = JSON.toJSONString(v);
        V0 v1 = JSON.parseObject(text, V0.class);
        
        Assert.assertEquals(v.getI(), v1.getI());
    }

    public static class V0 {

        private byte i = 12;

            

Reported by PMD.

src/test/java/com/alibaba/json/bvt/parser/deser/asm/TestASM_boolean.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: 10

              
public class TestASM_boolean extends TestCase {

    public void test_asm() throws Exception {
        V0 v = new V0();
        String text = JSON.toJSONString(v);
        V0 v1 = JSON.parseObject(text, V0.class);
        
        Assert.assertEquals(v.isValue(), v1.isValue());

            

Reported by PMD.

Potential violation of Law of Demeter (object not created locally)
Design

Line: 15

                      String text = JSON.toJSONString(v);
        V0 v1 = JSON.parseObject(text, V0.class);
        
        Assert.assertEquals(v.isValue(), v1.isValue());
    }

    public static class V0 {

        private boolean value = true;

            

Reported by PMD.

src/test/java/com/alibaba/json/bvt/parser/deser/asm/TestASM_Short_0.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: 10

              
public class TestASM_Short_0 extends TestCase {

    public void test_asm() throws Exception {
        V0 v = new V0();
        String text = JSON.toJSONString(v);
        V0 v1 = JSON.parseObject(text, V0.class);

        Assert.assertEquals(v.getI(), v1.getI());

            

Reported by PMD.

Potential violation of Law of Demeter (object not created locally)
Design

Line: 15

                      String text = JSON.toJSONString(v);
        V0 v1 = JSON.parseObject(text, V0.class);

        Assert.assertEquals(v.getI(), v1.getI());
    }

    public static class V0 {

        private Short i = 12;

            

Reported by PMD.

src/test/java/com/alibaba/json/bvt/parser/deser/asm/TestASM_Long_0.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: 10

              
public class TestASM_Long_0 extends TestCase {

    public void test_asm() throws Exception {
        V0 v = new V0();
        String text = JSON.toJSONString(v);
        V0 v1 = JSON.parseObject(text, V0.class);

        Assert.assertEquals(v.getI(), v1.getI());

            

Reported by PMD.

Potential violation of Law of Demeter (object not created locally)
Design

Line: 15

                      String text = JSON.toJSONString(v);
        V0 v1 = JSON.parseObject(text, V0.class);

        Assert.assertEquals(v.getI(), v1.getI());
    }

    public static class V0 {

        private Long i = 12L;

            

Reported by PMD.

src/test/java/com/alibaba/json/bvt/writeAsArray/WriteAsArray_0_public.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

              import com.alibaba.fastjson.serializer.SerializerFeature;

public class WriteAsArray_0_public extends TestCase {
    public void test_0 () throws Exception {
        VO vo = new VO();
        vo.setId(123);
        vo.setName("wenshao");
        
        String text = JSON.toJSONString(vo, SerializerFeature.BeanToArray);

            

Reported by PMD.

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

Line: 20

                      Assert.assertEquals("[123,\"wenshao\"]", text);
    }
    
    public static class VO {
        private int id;
        private String name;

        public int getId() {
            return id;

            

Reported by PMD.

src/test/java/com/alibaba/json/bvt/parser/deser/asm/TestASM_Integer.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: 10

              
public class TestASM_Integer extends TestCase {

    public void test_asm() throws Exception {
        V0 v = new V0();
        String text = JSON.toJSONString(v);
        V0 v1 = JSON.parseObject(text, V0.class);
        
        Assert.assertEquals(v.getI(), v1.getI());

            

Reported by PMD.

Potential violation of Law of Demeter (object not created locally)
Design

Line: 15

                      String text = JSON.toJSONString(v);
        V0 v1 = JSON.parseObject(text, V0.class);
        
        Assert.assertEquals(v.getI(), v1.getI());
    }

    public static class V0 {

        private Integer i = 12;

            

Reported by PMD.

src/test/java/com/alibaba/json/bvt/parser/deser/asm/TestASM_Date.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

              import com.alibaba.fastjson.serializer.JSONSerializer;

public class TestASM_Date extends TestCase {
    public void test_date() throws Exception {
        JSONSerializer serializer = new JSONSerializer();
        serializer.write(new V0());

        Assert.assertEquals("{}", serializer.getWriter().toString());
    }

            

Reported by PMD.

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

Line: 15

                      JSONSerializer serializer = new JSONSerializer();
        serializer.write(new V0());

        Assert.assertEquals("{}", serializer.getWriter().toString());
    }
    
    public static class V0 {

        private Date d;

            

Reported by PMD.

src/test/java/com/alibaba/json/bvt/writeAsArray/WriteAsArray_boolean_public.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

              import com.alibaba.fastjson.serializer.SerializerFeature;

public class WriteAsArray_boolean_public extends TestCase {
    public void test_0 () throws Exception {
        VO vo = new VO();
        vo.setId(true);
        vo.setName("wenshao");
        
        String text = JSON.toJSONString(vo, SerializerFeature.BeanToArray);

            

Reported by PMD.

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

Line: 20

                      Assert.assertEquals("[true,\"wenshao\"]", text);
    }
    
    public static class VO {
        private boolean id;
        private String name;

        public boolean getId() {
            return id;

            

Reported by PMD.

src/test/java/com/alibaba/json/bvt/serializer/ClassFieldTest.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 ClassFieldTest extends TestCase {

    public void test_writer_1() throws Exception {
        VO vo = JSON.parseObject("{\"value\":\"int\"}", VO.class);
        Assert.assertEquals(int.class, vo.getValue());
    }

    public static class VO {

            

Reported by PMD.

Potential violation of Law of Demeter (object not created locally)
Design

Line: 13

              
    public void test_writer_1() throws Exception {
        VO vo = JSON.parseObject("{\"value\":\"int\"}", VO.class);
        Assert.assertEquals(int.class, vo.getValue());
    }

    public static class VO {

        private Class<?> value;

            

Reported by PMD.