The following issues were found

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

    public void test_codec_null() throws Exception {
        V0 v = new V0();

        SerializeConfig mapping = new SerializeConfig();
        mapping.setAsmEnable(false);


            

Reported by PMD.

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

Line: 23

              
        V0 v1 = JSON.parseObject(text, V0.class);

        Assert.assertEquals(v1.getValue(), v.getValue());
    }

    public void test_codec_null_1() throws Exception {
        V0 v = new V0();


            

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

                      Assert.assertEquals(v1.getValue(), v.getValue());
    }

    public void test_codec_null_1() throws Exception {
        V0 v = new V0();

        SerializeConfig mapping = new SerializeConfig();
        mapping.setAsmEnable(false);


            

Reported by PMD.

Returning 'value' may expose an internal array.
Design

Line: 41

                      private long[] value;

        public long[] getValue() {
            return value;
        }

        public void setValue(long[] value) {
            this.value = value;
        }

            

Reported by PMD.

The user-supplied array 'value' is stored directly.
Design

Line: 44

                          return value;
        }

        public void setValue(long[] value) {
            this.value = value;
        }

    }
}

            

Reported by PMD.

Consider using varargs for methods or constructors which take an array the last parameter.
Design

Line: 44

                          return value;
        }

        public void setValue(long[] value) {
            this.value = value;
        }

    }
}

            

Reported by PMD.

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

    public void test_codec_null() throws Exception {
        V0 v = new V0();

        SerializeConfig mapping = new SerializeConfig();
        mapping.setAsmEnable(false);


            

Reported by PMD.

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

Line: 23

              
        V0 v1 = JSON.parseObject(text, V0.class);

        Assert.assertEquals(v1.getValue(), v.getValue());
    }

    public void test_codec_null_1() throws Exception {
        V0 v = new V0();


            

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

                      Assert.assertEquals(v1.getValue(), v.getValue());
    }

    public void test_codec_null_1() throws Exception {
        V0 v = new V0();

        SerializeConfig mapping = new SerializeConfig();
        mapping.setAsmEnable(false);


            

Reported by PMD.

Returning 'value' may expose an internal array.
Design

Line: 41

                      private Object[] value;

        public Object[] getValue() {
            return value;
        }

        public void setValue(Object[] value) {
            this.value = value;
        }

            

Reported by PMD.

The user-supplied array 'value' is stored directly.
Design

Line: 44

                          return value;
        }

        public void setValue(Object[] value) {
            this.value = value;
        }

    }
}

            

Reported by PMD.

Consider using varargs for methods or constructors which take an array the last parameter.
Design

Line: 44

                          return value;
        }

        public void setValue(Object[] value) {
            this.value = value;
        }

    }
}

            

