The following issues were found

src/test/java/com/alibaba/json/test/vans/VansGeometryDataMetaData.java
2 issues
The class 'VansGeometryDataMetaData' is suspected to be a Data Class (WOC=0.000%, NOPA=6, NOAM=0, WMC=1)
Design

Line: 9

               * Created by xiaolin_kxl on 16/12/28.
 */

public class VansGeometryDataMetaData implements Serializable {
    public int version;
    public int uvs;
    public int normals;
    public int faces;
    public int vertices;

            

Reported by PMD.

Classes implementing Serializable should set a serialVersionUID
Error

Line: 9

               * Created by xiaolin_kxl on 16/12/28.
 */

public class VansGeometryDataMetaData implements Serializable {
    public int version;
    public int uvs;
    public int normals;
    public int faces;
    public int vertices;

            

Reported by PMD.

src/test/java/com/alibaba/json/test/vans/VansObject.java
2 issues
Classes implementing Serializable should set a serialVersionUID
Error

Line: 12

               * Created by xiaolin_kxl on 17/1/5.
 */
@JSONType(orders = {"uuid","type","matrix","children"})
public class VansObject implements Serializable {
    public String uuid;
    public String type;
    public ArrayList<VansObjectChildren> children;
    public float[] matrix;
}

            

Reported by PMD.

Avoid using implementation types like 'ArrayList'; use the interface instead
Design

Line: 15

              public class VansObject implements Serializable {
    public String uuid;
    public String type;
    public ArrayList<VansObjectChildren> children;
    public float[] matrix;
}

            

Reported by PMD.

src/test/java/com/alibaba/json/bvt/writeAsArray/WriteAsArray_byte_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_byte_public extends TestCase {
    public void test_0 () throws Exception {
        VO vo = new VO();
        vo.setId((byte)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 byte id;
        private String name;

        public byte getId() {
            return id;

            

Reported by PMD.

src/test/java/com/derbysoft/spitfire/fastjson/dto/GuestCountDTO.java
2 issues
The class 'GuestCountDTO' is suspected to be a Data Class (WOC=0.000%, NOPA=0, NOAM=4, WMC=6)
Design

Line: 3

              package com.derbysoft.spitfire.fastjson.dto;

public class GuestCountDTO extends AbstractDTO{
    private AgeQualifyingType ageQualifyingType;
    private int count;

    public GuestCountDTO() {
    }


            

Reported by PMD.

Avoid unused constructor parameters such as 'count'.
Design

Line: 10

                  public GuestCountDTO() {
    }

    public GuestCountDTO(AgeQualifyingType ageQualifyingType, int count) {
        this.ageQualifyingType = ageQualifyingType;
    }

    public AgeQualifyingType getAgeQualifyingType() {
        return ageQualifyingType;

            

Reported by PMD.

src/test/java/com/derbysoft/spitfire/fastjson/dto/MealsIncludedDTO.java
2 issues
The class 'MealsIncludedDTO' is suspected to be a Data Class (WOC=0.000%, NOPA=0, NOAM=4, WMC=6)
Design

Line: 3

              package com.derbysoft.spitfire.fastjson.dto;

public class MealsIncludedDTO extends AbstractDTO{
    private MealsIncludedType mealsIncludedType;

    private int breakfastNumber;

    public MealsIncludedDTO() {
    }

            

Reported by PMD.

Avoid unused constructor parameters such as 'type'.
Design

Line: 11

                  public MealsIncludedDTO() {
    }

    public MealsIncludedDTO(MealsIncludedType type) {
    }

    public MealsIncludedType getMealsIncludedType() {
        return mealsIncludedType;
    }

            

Reported by PMD.

src/test/java/com/derbysoft/spitfire/fastjson/dto/RoomTypeDTO.java
2 issues
Too many fields
Design

Line: 6

              import java.util.ArrayList;
import java.util.List;

public class RoomTypeDTO extends AbstractDTO {
    private String code;

    private String name;

    private String description;

            

Reported by PMD.

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

Line: 6

              import java.util.ArrayList;
import java.util.List;

public class RoomTypeDTO extends AbstractDTO {
    private String code;

    private String name;

    private String description;

            

Reported by PMD.

src/test/java/oracle/sql/TIMESTAMP.java
2 issues
Private field 'date' could be made final; it is only initialized in the declaration or constructor.
Design

Line: 8

              
public class TIMESTAMP {

    private Date date;

    public TIMESTAMP(Timestamp date){
        this.date = date;
    }
    

            

Reported by PMD.

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

Line: 8

              
public class TIMESTAMP {

    private Date date;

    public TIMESTAMP(Timestamp date){
        this.date = date;
    }
    

            

Reported by PMD.

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

    public void test_for_error() throws Exception {
        Exception error = null;
        try {
            JSON.parse("[\"wenshao\"");   
        } catch (JSONException ex) {
            error = ex;

            

Reported by PMD.

Found 'DD'-anomaly for variable 'error' (lines '13'-'17').
Error

Line: 13

              public class ParseErrorTest_19 extends TestCase {

    public void test_for_error() throws Exception {
        Exception error = null;
        try {
            JSON.parse("[\"wenshao\"");   
        } catch (JSONException ex) {
            error = ex;
        }

            

Reported by PMD.

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

    public void test_0() throws Exception {
        JSON.parseObject("{\"value\":{\"@type\":\"com.alibaba.json.bvt.parser.error.TypeNotMatchError$AA\"}}", Model.class);
        
        Exception error = null;
        try {
        JSON.parseObject("{\"value\":{\"@type\":\"com.alibaba.json.bvt.parser.error.TypeNotMatchError$B\"}}", Model.class);

            

Reported by PMD.

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

Line: 15

                  public void test_0() throws Exception {
        JSON.parseObject("{\"value\":{\"@type\":\"com.alibaba.json.bvt.parser.error.TypeNotMatchError$AA\"}}", Model.class);
        
        Exception error = null;
        try {
        JSON.parseObject("{\"value\":{\"@type\":\"com.alibaba.json.bvt.parser.error.TypeNotMatchError$B\"}}", Model.class);
        } catch (JSONException ex) {
            error = ex;
        }

            

Reported by PMD.

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

    public void test_0() throws Exception {
        String text = "{\"value\":-21474836481}";
        JSONObject obj = (JSONObject) JSON.parse(text);
        Assert.assertEquals(Long.valueOf(-21474836481L), obj.get("value"));

    }

            

Reported by PMD.

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

Line: 15

                  public void test_0() throws Exception {
        String text = "{\"value\":-21474836481}";
        JSONObject obj = (JSONObject) JSON.parse(text);
        Assert.assertEquals(Long.valueOf(-21474836481L), obj.get("value"));

    }
}

            

Reported by PMD.