The following issues were found

src/test/java/com/alibaba/json/bvt/parser/taobao/DoubleObjectFieldTest.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 DoubleObjectFieldTest extends TestCase {
    public void test_0 () throws Exception {
        VO vo = JSON.parseObject("{\"value\":1001}", VO.class);
        Assert.assertTrue(1001D == vo.value);
    }
    
    public static class VO {

            

Reported by PMD.

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

Line: 16

                  }
    
    public static class VO {
        public Double value;
    }
}

            

Reported by PMD.

src/test/java/com/alibaba/json/bvt/parser/taobao/FloatObjectFieldTest.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 FloatObjectFieldTest extends TestCase {
    public void test_0 () throws Exception {
        VO vo = JSON.parseObject("{\"value\":1001}", VO.class);
        Assert.assertTrue(1001F == vo.value);
    }
    
    public static class VO {

            

Reported by PMD.

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

Line: 16

                  }
    
    public static class VO {
        public Float value;
    }
}

            

Reported by PMD.

src/test/java/com/alibaba/json/bvt/parser/taobao/IntAsStringTest.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 IntAsStringTest extends TestCase {
    public void test_0 () throws Exception {
        VO vo = JSON.parseObject("{\"value\":\"1001\"}", VO.class);
        Assert.assertEquals(1001, vo.value);
    }
    
    public static class VO {

            

Reported by PMD.

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

Line: 16

                  }
    
    public static class VO {
        public int value;
    }
}

            

Reported by PMD.

src/test/java/com/alibaba/json/bvt/parser/taobao/LongAsStringTest.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 LongAsStringTest extends TestCase {
    public void test_0 () throws Exception {
        VO vo = JSON.parseObject("{\"value\":\"1001\"}", VO.class);
        Assert.assertEquals(1001L, vo.value);
    }
    
    public static class VO {

            

Reported by PMD.

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

Line: 16

                  }
    
    public static class VO {
        public long value;
    }
}

            

Reported by PMD.

src/test/java/com/alibaba/json/bvt/parser/deser/generic/GenericArrayTest5.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 GenericArrayTest5 extends TestCase {
    
    public void test_generic() throws Exception {
        VO vo = new VO();
        vo.values = new Number[] {1, 1};
        
        String text = JSON.toJSONString(vo);
        VO vo1 = JSON.parseObject(text, VO.class);

            

Reported by PMD.

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

Line: 24

                  }

    public static class A<T extends Number> {
        public T[] values;
    }
    
    public static class VO<T extends Number> extends A<T> {
        
    }

            

Reported by PMD.

src/test/java/com/alibaba/json/bvt/parser/deser/generic/GenericArrayTest2.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 GenericArrayTest2 extends TestCase {
    
    public void test_generic() throws Exception {
        VO vo = new VO();
        vo.values = new String[] {"a", "b"};
        
        String text = JSON.toJSONString(vo);
        VO vo1 = JSON.parseObject(text, VO.class);

            

Reported by PMD.

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

Line: 24

                  }

    public static class A<T> {
        public T[] values;
    }
    
    public static class VO extends A {
        
    }

            

Reported by PMD.

src/test/java/com/alibaba/json/bvt/parser/deser/generic/GenericArrayTest.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 GenericArrayTest extends TestCase {
    
    public void test_generic() throws Exception {
        VO vo = new VO();
        vo.values = new Number[] {1, 1};
        
        String text = JSON.toJSONString(vo);
        VO vo1 = JSON.parseObject(text, VO.class);

            

Reported by PMD.

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

Line: 24

                  }

    public static class A<T extends Number> {
        public T[] values;
    }
    
    public static class VO extends A {
        
    }

            

Reported by PMD.

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

Line: 10

               * Created by wenshao on 30/03/2017.
 */
public class ExtraTest extends TestCase {
    public void test_0() throws Exception {
        JSON.parseObject("{\"ID\":123}", Model.class);
    }

    public static class Model {
        public int 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: 10

               * Created by wenshao on 30/03/2017.
 */
public class ExtraTest extends TestCase {
    public void test_0() throws Exception {
        JSON.parseObject("{\"ID\":123}", Model.class);
    }

    public static class Model {
        public int id;

            

Reported by PMD.

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

    public void test_list_map() throws Exception {
        Entity entity = new Entity(123, "wenshao");
        JSONPath path = new JSONPath("$['id']");
        
        Assert.assertSame(entity.getId(), path.eval(entity));
    }

            

Reported by PMD.

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

Line: 18

                      Assert.assertSame(entity.getId(), path.eval(entity));
    }

    public static class Entity {

        private Integer id;
        private String  name;

        public Entity(Integer id, String name){

            

Reported by PMD.

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

    public void test_create() throws Exception {
        Exception error = null;
        try {
            JSON.parseObject("{\"id\":123,\"name\":\"abc\"}", Entity.class);
        } catch (JSONException ex) {
            error = ex;

            

Reported by PMD.

Found 'DD'-anomaly for variable 'error' (lines '15'-'19').
Error

Line: 15

              public class JSONCreatorTest_error2 extends TestCase {

    public void test_create() throws Exception {
        Exception error = null;
        try {
            JSON.parseObject("{\"id\":123,\"name\":\"abc\"}", Entity.class);
        } catch (JSONException ex) {
            error = ex;
        }

            

Reported by PMD.