Reported by PMD.

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

    public void test_codec() throws Exception {
        User user = new User();
        user.setValue(Pattern.compile("."));

        SerializeConfig mapping = new SerializeConfig();
        mapping.setAsmEnable(false);

            

Reported by PMD.

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

Line: 24

              
        User user1 = JSON.parseObject(text, User.class);

        Assert.assertEquals(user1.getValue().pattern(), user.getValue().pattern());
    }

    public void test_codec_null() throws Exception {
        User user = new User();
        user.setValue(null);

            

Reported by PMD.

Potential violation of Law of Demeter (method chain calls)
Design

Line: 24

              
        User user1 = JSON.parseObject(text, User.class);

        Assert.assertEquals(user1.getValue().pattern(), user.getValue().pattern());
    }

    public void test_codec_null() throws Exception {
        User user = new User();
        user.setValue(null);

            

Reported by PMD.

Potential violation of Law of Demeter (method chain calls)
Design

Line: 24

              
        User user1 = JSON.parseObject(text, User.class);

        Assert.assertEquals(user1.getValue().pattern(), user.getValue().pattern());
    }

    public void test_codec_null() throws Exception {
        User user = new User();
        user.setValue(null);

            

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

                      Assert.assertEquals(user1.getValue().pattern(), user.getValue().pattern());
    }

    public void test_codec_null() throws Exception {
        User user = new User();
        user.setValue(null);

        SerializeConfig mapping = new SerializeConfig();
        mapping.setAsmEnable(false);

            

Reported by PMD.

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

Line: 37

              
        User user1 = JSON.parseObject(text, User.class);

        Assert.assertEquals(user1.getValue(), user.getValue());
    }

    public static class User {

        private Pattern value;

            

Reported by PMD.

src/test/java/com/alibaba/json/bvt/SpecialKeyTest2.java
6 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

              import junit.framework.TestCase;

public class SpecialKeyTest2 extends TestCase {
    public void test_0() throws Exception {
        Model model = JSON.parseObject("{\"items\":{\"1\":{},\"1001\":{}},\"items1\":{\"$ref\":\"$.items\"}}", Model.class);
        Assert.assertEquals(2, model.items.size());
        Assert.assertNotNull(model.items.get(1L));
        Assert.assertNotNull(model.items.get(1001L));
        Assert.assertSame(model.items, model.items1);

            

Reported by PMD.

Potential violation of Law of Demeter (static property access)
Design

Line: 14

              public class SpecialKeyTest2 extends TestCase {
    public void test_0() throws Exception {
        Model model = JSON.parseObject("{\"items\":{\"1\":{},\"1001\":{}},\"items1\":{\"$ref\":\"$.items\"}}", Model.class);
        Assert.assertEquals(2, model.items.size());
        Assert.assertNotNull(model.items.get(1L));
        Assert.assertNotNull(model.items.get(1001L));
        Assert.assertSame(model.items, model.items1);
    }
    

            

Reported by PMD.

Potential violation of Law of Demeter (static property access)
Design

Line: 15

                  public void test_0() throws Exception {
        Model model = JSON.parseObject("{\"items\":{\"1\":{},\"1001\":{}},\"items1\":{\"$ref\":\"$.items\"}}", Model.class);
        Assert.assertEquals(2, model.items.size());
        Assert.assertNotNull(model.items.get(1L));
        Assert.assertNotNull(model.items.get(1001L));
        Assert.assertSame(model.items, model.items1);
    }
    
    public static class Model {

            

Reported by PMD.

Potential violation of Law of Demeter (static property access)
Design

Line: 16

                      Model model = JSON.parseObject("{\"items\":{\"1\":{},\"1001\":{}},\"items1\":{\"$ref\":\"$.items\"}}", Model.class);
        Assert.assertEquals(2, model.items.size());
        Assert.assertNotNull(model.items.get(1L));
        Assert.assertNotNull(model.items.get(1001L));
        Assert.assertSame(model.items, model.items1);
    }
    
    public static class Model {
        public Map<Long, Item> items;

            

Reported by PMD.

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

Line: 21

                  }
    
    public static class Model {
        public Map<Long, Item> items;
        public Map<Long, Item> items1;
    }
    
    public static class Item {
    }

            

Reported by PMD.

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

Line: 22

                  
    public static class Model {
        public Map<Long, Item> items;
        public Map<Long, Item> items1;
    }
    
    public static class Item {
    }
}

            

Reported by PMD.

src/test/java/com/alibaba/json/bvt/StringFieldTest_special_1.java
6 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 junit.framework.TestCase;

public class StringFieldTest_special_1 extends TestCase {
    public void test_special() throws Exception {
        Model model = new Model();
        StringBuilder buf = new StringBuilder();
        for (int i = Character.MIN_VALUE; i < Character.MAX_VALUE; ++i) {
            buf.append((char) i);
        }

            

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

                      Assert.assertEquals(model.name, model2.name);
    }
    
    public void test_special_browsecue() throws Exception {
        Model model = new Model();
        StringBuilder buf = new StringBuilder();
        for (int i = Character.MIN_VALUE; i < Character.MAX_VALUE; ++i) {
            buf.append((char) i);
        }

            

Reported by PMD.

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

Line: 34

                      model.name = buf.toString();
        
        String text = JSON.toJSONString(model, SerializerFeature.BrowserSecure);
        text = text.replaceAll("&lt;", "<");
        text = text.replaceAll("&gt;", ">");
        Model model2 = JSON.parseObject(text, Model.class);
        Assert.assertEquals(model.name, model2.name);
    }
    

            

Reported by PMD.

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

Line: 35

                      
        String text = JSON.toJSONString(model, SerializerFeature.BrowserSecure);
        text = text.replaceAll("&lt;", "<");
        text = text.replaceAll("&gt;", ">");
        Model model2 = JSON.parseObject(text, Model.class);
        Assert.assertEquals(model.name, model2.name);
    }
    
    public void test_special_browsecompatible() 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: 40

                      Assert.assertEquals(model.name, model2.name);
    }
    
    public void test_special_browsecompatible() throws Exception {
        Model model = new Model();
        StringBuilder buf = new StringBuilder();
        for (int i = Character.MIN_VALUE; i < Character.MAX_VALUE; ++i) {
            buf.append((char) i);
        }

            

Reported by PMD.

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

Line: 56

                  
    public static class Model {

        public String name;

    }
}

            

Reported by PMD.

src/test/java/com/alibaba/json/bvt/asm/Case_Eishay.java
6 issues
System.out.println is used
Design

Line: 22

              
    public void test_0() throws Exception {
        //JavaBeanMapping.getGlobalInstance().setAsmEnable(false);
        System.out.println(text);
        MediaContent object = JSON.parseObject(text, MediaContent.class);
        String text2 = JSON.toJSONString(object, SerializerFeature.WriteEnumUsingToString);
        System.out.println(text2);
        System.out.println(JSON.toJSONString(JSON.parseObject(text2), true));
    }

            

Reported by PMD.

System.out.println is used
Design

Line: 25

                      System.out.println(text);
        MediaContent object = JSON.parseObject(text, MediaContent.class);
        String text2 = JSON.toJSONString(object, SerializerFeature.WriteEnumUsingToString);
        System.out.println(text2);
        System.out.println(JSON.toJSONString(JSON.parseObject(text2), true));
    }

}

            

