The following issues were found

src/test/java/com/alibaba/json/bvt/bug/Bug_for_primitive_byte.java
6 issues
JUnit tests should include assert() or fail()
Design

Line: 9

              
public class Bug_for_primitive_byte extends TestCase {

    public void test_emptyStr() throws Exception {
        JSON.parseObject("{\"value\":\"\"}", VO.class);
    }
    
    public void test_null() throws Exception {
        JSON.parseObject("{\"value\":null}", VO.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: 9

              
public class Bug_for_primitive_byte extends TestCase {

    public void test_emptyStr() throws Exception {
        JSON.parseObject("{\"value\":\"\"}", VO.class);
    }
    
    public void test_null() throws Exception {
        JSON.parseObject("{\"value\":null}", VO.class);

            

Reported by PMD.

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

Line: 13

                      JSON.parseObject("{\"value\":\"\"}", VO.class);
    }
    
    public void test_null() throws Exception {
        JSON.parseObject("{\"value\":null}", VO.class);
    }
    
    public void test_strNull() throws Exception {
        JSON.parseObject("{\"value\":\"null\"}", VO.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: 13

                      JSON.parseObject("{\"value\":\"\"}", VO.class);
    }
    
    public void test_null() throws Exception {
        JSON.parseObject("{\"value\":null}", VO.class);
    }
    
    public void test_strNull() throws Exception {
        JSON.parseObject("{\"value\":\"null\"}", VO.class);

            

Reported by PMD.

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

Line: 17

                      JSON.parseObject("{\"value\":null}", VO.class);
    }
    
    public void test_strNull() throws Exception {
        JSON.parseObject("{\"value\":\"null\"}", VO.class);
    }

    public static class VO {


            

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

                      JSON.parseObject("{\"value\":null}", VO.class);
    }
    
    public void test_strNull() throws Exception {
        JSON.parseObject("{\"value\":\"null\"}", VO.class);
    }

    public static class VO {


            

Reported by PMD.

src/test/java/com/alibaba/json/bvt/bug/Bug_for_primitive_double.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: 9

              
public class Bug_for_primitive_double extends TestCase {

    public void test_emptyStr() throws Exception {
        JSON.parseObject("{\"value\":\"\"}", VO.class);
    }
    
    public void test_null() throws Exception {
        JSON.parseObject("{\"value\":null}", VO.class);

            

Reported by PMD.

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

Line: 9

              
public class Bug_for_primitive_double extends TestCase {

    public void test_emptyStr() throws Exception {
        JSON.parseObject("{\"value\":\"\"}", VO.class);
    }
    
    public void test_null() throws Exception {
        JSON.parseObject("{\"value\":null}", VO.class);

            

Reported by PMD.

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

Line: 13

                      JSON.parseObject("{\"value\":\"\"}", VO.class);
    }
    
    public void test_null() throws Exception {
        JSON.parseObject("{\"value\":null}", VO.class);
    }
    
    public void test_strNull() throws Exception {
        JSON.parseObject("{\"value\":\"null\"}", VO.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: 13

                      JSON.parseObject("{\"value\":\"\"}", VO.class);
    }
    
    public void test_null() throws Exception {
        JSON.parseObject("{\"value\":null}", VO.class);
    }
    
    public void test_strNull() throws Exception {
        JSON.parseObject("{\"value\":\"null\"}", VO.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: 17

                      JSON.parseObject("{\"value\":null}", VO.class);
    }
    
    public void test_strNull() throws Exception {
        JSON.parseObject("{\"value\":\"null\"}", VO.class);
    }

    public static class VO {


            

Reported by PMD.

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

Line: 17

                      JSON.parseObject("{\"value\":null}", VO.class);
    }
    
    public void test_strNull() throws Exception {
        JSON.parseObject("{\"value\":\"null\"}", VO.class);
    }

    public static class VO {


            

Reported by PMD.

src/test/java/com/alibaba/json/bvt/bug/Bug_for_primitive_float.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: 9

              
public class Bug_for_primitive_float extends TestCase {

    public void test_emptyStr() throws Exception {
        JSON.parseObject("{\"value\":\"\"}", VO.class);
    }
    
    public void test_null() throws Exception {
        JSON.parseObject("{\"value\":null}", VO.class);

            

Reported by PMD.

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

Line: 9

              
public class Bug_for_primitive_float extends TestCase {

    public void test_emptyStr() throws Exception {
        JSON.parseObject("{\"value\":\"\"}", VO.class);
    }
    
    public void test_null() throws Exception {
        JSON.parseObject("{\"value\":null}", VO.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: 13

                      JSON.parseObject("{\"value\":\"\"}", VO.class);
    }
    
    public void test_null() throws Exception {
        JSON.parseObject("{\"value\":null}", VO.class);
    }
    
    public void test_strNull() throws Exception {
        JSON.parseObject("{\"value\":\"null\"}", VO.class);

            

Reported by PMD.

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

Line: 13

                      JSON.parseObject("{\"value\":\"\"}", VO.class);
    }
    
    public void test_null() throws Exception {
        JSON.parseObject("{\"value\":null}", VO.class);
    }
    
    public void test_strNull() throws Exception {
        JSON.parseObject("{\"value\":\"null\"}", VO.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: 17

                      JSON.parseObject("{\"value\":null}", VO.class);
    }
    
    public void test_strNull() throws Exception {
        JSON.parseObject("{\"value\":\"null\"}", VO.class);
    }

    public static class VO {


            

Reported by PMD.

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

Line: 17

                      JSON.parseObject("{\"value\":null}", VO.class);
    }
    
    public void test_strNull() throws Exception {
        JSON.parseObject("{\"value\":\"null\"}", VO.class);
    }

    public static class VO {


            

Reported by PMD.

src/test/java/com/alibaba/json/bvt/bug/Bug_for_primitive_int.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: 9

              
public class Bug_for_primitive_int extends TestCase {

    public void test_emptyStr() throws Exception {
        JSON.parseObject("{\"value\":\"\"}", VO.class);
    }
    
    public void test_null() throws Exception {
        JSON.parseObject("{\"value\":null}", VO.class);

            

Reported by PMD.

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

Line: 9

              
public class Bug_for_primitive_int extends TestCase {

    public void test_emptyStr() throws Exception {
        JSON.parseObject("{\"value\":\"\"}", VO.class);
    }
    
    public void test_null() throws Exception {
        JSON.parseObject("{\"value\":null}", VO.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: 13

                      JSON.parseObject("{\"value\":\"\"}", VO.class);
    }
    
    public void test_null() throws Exception {
        JSON.parseObject("{\"value\":null}", VO.class);
    }
    
    public void test_strNull() throws Exception {
        JSON.parseObject("{\"value\":\"null\"}", VO.class);

            

Reported by PMD.

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

Line: 13

                      JSON.parseObject("{\"value\":\"\"}", VO.class);
    }
    
    public void test_null() throws Exception {
        JSON.parseObject("{\"value\":null}", VO.class);
    }
    
    public void test_strNull() throws Exception {
        JSON.parseObject("{\"value\":\"null\"}", VO.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: 17

                      JSON.parseObject("{\"value\":null}", VO.class);
    }
    
    public void test_strNull() throws Exception {
        JSON.parseObject("{\"value\":\"null\"}", VO.class);
    }

    public static class VO {


            

Reported by PMD.

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

Line: 17

                      JSON.parseObject("{\"value\":null}", VO.class);
    }
    
    public void test_strNull() throws Exception {
        JSON.parseObject("{\"value\":\"null\"}", VO.class);
    }

    public static class VO {


            

Reported by PMD.

src/test/java/com/alibaba/json/bvt/bug/Bug_for_primitive_long.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: 9

              
public class Bug_for_primitive_long extends TestCase {

    public void test_emptyStr() throws Exception {
        JSON.parseObject("{\"value\":\"\"}", VO.class);
    }
    
    public void test_null() throws Exception {
        JSON.parseObject("{\"value\":null}", VO.class);

            

Reported by PMD.

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

Line: 9

              
public class Bug_for_primitive_long extends TestCase {

    public void test_emptyStr() throws Exception {
        JSON.parseObject("{\"value\":\"\"}", VO.class);
    }
    
    public void test_null() throws Exception {
        JSON.parseObject("{\"value\":null}", VO.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: 13

                      JSON.parseObject("{\"value\":\"\"}", VO.class);
    }
    
    public void test_null() throws Exception {
        JSON.parseObject("{\"value\":null}", VO.class);
    }
    
    public void test_strNull() throws Exception {
        JSON.parseObject("{\"value\":\"null\"}", VO.class);

            

Reported by PMD.

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

Line: 13

                      JSON.parseObject("{\"value\":\"\"}", VO.class);
    }
    
    public void test_null() throws Exception {
        JSON.parseObject("{\"value\":null}", VO.class);
    }
    
    public void test_strNull() throws Exception {
        JSON.parseObject("{\"value\":\"null\"}", VO.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: 17

                      JSON.parseObject("{\"value\":null}", VO.class);
    }
    
    public void test_strNull() throws Exception {
        JSON.parseObject("{\"value\":\"null\"}", VO.class);
    }

    public static class VO {


            

Reported by PMD.

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

Line: 17

                      JSON.parseObject("{\"value\":null}", VO.class);
    }
    
    public void test_strNull() throws Exception {
        JSON.parseObject("{\"value\":\"null\"}", VO.class);
    }

    public static class VO {


            

Reported by PMD.

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

Line: 24

                      entity.setValue(map);

        String text = JSON.toJSONString(entity, SerializerFeature.WriteClassName);
        System.out.println(text);
        Assert.assertEquals("{\"@type\":\"com.alibaba.json.bvt.bug.Bug_for_smoothrat8$Entity\",\"value\":{\"@type\":\"java.util.LinkedHashMap\",1:\"a\",2:\"b\"}}",
                            text);

        Entity entity2 = JSON.parseObject(text, Entity.class);
        Assert.assertEquals(map, entity2.getValue());

            

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 Bug_for_smoothrat8 extends TestCase {

    public void test_set() throws Exception {
        Map<Integer, Object> map = new LinkedHashMap<Integer, Object>();
        map.put(1, "a");
        map.put(2, "b");

        Entity entity = new Entity();

            

Reported by PMD.

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

Line: 29

                                          text);

        Entity entity2 = JSON.parseObject(text, Entity.class);
        Assert.assertEquals(map, entity2.getValue());
        Assert.assertEquals(map.getClass(), entity2.getValue().getClass());
        Assert.assertEquals(Integer.class, ((Map)entity2.getValue()).keySet().iterator().next().getClass());
    }
    


            

Reported by PMD.

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

Line: 30

              
        Entity entity2 = JSON.parseObject(text, Entity.class);
        Assert.assertEquals(map, entity2.getValue());
        Assert.assertEquals(map.getClass(), entity2.getValue().getClass());
        Assert.assertEquals(Integer.class, ((Map)entity2.getValue()).keySet().iterator().next().getClass());
    }
    

    public static class Entity {

            

Reported by PMD.

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

Line: 30

              
        Entity entity2 = JSON.parseObject(text, Entity.class);
        Assert.assertEquals(map, entity2.getValue());
        Assert.assertEquals(map.getClass(), entity2.getValue().getClass());
        Assert.assertEquals(Integer.class, ((Map)entity2.getValue()).keySet().iterator().next().getClass());
    }
    

    public static class Entity {

            

Reported by PMD.

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

Line: 31

                      Entity entity2 = JSON.parseObject(text, Entity.class);
        Assert.assertEquals(map, entity2.getValue());
        Assert.assertEquals(map.getClass(), entity2.getValue().getClass());
        Assert.assertEquals(Integer.class, ((Map)entity2.getValue()).keySet().iterator().next().getClass());
    }
    

    public static class Entity {


            

Reported by PMD.

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

Line: 14

              public class Bug_for_xujin extends TestCase {
    public void test_for_xujin() throws Exception {
        String jsonText="{\"module\":{\"auditStatus\":\"PENDING_VERIFICATION\",\"contactId\":\"asdfasdf\",\n\"errorMsg\":\"中国\"},\"success\":true}\n";
        System.out.println(JSON.VERSION);
        ResultDTO resultDTO = (ResultDTO) JSON.parseObject(jsonText, ResultDTO.class);
    }

    public static class ResultDTO<T extends Serializable> implements Serializable {
        private static final long serialVersionUID = 3682481175041925854L;

            

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

               * Created by wenshao on 09/02/2017.
 */
public class Bug_for_xujin extends TestCase {
    public void test_for_xujin() throws Exception {
        String jsonText="{\"module\":{\"auditStatus\":\"PENDING_VERIFICATION\",\"contactId\":\"asdfasdf\",\n\"errorMsg\":\"中国\"},\"success\":true}\n";
        System.out.println(JSON.VERSION);
        ResultDTO resultDTO = (ResultDTO) JSON.parseObject(jsonText, ResultDTO.class);
    }


            

Reported by PMD.

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

Line: 12

               * Created by wenshao on 09/02/2017.
 */
public class Bug_for_xujin extends TestCase {
    public void test_for_xujin() throws Exception {
        String jsonText="{\"module\":{\"auditStatus\":\"PENDING_VERIFICATION\",\"contactId\":\"asdfasdf\",\n\"errorMsg\":\"中国\"},\"success\":true}\n";
        System.out.println(JSON.VERSION);
        ResultDTO resultDTO = (ResultDTO) JSON.parseObject(jsonText, ResultDTO.class);
    }


            

Reported by PMD.

Avoid unused local variables such as 'resultDTO'.
Design

Line: 15

                  public void test_for_xujin() throws Exception {
        String jsonText="{\"module\":{\"auditStatus\":\"PENDING_VERIFICATION\",\"contactId\":\"asdfasdf\",\n\"errorMsg\":\"中国\"},\"success\":true}\n";
        System.out.println(JSON.VERSION);
        ResultDTO resultDTO = (ResultDTO) JSON.parseObject(jsonText, ResultDTO.class);
    }

    public static class ResultDTO<T extends Serializable> implements Serializable {
        private static final long serialVersionUID = 3682481175041925854L;
        private static final String DEFAULT_ERR_CODE = "xin.unknown.error";

            

Reported by PMD.

Avoid unused private fields such as 'DEFAULT_ERR_CODE'.
Design

Line: 20

              
    public static class ResultDTO<T extends Serializable> implements Serializable {
        private static final long serialVersionUID = 3682481175041925854L;
        private static final String DEFAULT_ERR_CODE = "xin.unknown.error";
        private String errorMsg;
        private String errorCode;
        private boolean success;
        private T module;


            

Reported by PMD.

Found 'DU'-anomaly for variable 'resultDTO' (lines '15'-'16').
Error

Line: 15

                  public void test_for_xujin() throws Exception {
        String jsonText="{\"module\":{\"auditStatus\":\"PENDING_VERIFICATION\",\"contactId\":\"asdfasdf\",\n\"errorMsg\":\"中国\"},\"success\":true}\n";
        System.out.println(JSON.VERSION);
        ResultDTO resultDTO = (ResultDTO) JSON.parseObject(jsonText, ResultDTO.class);
    }

    public static class ResultDTO<T extends Serializable> implements Serializable {
        private static final long serialVersionUID = 3682481175041925854L;
        private static final String DEFAULT_ERR_CODE = "xin.unknown.error";

            

Reported by PMD.

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

               * Created by wenshao on 10/02/2017.
 */
public class Bug_for_xujin2 extends TestCase {
    public void test_for_bug() throws Exception {
        ContactTemplateParam param = new ContactTemplateParam();
        param.setAuditStatus(AuditStatusType.AUDIT_FAILURE);

        String json = JSON.toJSONString(param, new SerializeFilter[] { new IntEnumFilter("auditStatus") });
        assertEquals("{\"auditStatus\":0}", json);

            

Reported by PMD.

JUnit assertions should include a message
Design

Line: 22

                      param.setAuditStatus(AuditStatusType.AUDIT_FAILURE);

        String json = JSON.toJSONString(param, new SerializeFilter[] { new IntEnumFilter("auditStatus") });
        assertEquals("{\"auditStatus\":0}", json);
    }

    public static class IntEnumFilter implements ValueFilter {
        private Set<String> needMaskFileds = new HashSet();


            

Reported by PMD.

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

Line: 26

                  }

    public static class IntEnumFilter implements ValueFilter {
        private Set<String> needMaskFileds = new HashSet();

        public IntEnumFilter() {
        }

        public IntEnumFilter(String... fileds) {

            

Reported by PMD.

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

Line: 26

                  }

    public static class IntEnumFilter implements ValueFilter {
        private Set<String> needMaskFileds = new HashSet();

        public IntEnumFilter() {
        }

        public IntEnumFilter(String... fileds) {

            

Reported by PMD.

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

Line: 104

              
            for(int i$ = 0; i$ < len$; ++i$) {
                AuditStatusType temp = arr$[i$];
                if(temp.getEnCode().equals(enCode)) {
                    return temp;
                }
            }

            return null;

            

Reported by PMD.

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

Line: 104

              
            for(int i$ = 0; i$ < len$; ++i$) {
                AuditStatusType temp = arr$[i$];
                if(temp.getEnCode().equals(enCode)) {
                    return temp;
                }
            }

            return null;

            

Reported by PMD.

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

    public void test_for_bug() throws Exception {
        B b = JSON.parseObject("{\"id\":123,\"values\":[{}]}", B.class);
    }

    abstract static class A {


            

Reported by PMD.

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

Line: 12

              
public class Bug_for_yangqi extends TestCase {

    public void test_for_bug() throws Exception {
        B b = JSON.parseObject("{\"id\":123,\"values\":[{}]}", B.class);
    }

    abstract static class A {


            

Reported by PMD.

Avoid unused local variables such as 'b'.
Design

Line: 13

              public class Bug_for_yangqi extends TestCase {

    public void test_for_bug() throws Exception {
        B b = JSON.parseObject("{\"id\":123,\"values\":[{}]}", B.class);
    }

    abstract static class A {

        private int id;

            

Reported by PMD.

This abstract class does not have any abstract methods
Design

Line: 16

                      B b = JSON.parseObject("{\"id\":123,\"values\":[{}]}", B.class);
    }

    abstract static class A {

        private int id;
        private List<Value> values = new ArrayList<Value>();

        public int getId() {

            

Reported by PMD.

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

Line: 16

                      B b = JSON.parseObject("{\"id\":123,\"values\":[{}]}", B.class);
    }

    abstract static class A {

        private int id;
        private List<Value> values = new ArrayList<Value>();

        public int getId() {

            

Reported by PMD.

Found 'DU'-anomaly for variable 'b' (lines '13'-'14').
Error

Line: 13

              public class Bug_for_yangqi extends TestCase {

    public void test_for_bug() throws Exception {
        B b = JSON.parseObject("{\"id\":123,\"values\":[{}]}", B.class);
    }

    abstract static class A {

        private int id;

            

Reported by PMD.

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

Line: 12

              public class Bug_for_yanpei4 extends TestCase {
    public void test_for_issue() throws Exception {
        String valueText = JSON.toJSONString("a\"Puck\"");
        System.out.println("valueText : " + valueText);
        
        RPCAckBody body1 = new RPCAckBody();
        body1.actionValue = valueText;
        
        String bodyString = JSON.toJSONString(body1);

            

Reported by PMD.

System.out.println is used
Design

Line: 18

                      body1.actionValue = valueText;
        
        String bodyString = JSON.toJSONString(body1);
        System.out.println(bodyString);
        
         RPCAckBody body2 = JSON.parseObject(bodyString, RPCAckBody.class);
         
         System.out.println(body1.actionValue);
         System.out.println(body2.actionValue);

            

Reported by PMD.

System.out.println is used
Design

Line: 22

                      
         RPCAckBody body2 = JSON.parseObject(bodyString, RPCAckBody.class);
         
         System.out.println(body1.actionValue);
         System.out.println(body2.actionValue);
         Assert.assertEquals(body1.actionValue, body2.actionValue);
     }
     
     public static class RPCAckBody {

            

Reported by PMD.

System.out.println is used
Design

Line: 23

                       RPCAckBody body2 = JSON.parseObject(bodyString, RPCAckBody.class);
         
         System.out.println(body1.actionValue);
         System.out.println(body2.actionValue);
         Assert.assertEquals(body1.actionValue, body2.actionValue);
     }
     
     public static class RPCAckBody {
         public String actionValue;

            

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

              import junit.framework.TestCase;

public class Bug_for_yanpei4 extends TestCase {
    public void test_for_issue() throws Exception {
        String valueText = JSON.toJSONString("a\"Puck\"");
        System.out.println("valueText : " + valueText);
        
        RPCAckBody body1 = new RPCAckBody();
        body1.actionValue = valueText;

            

Reported by PMD.

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

Line: 28

                   }
     
     public static class RPCAckBody {
         public String actionValue;
     }
}

            

Reported by PMD.