The following issues were found

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

Line: 7

              import java.util.List;

public class OfferRankResultVO {
	private List<SearchCenterOfferModel> models = new ArrayList<SearchCenterOfferModel>();
	
	public OfferRankResultVO() {
		models.add(new SearchCenterOfferModel());
	}


            

Reported by PMD.

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

Line: 23

              
}

class SearchCenterOfferModel {
	private int id;
	private String name;

	public int getId() {
		return id;

            

Reported by PMD.

src/test/java/com/alibaba/json/bvtVO/mogujie/BaseDTO.java
2 issues
The class 'BaseDTO' is suspected to be a Data Class (WOC=14.286%, NOPA=0, NOAM=6, WMC=7)
Design

Line: 8

              /**
 * Created by wenshao on 16/03/2017.
 */
public class BaseDTO implements Serializable {
    /**
     *  serialVersionUID
     */
    private static final long serialVersionUID = -1;


            

Reported by PMD.

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

Line: 22

                  /**
     * is online test
     */
    private Boolean           onlineTest = Boolean.FALSE;

    /**
     * http referer
     */
    private String referer;

            

Reported by PMD.

src/test/java/com/alibaba/json/bvtVO/mogujie/BindQueryRespDTO.java
2 issues
Too many fields
Design

Line: 8

              /**
 * Created by wenshao on 16/03/2017.
 */
public class BindQueryRespDTO {

    /**
     * version
     */
    public int            f0;

            

Reported by PMD.

Avoid unused imports such as 'java.io.Serializable'
Design

Line: 3

              package com.alibaba.json.bvtVO.mogujie;

import java.io.Serializable;

/**
 * Created by wenshao on 16/03/2017.
 */
public class BindQueryRespDTO {


            

Reported by PMD.

src/test/java/com/alibaba/json/demo/DateDemo.java
2 issues
JUnit 4 tests that set up tests should use the @Before annotation, JUnit5 tests should use @BeforeEach or @BeforeAll
Design

Line: 16

              import com.alibaba.fastjson.serializer.SimpleDateFormatSerializer;

public class DateDemo extends TestCase { 
    protected void setUp() throws Exception {
        JSON.defaultTimeZone = TimeZone.getTimeZone("Asia/Shanghai");
        JSON.defaultLocale = Locale.CHINA;
    }
    
    public void test_0() throws Exception {

            

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

                      JSON.defaultLocale = Locale.CHINA;
    }
    
    public void test_0() throws Exception {
        Date date = new Date(); 
        String text = JSON.toJSONString(date, mapping);
        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd", JSON.defaultLocale);
        format.setTimeZone(JSON.defaultTimeZone);
        Assert.assertEquals(JSON.toJSONString(format.format(date)), text);

            

Reported by PMD.

src/test/java/com/alibaba/json/demo/hibernate/data/Employee.java
2 issues
The class 'Employee' is suspected to be a Data Class (WOC=0.000%, NOPA=0, NOAM=18, WMC=21)
Design

Line: 15

              @Table(name="Employee"
    ,catalog="classicmodels"
)
public class Employee  implements java.io.Serializable
{
     private Integer employeeNumber;
     private Office office;
     private String lastName;
     private String firstName;

            

Reported by PMD.

Avoid unused imports such as 'javax.persistence'
Design

Line: 5

              
import java.util.HashSet;
import java.util.Set;
import javax.persistence.*;
import static javax.persistence.GenerationType.IDENTITY;

import com.fasterxml.jackson.annotation.JsonManagedReference;

@SuppressWarnings("serial")

            

Reported by PMD.

src/test/java/com/alibaba/json/demo/hibernate/data/Office.java
2 issues
The class 'Office' is suspected to be a Data Class (WOC=0.000%, NOPA=0, NOAM=20, WMC=23)
Design

Line: 19

              @Table(name="Office"
    ,catalog="classicmodels"
)
public class Office  implements java.io.Serializable {


     private String officeCode;
     private String city;
     private String phone;

            

Reported by PMD.

Avoid long parameter lists.
Design

Line: 46

                      this.postalCode = postalCode;
        this.territory = territory;
    }
    public Office(String officeCode, String city, String phone, String addressLine1, String addressLine2, String state, String country, String postalCode, String territory, Set<Employee> employees) {
       this.officeCode = officeCode;
       this.city = city;
       this.phone = phone;
       this.addressLine1 = addressLine1;
       this.addressLine2 = addressLine2;

            

Reported by PMD.

src/test/java/com/alibaba/json/test/benchmark/BenchmarkCase.java
2 issues
A method/constructor should not explicitly throw java.lang.Exception
Design

Line: 18

                      return name;
    }
    
    public void init(Codec codec) throws Exception {
        
    }
    
    public abstract void execute(Codec codec) throws Exception;
}

            

Reported by PMD.

A method/constructor should not explicitly throw java.lang.Exception
Design

Line: 22

                      
    }
    
    public abstract void execute(Codec codec) throws Exception;
}

            

Reported by PMD.

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

Line: 7

              
public class BenchmarkTest extends TestCase {

    public void test_benchmark() throws Exception {
    	BenchmarkMain.main(new String[]{});
    }
}

            

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

              
public class BenchmarkTest extends TestCase {

    public void test_benchmark() throws Exception {
    	BenchmarkMain.main(new String[]{});
    }
}

            

Reported by PMD.

src/test/java/com/alibaba/json/test/benchmark/decode/Entity100IntDecode.java
2 issues
Private field 'text' could be made final; it is only initialized in the declaration or constructor.
Design

Line: 10

              
public class Entity100IntDecode extends BenchmarkCase {

    private String text;

    public Entity100IntDecode(){
        super("StringArray1000Decode");

        this.text = JSON.toJSONString(new Entity100Int());

            

Reported by PMD.

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

Line: 10

              
public class Entity100IntDecode extends BenchmarkCase {

    private String text;

    public Entity100IntDecode(){
        super("StringArray1000Decode");

        this.text = JSON.toJSONString(new Entity100Int());

            

Reported by PMD.

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

Line: 10

              
public class Entity100StringDecode extends BenchmarkCase {

    private String text;

    public Entity100StringDecode(){
        super("Entity100StringDecode");

        this.text = JSON.toJSONString(new Entity100String());

            

Reported by PMD.

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

Line: 10

              
public class Entity100StringDecode extends BenchmarkCase {

    private String text;

    public Entity100StringDecode(){
        super("Entity100StringDecode");

        this.text = JSON.toJSONString(new Entity100String());

            

Reported by PMD.