The following issues were found

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

Line: 7

               * Author : BlackShadowWalker
 * Date   : 2016-09-06
 */
public class MyResponse<T> {

    Boolean success;
    Integer errCode;
    String errDes;
    T       result;

            

Reported by PMD.

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

    public void test_0() throws Exception {
        String text = "{\"u1\":{\"id\":123,\"name\":\"wenshao\"},\"u2\":{\"$ref\":\"..\"}}";
        Map<String, Object> map = JSON.parseObject(text, new TypeReference<Map<String, Object>>() {});
        //Assert.assertEquals(map, map.get("this"));
        Assert.assertSame(map, map.get("u2"));
    }

            

Reported by PMD.

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

Line: 9

              


public class ObjectJ_B {

	private long a;

	private int b;


            

Reported by PMD.

src/test/java/com/alibaba/json/bvt/bug/Issue743.java
1 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: 13

              
public class Issue743 extends TestCase {

    public void test_for_issue() throws Exception {
        String temp = "{\"option_1\": \"\\u4e0d\\u5403\\u6216\\u5c11\\u4e8e1\\u6b21\"}";
        JSONObject object = JSON.parseObject(temp);
        Assert.assertEquals("{\"option_1\":\"不吃或少于1次\"}", JSON.toJSONString(object));
        Assert.assertEquals("{\"option_1\":\"\\u4E0D\\u5403\\u6216\\u5C11\\u4E8E1\\u6B21\"}", JSON.toJSONString(object, SerializerFeature.BrowserCompatible));
    }

            

Reported by PMD.

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

Line: 9

              import java.util.List;


public class ObjectV1_A {
	
	private int a;
	
	private List<Integer> b;
	

            

Reported by PMD.

src/main/java/com/alibaba/fastjson/util/GenericArrayTypeImpl.java
1 issues
Potential violation of Law of Demeter (object not created locally)
Design

Line: 36

                  public boolean equals(Object obj) {
        if (obj instanceof GenericArrayType) {
            GenericArrayType that = (GenericArrayType) obj;
            return this.genericComponentType.equals(that.getGenericComponentType());
        }
        return false;
    }

    @Override

            

Reported by PMD.

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

Line: 9

              import java.util.List;


public class ObjectJ_A {

	
	private long a;

	

            

Reported by PMD.

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

Line: 8

              


public class ObjectJ2 {

    
    private boolean a;

    

            

Reported by PMD.

src/test/java/com/alibaba/fastjson/serializer/TestBean.java
1 issues
The class 'TestBean' is suspected to be a Data Class (WOC=0.000%, NOPA=0, NOAM=4, WMC=4)
Design

Line: 9

               * java bean for test
 * Created by yixian on 2016-02-25.
 */
class TestBean {
    private JSONObject data;
    private String name;

    public JSONObject getData() {
        return data;

            

Reported by PMD.

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

    @SuppressWarnings("deprecation")
    public void test_0() throws Exception {
        JSONObject json = new JSONObject();
        json.put("hello\t", "World\t!");
        Assert.assertEquals("{\"hello\\t\":\"World\\t!\"}", JSON.toJSONString(json));
        Assert.assertEquals("{\"hello\\t\":\"World\\t!\"}", JSON.toJSONStringZ(json, SerializeConfig.getGlobalInstance()));

            

Reported by PMD.