The following issues were found

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

    public void test_0() throws Exception {
        VO vo = new VO();
        vo.setValue(1);
        
        String text = JSON.toJSONString(vo);
        Assert.assertEquals("{\"value\":true}", text);

            

Reported by PMD.

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

Line: 19

                      Assert.assertEquals("{\"value\":true}", text);
        VO vo1 = JSON.parseObject(text, VO.class);
        
        Assert.assertEquals(vo.getValue(), vo1.getValue());
    }

    public static class VO {

        private int value;

            

Reported by PMD.

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

Line: 9

              
public class Issue127 extends TestCase {

    public void test_for_issue_127() throws Exception {
        String text = "{_BillId:\"X20140106S0110\",_Status:1,_PayStatus:0,_RunEmpId:undefined}";
        JSON.parseObject(text);
    }
}

            

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 Issue127 extends TestCase {

    public void test_for_issue_127() throws Exception {
        String text = "{_BillId:\"X20140106S0110\",_Status:1,_PayStatus:0,_RunEmpId:undefined}";
        JSON.parseObject(text);
    }
}

            

Reported by PMD.

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

              @SuppressWarnings("deprecation")
public class JavaBeanMappingTest extends TestCase {
	
	public void test_0 () throws Exception {
	    ParserConfig.getGlobalInstance();
	}
}

            

Reported by PMD.

JUnit tests should include assert() or fail()
Design

Line: 10

              @SuppressWarnings("deprecation")
public class JavaBeanMappingTest extends TestCase {
	
	public void test_0 () throws Exception {
	    ParserConfig.getGlobalInstance();
	}
}

            

Reported by PMD.

src/test/java/com/alibaba/json/bvt/bug/Issue141.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 Issue141 extends TestCase {
    public void test_for_issue() throws Exception {
        Assert.assertFalse(TypeUtils.castToBoolean("0").booleanValue());
    }
}

            

Reported by PMD.

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

Line: 12

              
public class Issue141 extends TestCase {
    public void test_for_issue() throws Exception {
        Assert.assertFalse(TypeUtils.castToBoolean("0").booleanValue());
    }
}

            

Reported by PMD.

src/test/java/com/alibaba/json/bvt/bug/Issue143.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: 15

              
public class Issue143 extends TestCase {

    public void test_for_issue() throws Exception {
        String text = "{\"rec\":[{},{}]}";
        
        JsonStroe store = new JsonStroe();
        
        JSONReader reader = new JSONReader(new StringReader(text));

            

Reported by PMD.

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

Line: 55

                      }
    }

    public static class KeyValue {

        private String key;
        private String value;

        public String getKey() {

            

Reported by PMD.

src/test/java/com/alibaba/json/bvt/bug/Issue153.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 Issue153 extends TestCase {
    public void test_for_issue() throws Exception {
        String text = "[{\"url_short\":\"http://t.cn/8soWK4z\",\"url_long\":\"http://wenshao.com\",\"type\":0}]";
        
        JSON.parseObject(text, new TypeReference<HashMap<String, Object>[]>(){});
    }
}

            

Reported by PMD.

JUnit tests should include assert() or fail()
Design

Line: 12

              

public class Issue153 extends TestCase {
    public void test_for_issue() throws Exception {
        String text = "[{\"url_short\":\"http://t.cn/8soWK4z\",\"url_long\":\"http://wenshao.com\",\"type\":0}]";
        
        JSON.parseObject(text, new TypeReference<HashMap<String, Object>[]>(){});
    }
}

            

Reported by PMD.

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

Line: 12

              
    public static class VO {

        public long id;
    }

    public void test_codec() throws Exception {
        VO vo = new VO();
        vo.id = 1234;

            

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: 15

                      public long id;
    }

    public void test_codec() throws Exception {
        VO vo = new VO();
        vo.id = 1234;
        
        String str = JSON.toJSONString(vo);
        

            

Reported by PMD.

src/test/java/com/alibaba/fastjson/deserializer/issues3796/bean/ObjectY_A.java
2 issues
The class 'ObjectY_A' is suspected to be a Data Class (WOC=0.000%, NOPA=0, NOAM=8, WMC=8)
Design

Line: 8

              


public class ObjectY_A {

	
	private int a = 0;

	

            

Reported by PMD.

Avoid using redundant field initializer for 'a'
Performance

Line: 11

              public class ObjectY_A {

	
	private int a = 0;

	
	private int b;

	

            

Reported by PMD.

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

              import junit.framework.TestCase;

public class FinalTest extends TestCase {
    public void test_final() throws Exception {
        VO vo = new VO();
        String text = JSON.toJSONString(vo);
        Assert.assertEquals("{\"value\":1001}", text);
        JSON.parseObject(text, VO.class);
        JSON.parseObject("{\"id\":1001,\"value\":1001}", VO.class);

            

Reported by PMD.

This final field could be made static
Design

Line: 21

                  
    public static class VO {
        public final static int id = 1001;
        public final int value = 1001;
    }
}

            

Reported by PMD.

src/test/java/com/alibaba/json/bvt/IntKeyMapTest.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: 9

              
public class IntKeyMapTest extends TestCase {

    public void test_0() throws Exception {
        JSON.parse("{1:\"AA\",2:{}}");
    }
}

            

Reported by PMD.

JUnit tests should include assert() or fail()
Design

Line: 9

              
public class IntKeyMapTest extends TestCase {

    public void test_0() throws Exception {
        JSON.parse("{1:\"AA\",2:{}}");
    }
}

            

Reported by PMD.