The following issues were found

src/test/java/com/alibaba/json/bvtVO/AccessHttpConfigModel.java
3 issues
The class 'AccessHttpConfigModel' is suspected to be a Data Class (WOC=0.000%, NOPA=0, NOAM=14, WMC=14)
Design

Line: 6

              import java.io.Serializable;


public class AccessHttpConfigModel {
    /**
     * 上传文件的配置.
     *
     * @author wangwb (mailto:wangwb@primeton.com)
     */

            

Reported by PMD.

Classes implementing Serializable should set a serialVersionUID
Error

Line: 13

                   * @author wangwb (mailto:wangwb@primeton.com)
     */
    
    public static class FileUploadConfig implements Serializable{
        private String tempDir;

        private int maxSize;

        private int inMemorySize;

            

Reported by PMD.

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

Line: 13

                   * @author wangwb (mailto:wangwb@primeton.com)
     */
    
    public static class FileUploadConfig implements Serializable{
        private String tempDir;

        private int maxSize;

        private int inMemorySize;

            

Reported by PMD.

src/test/java/com/alibaba/json/bvt/writeClassName/WriteDuplicateType.java
3 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: 16

              
public class WriteDuplicateType extends TestCase {

    public void test_dupType() throws Exception {
        DianDianCart cart = new DianDianCart();
        cart.setId(1001);
        
        LinkedHashMap<String, JSONObject> cartMap = new LinkedHashMap<String, JSONObject>();
        

            

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

                      
    }
    