Reported by PMD.

System.out.println is used
Design

Line: 26

                      MediaContent object = JSON.parseObject(text, MediaContent.class);
        String text2 = JSON.toJSONString(object, SerializerFeature.WriteEnumUsingToString);
        System.out.println(text2);
        System.out.println(JSON.toJSONString(JSON.parseObject(text2), true));
    }

}

            

Reported by PMD.

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

Line: 13

              
public class Case_Eishay extends TestCase {

    private final String text;

    public Case_Eishay(){
        super();
        this.text = EishayDecodeBytes.instance.getText();
    }

            

Reported by PMD.

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

Line: 20

                      this.text = EishayDecodeBytes.instance.getText();
    }

    public void test_0() throws Exception {
        //JavaBeanMapping.getGlobalInstance().setAsmEnable(false);
        System.out.println(text);
        MediaContent object = JSON.parseObject(text, MediaContent.class);
        String text2 = JSON.toJSONString(object, SerializerFeature.WriteEnumUsingToString);
        System.out.println(text2);

            

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

                      this.text = EishayDecodeBytes.instance.getText();
    }

    public void test_0() throws Exception {
        //JavaBeanMapping.getGlobalInstance().setAsmEnable(false);
        System.out.println(text);
        MediaContent object = JSON.parseObject(text, MediaContent.class);
        String text2 = JSON.toJSONString(object, SerializerFeature.WriteEnumUsingToString);
        System.out.println(text2);

            

Reported by PMD.

src/test/java/com/alibaba/json/bvt/asm/SortFieldTest.java
6 issues
System.out.println is used
Design

Line: 31

                  V1 entity = new V1();

    String text = JSON.toJSONString(entity, SerializerFeature.SortField);
    System.out.println(text);

    // 按字段顺序输出
    // {"f1":0,"f2":0,"f3":0,"f4":0,"f5":0} 
    Assert.assertEquals("{\"f1\":0,\"f2\":0,\"f3\":0,\"f4\":0,\"f5\":0}", 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: 14

              
public class SortFieldTest extends TestCase {

    public void test_0() throws Exception {
        V0 entity = new V0();

        String text = JSON.toJSONString(entity, SerializerFeature.UseSingleQuotes, SerializerFeature.SortField);

        Assert.assertEquals("{'f0':0,'f1':0,'f10':0,'f11':0,'f12':0,'f13':0,'f14':0,'f2':0,'f3':0,'f4':0,'f5':0,'f6':0,'f7':0,'f8':0,'f9':0}", text);

            

Reported by PMD.

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

Line: 21

              
        Assert.assertEquals("{'f0':0,'f1':0,'f10':0,'f11':0,'f12':0,'f13':0,'f14':0,'f2':0,'f3':0,'f4':0,'f5':0,'f6':0,'f7':0,'f8':0,'f9':0}", text);

        LinkedHashMap object = JSON.parseObject(text, LinkedHashMap.class);
        text = JSON.toJSONString(object, SerializerFeature.UseSingleQuotes, SerializerFeature.SortField);
        Assert.assertEquals("{'f0':0,'f1':0,'f10':0,'f11':0,'f12':0,'f13':0,'f14':0,'f2':0,'f3':0,'f4':0,'f5':0,'f6':0,'f7':0,'f8':0,'f9':0}", 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: 27

              
    }
    
public void test_1() throws Exception {
    V1 entity = new V1();

    String text = JSON.toJSONString(entity, SerializerFeature.SortField);
    System.out.println(text);


            

Reported by PMD.

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

Line: 43

              
}

public static class V1 {

    private int f2;
    private int f1;
    private int f4;
    private int f3;

            

Reported by PMD.

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

Line: 63

                  public void setF5(int f5) {this.f5 = f5;}
}

    public static class V0 {

        private int f5;
        private int f4;
        private int f3;
        private int f2;

            

Reported by PMD.

src/test/java/com/alibaba/json/bvt/basicType/LongTest_browserCompatible.java
6 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: 17

              import junit.framework.TestCase;

public class LongTest_browserCompatible extends TestCase {
    public void test_array() throws Exception {
        long[] values = new long[] {Long.MIN_VALUE, -1, 0, 1, Long.MAX_VALUE};
        String text = JSON.toJSONString(values, SerializerFeature.BrowserCompatible);
        long[] values_2 = JSON.parseObject(text, long[].class);
        Assert.assertEquals(values_2.length, values.length);
        for (int i = 0; i < values.length; ++i) {

            

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

                      }
    }
    
    public void test_array_writer() throws Exception {
        long[] values = new long[] {Long.MIN_VALUE, -1, 0, 1, Long.MAX_VALUE};
        
        StringWriter writer = new StringWriter();
        JSON.writeJSONString(writer, values, SerializerFeature.BrowserCompatible);
        String text = writer.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: 40

                      }
    }
    
    public void test_array_writer_2() throws Exception {
        Random random = new Random();
        long[] values = new long[2048];
        for (int i = 0; i < values.length; ++i) {
            values[i] = random.nextLong();
        }

            

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

                      }
    }
    
    public void test_map() throws Exception {
        long[] values = new long[] {Long.MIN_VALUE, -1, 0, 1, Long.MAX_VALUE};
        Map<String, Object> map = new HashMap<String, Object>();
        for (int i = 0; i < values.length; ++i) {
            map.put(Long.toString(i), values[i]);
        }

            

Reported by PMD.

Found 'DU'-anomaly for variable 'random' (lines '41'-'55').
Error

Line: 41

                  }
    
    public void test_array_writer_2() throws Exception {
        Random random = new Random();
        long[] values = new long[2048];
        for (int i = 0; i < values.length; ++i) {
            values[i] = random.nextLong();
        }
        

            

Reported by PMD.

Found 'DU'-anomaly for variable 'obj' (lines '65'-'69').
Error

Line: 65

                      }
        
        String text = JSON.toJSONString(map, SerializerFeature.BrowserCompatible);
        JSONObject obj = JSON.parseObject(text);
        for (int i = 0; i < values.length; ++i) {
            Assert.assertEquals(values[i], ((Number) obj.getLong(Long.toString(i))).longValue());
        }
    }
}

            

Reported by PMD.

src/test/java/com/alibaba/json/bvt/bug/Bug_for_SpitFire_4.java
6 issues
No abstract method which means that the keyword is most likely used to prevent instantiation. Use a private or protected constructor instead.
Design

Line: 22

                      Assert.assertNotNull(o.getPayload());
    }

    public static abstract class AbstractDTO {
    }

    public static class Header {

    }

            

Reported by PMD.

System.out.println is used
Design

Line: 17

                      q.setHeader(new Header());
        q.setPayload(new Payload());
        String text = JSON.toJSONString(q, SerializerFeature.WriteClassName);
        System.out.println(text);
        Generic<Payload> o = (Generic<Payload>) JSON.parseObject(text, q.getClass());
        Assert.assertNotNull(o.getPayload());
    }

    public static abstract class AbstractDTO {

            

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

              
public class Bug_for_SpitFire_4 extends TestCase {

    public void test_for_SpitFire() {
        Generic<Payload> q = new Generic<Payload>();
        q.setHeader(new Header());
        q.setPayload(new Payload());
        String text = JSON.toJSONString(q, SerializerFeature.WriteClassName);
        System.out.println(text);

            

Reported by PMD.

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

Line: 19

                      String text = JSON.toJSONString(q, SerializerFeature.WriteClassName);
        System.out.println(text);
        Generic<Payload> o = (Generic<Payload>) JSON.parseObject(text, q.getClass());
        Assert.assertNotNull(o.getPayload());
    }

    public static abstract class AbstractDTO {
    }


            

Reported by PMD.

This abstract class does not have any abstract methods
Design

Line: 22

                      Assert.assertNotNull(o.getPayload());
    }

    public static abstract class AbstractDTO {
    }

    public static class Header {

    }

            

Reported by PMD.

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

Line: 33

              
    }

    public static class Generic<T extends AbstractDTO> extends AbstractDTO {

        Header header;
        T      payload;

        public Header getHeader() {

            

Reported by PMD.

src/test/java/com/alibaba/json/bvt/bug/Bug_for_SpitFire_5.java
6 issues
No abstract method which means that the keyword is most likely used to prevent instantiation. Use a private or protected constructor instead.
Design

Line: 22

                      Assert.assertNotNull(o.getPayload());
    }

    public static abstract class AbstractDTO {
    }

    public static class Header {

    }

            

Reported by PMD.

System.out.println is used
Design

Line: 17

                      q.setHeader(new Header());
        q.setPayload(new Payload());
        String text = JSON.toJSONString(q, SerializerFeature.WriteClassName);
        System.out.println(text);
        Generic<Payload> o = (Generic<Payload>) JSON.parseObject(text, q.getClass());
        Assert.assertNotNull(o.getPayload());
    }

    public static abstract class AbstractDTO {

            

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

              
public class Bug_for_SpitFire_5 extends TestCase {

    public void test_for_SpitFire() {
        Generic<Payload> q = new Generic<Payload>();
        q.setHeader(new Header());
        q.setPayload(new Payload());
        String text = JSON.toJSONString(q, SerializerFeature.WriteClassName);
        System.out.println(text);

            

Reported by PMD.

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

Line: 19

                      String text = JSON.toJSONString(q, SerializerFeature.WriteClassName);
        System.out.println(text);
        Generic<Payload> o = (Generic<Payload>) JSON.parseObject(text, q.getClass());
        Assert.assertNotNull(o.getPayload());
    }

    public static abstract class AbstractDTO {
    }


            

Reported by PMD.

This abstract class does not have any abstract methods
Design

Line: 22

                      Assert.assertNotNull(o.getPayload());
    }

    public static abstract class AbstractDTO {
    }

    public static class Header {

    }

            

Reported by PMD.

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

Line: 42

                      }
    }

    public static class Generic<T extends AbstractDTO> extends AbstractDTO {

        Header header;
        T      payload;

        public Header getHeader() {

            

Reported by PMD.