    public void test_dupType2() throws Exception {
        DianDianCart cart = new DianDianCart();
        cart.setId(1001);
        
        LinkedHashMap<String, HashMap<String, Object>> cartMap = new LinkedHashMap<String, HashMap<String, Object>>();
        

            

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

                  }
    
    
    public void test_dupType3() throws Exception {
        DianDianCart cart = new DianDianCart();
        cart.setId(1001);
        
        LinkedHashMap<String, LinkedHashMap<String, Object>> cartMap = new LinkedHashMap<String, LinkedHashMap<String, Object>>();
        

            

Reported by PMD.

src/test/java/com/alibaba/json/test/a/GsonTest.java
3 issues
JUnit tests should include assert() or fail()
Design

Line: 11

               * Created by wenshao on 04/02/2017.
 */
public class GsonTest extends TestCase {
    public void test_0() throws Exception {
        String text = "{\"loader\":\"com.sun.org.apache.bcel.internal.util.ClassLoader\"}";

//        Gson gson = new Gson();
//        gson.fromJson(text, Model.class);


            

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

               * Created by wenshao on 04/02/2017.
 */
public class GsonTest extends TestCase {
    public void test_0() throws Exception {
        String text = "{\"loader\":\"com.sun.org.apache.bcel.internal.util.ClassLoader\"}";

//        Gson gson = new Gson();
//        gson.fromJson(text, Model.class);


            

Reported by PMD.

Avoid unused imports such as 'com.google.gson.Gson'
Design

Line: 4

              package com.alibaba.json.test.a;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.gson.Gson;
import junit.framework.TestCase;

/**
 * Created by wenshao on 04/02/2017.
 */

            

Reported by PMD.

src/test/java/com/alibaba/json/demo/Demo1.java
3 issues
System.out.println is used
Design

Line: 18

                      jsonObject.put("salary", new BigDecimal(8000));

        String text = jsonObject.toJSONString();
        System.out.println(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: 11

              
public class Demo1 extends TestCase {

    public void test_0() throws Exception {
        JSONObject jsonObject = new JSONObject();
        jsonObject.put("name", "Jobs");
        jsonObject.put("age", 50);
        jsonObject.put("salary", new BigDecimal(8000));


            

Reported by PMD.

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

Line: 11

              
public class Demo1 extends TestCase {

    public void test_0() throws Exception {
        JSONObject jsonObject = new JSONObject();
        jsonObject.put("name", "Jobs");
        jsonObject.put("age", 50);
        jsonObject.put("salary", new BigDecimal(8000));


            

Reported by PMD.

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

Line: 15

              
public class GroupEncode extends BenchmarkCase {

    private Object object;

    public GroupEncode(){
        super("GroupEncode");

        try {

            

Reported by PMD.

Ensure that resources like this InputStream object are closed after use
Error

Line: 22

              
        try {
            String resource = "json/group.json";
            InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream(resource);
            String text = IOUtils.toString(is);
            is.close();

            object = JSON.parseObject(text, Group.class);
        } catch (IOException ex) {

            

Reported by PMD.

Avoid printStackTrace(); use a logger call instead.
Design

Line: 28

              
            object = JSON.parseObject(text, Group.class);
        } catch (IOException ex) {
            ex.printStackTrace();
        }
    }

    @Override
    public void execute(Codec codec) throws Exception {

            

Reported by PMD.

src/test/java/com/alibaba/json/test/benchmark/entity/Entity100String.java
3 issues
This class has a bunch of public methods and attributes
Design

Line: 1

              package com.alibaba.json.test.benchmark.entity;

public class Entity100String {

    private String f0  = "0";
    private String f1  = "1";
    private String f2  = "2";
    private String f3  = "3";
    private String f4  = "4";

            

Reported by PMD.

The class 'Entity100String' has a total cyclomatic complexity of 200 (highest 1).
Design

Line: 3

              package com.alibaba.json.test.benchmark.entity;

public class Entity100String {

    private String f0  = "0";
    private String f1  = "1";
    private String f2  = "2";
    private String f3  = "3";
    private String f4  = "4";

            

Reported by PMD.

Too many fields
Design

Line: 3

              package com.alibaba.json.test.benchmark.entity;

public class Entity100String {

    private String f0  = "0";
    private String f1  = "1";
    private String f2  = "2";
    private String f3  = "3";
    private String f4  = "4";

            

Reported by PMD.

src/test/java/com/alibaba/json/test/codegen/GenTest.java
3 issues
System.out.println is used
Design

Line: 17

              
        generator.gen();

        System.out.println(out.toString());
    }
}

            

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

              
public class GenTest extends TestCase {

    public void test_codegen() throws Exception {
        StringBuffer out = new StringBuffer();
        DeserializerGen generator = new DeserializerGen(MediaContent.class, out);

        generator.gen();


            

Reported by PMD.

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

Line: 11

              
public class GenTest extends TestCase {

    public void test_codegen() throws Exception {
        StringBuffer out = new StringBuffer();
        DeserializerGen generator = new DeserializerGen(MediaContent.class, out);

        generator.gen();


            

Reported by PMD.

src/test/java/com/alibaba/json/test/tmall/RateSearchItemDO.java
3 issues
This class has a bunch of public methods and attributes
Design

Line: 1

              package com.alibaba.json.test.tmall;

import com.alibaba.fastjson.annotation.JSONField;

/**
 * ���������������
 * User: jingxian.lzg
 * Date: 2015/8/17
 * Time: 16:26

            

Reported by PMD.

The class 'RateSearchItemDO' has a total cyclomatic complexity of 97 (highest 1).
Design

Line: 11

               * Date: 2015/8/17
 * Time: 16:26
 */
public class RateSearchItemDO {
    /**
     * ����id
     */
    @JSONField(name = "feed_id")
    private long feedId;

            

Reported by PMD.

Too many fields
Design

Line: 11

               * Date: 2015/8/17
 * Time: 16:26
 */
public class RateSearchItemDO {
    /**
     * ����id
     */
    @JSONField(name = "feed_id")
    private long feedId;

            

Reported by PMD.

src/test/java/com/derbysoft/spitfire/fastjson/Generic.java
3 issues
Classes implementing Serializable should set a serialVersionUID
Error

Line: 6

              import java.io.Serializable;
import java.util.List;

public class Generic<T> implements Serializable{
        String header;
        T payload;

//        List<T>


            

Reported by PMD.

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

Line: 6

              import java.io.Serializable;
import java.util.List;

public class Generic<T> implements Serializable{
        String header;
        T payload;

//        List<T>


            

Reported by PMD.

Avoid unused imports such as 'java.util.List'
Design

Line: 4

              package com.derbysoft.spitfire.fastjson;

import java.io.Serializable;
import java.util.List;

public class Generic<T> implements Serializable{
        String header;
        T payload;


            

Reported by PMD.

src/test/java/com/alibaba/json/test/entity/case1/IntObject_100_Entity.java
3 issues
This class has a bunch of public methods and attributes
Design

Line: 1

              package com.alibaba.json.test.entity.case1;

public class IntObject_100_Entity {

    private Integer f0;
    private Integer f1;
    private Integer f2;
    private Integer f3;
    private Integer f4;

            

Reported by PMD.

The class 'IntObject_100_Entity' has a total cyclomatic complexity of 200 (highest 1).
Design

Line: 3

              package com.alibaba.json.test.entity.case1;

public class IntObject_100_Entity {

    private Integer f0;
    private Integer f1;
    private Integer f2;
    private Integer f3;
    private Integer f4;

            

Reported by PMD.

Too many fields
Design

Line: 3

              package com.alibaba.json.test.entity.case1;

public class IntObject_100_Entity {

    private Integer f0;
    private Integer f1;
    private Integer f2;
    private Integer f3;
    private Integer f4;

            

Reported by PMD.