The following issues were found

src/test/java/com/alibaba/json/bvt/issue_3300/Issue3313.java
4 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

               * @Date :Created in 21:54 2020/6/30
 */
public class Issue3313 extends TestCase {
    public void test_for_issue() throws Exception {
        String jsonStr = "{\"NAME\":\"nanqi\",\"age\":18}";
        Model model = JSONObject.parseObject(jsonStr, Model.class);
        Assert.notNull(model.getAGe());
        Assert.notNull(model.getName());
    }

            

Reported by PMD.

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

Line: 14

               * @Date :Created in 21:54 2020/6/30
 */
public class Issue3313 extends TestCase {
    public void test_for_issue() throws Exception {
        String jsonStr = "{\"NAME\":\"nanqi\",\"age\":18}";
        Model model = JSONObject.parseObject(jsonStr, Model.class);
        Assert.notNull(model.getAGe());
        Assert.notNull(model.getName());
    }

            

Reported by PMD.

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

Line: 17

                  public void test_for_issue() throws Exception {
        String jsonStr = "{\"NAME\":\"nanqi\",\"age\":18}";
        Model model = JSONObject.parseObject(jsonStr, Model.class);
        Assert.notNull(model.getAGe());
        Assert.notNull(model.getName());
    }

    @Data
    static class Model {

            

Reported by PMD.

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

Line: 18

                      String jsonStr = "{\"NAME\":\"nanqi\",\"age\":18}";
        Model model = JSONObject.parseObject(jsonStr, Model.class);
        Assert.notNull(model.getAGe());
        Assert.notNull(model.getName());
    }

    @Data
    static class Model {
        @JSONField(name = "NaMe")

            

Reported by PMD.

src/test/java/com/alibaba/json/bvt/issue_3300/Issue3344.java
4 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: 15

               * @Date :Created in 18:28 2020/7/19
 */
public class Issue3344 extends TestCase {
    public void test_for_issue_timeZone() throws Exception {
        TimeZone.setDefault(TimeZone.getTimeZone("GMT+1"));
        String jsonStr = "{\"date\":1595154768}";
        Model model = JSONObject.parseObject(jsonStr, Model.class);
        assertEquals("Mon Jan 19 12:05:54 GMT+01:00 1970", model.getDate().toString());
    }

            

Reported by PMD.

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

Line: 19

                      TimeZone.setDefault(TimeZone.getTimeZone("GMT+1"));
        String jsonStr = "{\"date\":1595154768}";
        Model model = JSONObject.parseObject(jsonStr, Model.class);
        assertEquals("Mon Jan 19 12:05:54 GMT+01:00 1970", model.getDate().toString());
    }

    static class Model {
        private Date date;


            

Reported by PMD.

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

Line: 19

                      TimeZone.setDefault(TimeZone.getTimeZone("GMT+1"));
        String jsonStr = "{\"date\":1595154768}";
        Model model = JSONObject.parseObject(jsonStr, Model.class);
        assertEquals("Mon Jan 19 12:05:54 GMT+01:00 1970", model.getDate().toString());
    }

    static class Model {
        private Date date;


            

Reported by PMD.

JUnit assertions should include a message
Design

Line: 19

                      TimeZone.setDefault(TimeZone.getTimeZone("GMT+1"));
        String jsonStr = "{\"date\":1595154768}";
        Model model = JSONObject.parseObject(jsonStr, Model.class);
        assertEquals("Mon Jan 19 12:05:54 GMT+01:00 1970", model.getDate().toString());
    }

    static class Model {
        private Date date;


            

Reported by PMD.

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

Line: 14

              import java.util.TimeZone;

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



            

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

                  }


    public void test_1() throws Exception {
        Entity object = new Entity();
        object.setValue(new Date());
        String text = JSON.toJSONString(object);
        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ", JSON.defaultLocale);
        format.setTimeZone(JSON.defaultTimeZone);

            

Reported by PMD.

Avoid unused local variables such as 'object2'.
Design

Line: 29

                      Assert.assertEquals("{\"value\":\"" + format.format(object.getValue()) + "\"}",
                            text);

        Entity object2 = JSON.parseObject(text, Entity.class);
    }

    public static class Entity {

        @JSONField(format = "yyyy-MM-ddTHH:mm:ssZ")

            

Reported by PMD.

Found 'DU'-anomaly for variable 'object2' (lines '29'-'30').
Error

Line: 29

                      Assert.assertEquals("{\"value\":\"" + format.format(object.getValue()) + "\"}",
                            text);

        Entity object2 = JSON.parseObject(text, Entity.class);
    }

    public static class Entity {

        @JSONField(format = "yyyy-MM-ddTHH:mm:ssZ")

            

Reported by PMD.

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

Line: 19

              public class Issue3361 extends TestCase {
    private static String ORIGIN_JSON_DEFAULT_DATE_FORMAT;

    @Override
    public void setUp() throws Exception {
        ORIGIN_JSON_DEFAULT_DATE_FORMAT = JSON.DEFFAULT_DATE_FORMAT;
    }

    public void test_for_issue() 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: 24

                      ORIGIN_JSON_DEFAULT_DATE_FORMAT = JSON.DEFFAULT_DATE_FORMAT;
    }

    public void test_for_issue() throws Exception {
        Model model = new Model();
        model.setOldDate(new Date());
        log.info("{}", model);

        FastJsonConfig config = new FastJsonConfig();

            

Reported by PMD.

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

Line: 24

                      ORIGIN_JSON_DEFAULT_DATE_FORMAT = JSON.DEFFAULT_DATE_FORMAT;
    }

    public void test_for_issue() throws Exception {
        Model model = new Model();
        model.setOldDate(new Date());
        log.info("{}", model);

        FastJsonConfig config = new FastJsonConfig();

            

Reported by PMD.

JUnit 4 tests that clean up tests should use the @After annotation, JUnit5 tests should use @AfterEach or @AfterAll
Design

Line: 50

                      log.info("{}", model3);
    }

    @Override
    public void tearDown() throws Exception {
        JSON.DEFFAULT_DATE_FORMAT = ORIGIN_JSON_DEFAULT_DATE_FORMAT;
    }

    @Getter

            

Reported by PMD.

src/test/java/com/alibaba/json/bvt/issue_3300/Issue3375.java
4 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

               * @Date :Created in 01:09 2020/8/2
 */
public class Issue3375 extends TestCase {
    public void test_for_issue() throws Exception {
        List<Map<String, String>> models = new ArrayList<Map<String, String>>();
        Map<String, String> map1 = new HashMap<String, String>();
        map1.put("name", "nanqi01");
        models.add(map1);


            

Reported by PMD.

JUnit assertions should include a message
Design

Line: 29

                      for (Map<String, String> model : models) {
            String modelStr = JSON.toJSONString(model);
            Model modelObj = JSON.parseObject(modelStr, Model.class);
            assertTrue(modelObj.getName().contains("nanqi"));
        }
    }

    public static class Model {
        private String name;

            

Reported by PMD.

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

Line: 29

                      for (Map<String, String> model : models) {
            String modelStr = JSON.toJSONString(model);
            Model modelObj = JSON.parseObject(modelStr, Model.class);
            assertTrue(modelObj.getName().contains("nanqi"));
        }
    }

    public static class Model {
        private String name;

            

Reported by PMD.

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

Line: 29

                      for (Map<String, String> model : models) {
            String modelStr = JSON.toJSONString(model);
            Model modelObj = JSON.parseObject(modelStr, Model.class);
            assertTrue(modelObj.getName().contains("nanqi"));
        }
    }

    public static class Model {
        private String name;

            

Reported by PMD.

src/test/java/com/alibaba/json/bvt/issue_1700/Issue1739.java
4 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

              import junit.framework.TestCase;

public class Issue1739 extends TestCase {
    public void test_for_issue() throws Exception {
        M0 model = new M0();
        model.data = new JSONObject();

        String json = JSON.toJSONString(model);
        assertEquals("{\"data\":{}}", json);

            

Reported by PMD.

JUnit assertions should include a message
Design

Line: 14

                      model.data = new JSONObject();

        String json = JSON.toJSONString(model);
        assertEquals("{\"data\":{}}", json);
    }

    public void test_for_issue_1() throws Exception {
        M1 model = new M1();
        model.data = new 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: 17

                      assertEquals("{\"data\":{}}", json);
    }

    public void test_for_issue_1() throws Exception {
        M1 model = new M1();
        model.data = new JSONObject();

        String json = JSON.toJSONString(model);
        assertEquals("{}", json);

            

Reported by PMD.

JUnit assertions should include a message
Design

Line: 22

                      model.data = new JSONObject();

        String json = JSON.toJSONString(model);
        assertEquals("{}", json);
    }

    public static class M0 {
        private JSONObject data;


            

Reported by PMD.

src/test/java/com/alibaba/json/bvt/issue_1600/issue_1699/def/RatingDetailTypeMEnum.java
4 issues
Avoid unused imports such as 'java.util.ArrayList'
Design

Line: 3

              package com.alibaba.json.bvt.issue_1600.issue_1699.def;

import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

public enum RatingDetailTypeMEnum {


            

Reported by PMD.

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

Line: 4

              package com.alibaba.json.bvt.issue_1600.issue_1699.def;

import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

public enum RatingDetailTypeMEnum {


            

Reported by PMD.

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

Line: 5

              
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

public enum RatingDetailTypeMEnum {

    COMM,

            

Reported by PMD.

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

Line: 6

              import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

public enum RatingDetailTypeMEnum {

    COMM,
    FC,

            

Reported by PMD.

src/test/java/com/alibaba/json/bvt/issue_3500/Issue3544.java
4 issues
Unit tests should not contain more than 1 assert(s).
Design

Line: 12

              
public class Issue3544 extends TestCase {

    public void test_errorType() {
        assertNull("", JSON.toJavaObject(
                JSON.parseObject("{\"result\":\"\"}"), TestVO.class).result);

        assertNull("", JSON.toJavaObject(
                JSON.parseObject("{\"result\":\"null\"}"), TestVO.class).result);

            

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

    public void test_errorType() {
        assertNull("", JSON.toJavaObject(
                JSON.parseObject("{\"result\":\"\"}"), TestVO.class).result);

        assertNull("", JSON.toJavaObject(
                JSON.parseObject("{\"result\":\"null\"}"), TestVO.class).result);

            

Reported by PMD.

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

Line: 13

              public class Issue3544 extends TestCase {

    public void test_errorType() {
        assertNull("", JSON.toJavaObject(
                JSON.parseObject("{\"result\":\"\"}"), TestVO.class).result);

        assertNull("", JSON.toJavaObject(
                JSON.parseObject("{\"result\":\"null\"}"), TestVO.class).result);
    }

            

Reported by PMD.

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

Line: 16

                      assertNull("", JSON.toJavaObject(
                JSON.parseObject("{\"result\":\"\"}"), TestVO.class).result);

        assertNull("", JSON.toJavaObject(
                JSON.parseObject("{\"result\":\"null\"}"), TestVO.class).result);
    }

    @Getter
    @Setter

            

Reported by PMD.

src/test/java/com/alibaba/json/bvt/issue_1600/issue_1699/def/RatingDetailIsJoinMEnum.java
4 issues
Avoid unused imports such as 'java.util.ArrayList'
Design

Line: 3

              package com.alibaba.json.bvt.issue_1600.issue_1699.def;

import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

public enum RatingDetailIsJoinMEnum {


            

Reported by PMD.

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

Line: 4

              package com.alibaba.json.bvt.issue_1600.issue_1699.def;

import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

public enum RatingDetailIsJoinMEnum {


            

Reported by PMD.

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

Line: 5

              
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

public enum RatingDetailIsJoinMEnum {

    FALSE,

            

Reported by PMD.

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

Line: 6

              import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

public enum RatingDetailIsJoinMEnum {

    FALSE,
    TRUE;

            

Reported by PMD.

src/test/java/com/alibaba/json/bvt/issue_1600/issue_1699/TestJson.java
4 issues
System.out.println is used
Design

Line: 15

                      ParserConfig config = new ParserConfig();
        config.setAutoTypeSupport(true);

        System.out.println(JSON.VERSION);

        String event1 = "{\"@type\":\"com.alibaba.json.bvt.issue_1600.issue_1699.obj.RatingDetailBO\",\"amount\":285.600000,\"billId\":3945,\"bizId\":\"6000007==201712==USER_ID==2049884395&&CONTRACT_NO==\\\"no1513922344271\\\"\",\"bizTime\":\"2017-12-31 00:00:00\",\"bizType\":\"6000007\",\"currency\":\"CNY\",\"dealTime\":\"2017-12-23 14:11:03\",\"detailType\":\"CYCLE_CHARGING\",\"extendInfo\":{\"@type\":\"java.util.LinkedHashMap\",\"BUY_AMOUNT\":\"3\",\"P_BIZ_ID\":\"USER_ID==2049884395&&CONTRACT_NO==\\\"no1513922344271\\\"\",\"SETTLE_SIDE\":\"654321\",\"SETTLE_CYCLE_TYPE\":\"3\",\"AUCTION_PRICE\":\"119\",\"CALCULATE_RANGE\":\"STORE\",\"TOTAL_NUM\":\"1\",\"BILL_CYCLE\":\"201712\",\"IS_PRE_CHARGING\":\"false\",\"BRANCH_SHOP\":\"branchShop1\",\"CONTRACT_TYPE\":\"HEMA_CHARGING_PROD\",\"stepRateType\":\"3\",\"SOURCE_TYPE\":\"PURCHASE_ADJUST\",\"SETTLE_SIDE_NICK\":\"测试结算主体\",\"express_value\":\"USER_ID==2049884395&&CONTRACT_NO==\\\"no1513922344271\\\"\",\"BIZ_TIME\":\"2017-12-22 13:59:05\",\"TRADE_ID\":\"1513922344273\",\"QUANTITY\":\"3.000000\",\"MES_RECEIVE_TIME\":\"2017-12-22 13:59:05\",\"UN_TAX_UNIT_PRICE\":\"100.000000\",\"AUCTION_ID\":\"123\",\"AUCTION_NAME\":\"测试商品\",\"rate_value\":\"{\\\"extendInfo\\\":{},\\\"intervalValues\\\":[{\\\"max\\\":600.000000,\\\"min\\\":0.000000,\\\"rate\\\":0.600000},{\\\"max\\\":1000.000000,\\\"min\\\":600.000000,\\\"rate\\\":0.300000},{\\\"max\\\":999999999999.000000,\\\"min\\\":1000.000000,\\\"rate\\\":0.100000}]}\",\"CAT_ID\":\"16\",\"UNIT\":\"kilometer\",\"TERM_NAME\":\"盒马.合同返利.促销推广费\",\"USER_ID\":\"2049884395\",\"UNIT_PRICE\":\"119.000000\",\"tbRuleCode\":\"HM_SETTLE_CHARGING\",\"AMOUNT\":\"357.000000\",\"CAT_NAME\":\"水果\",\"EXTERNAL_NO\":\"HM==1513922344273\",\"CHANNEL\":\"online\",\"is_default_rate\":\"false\",\"CURRENCY\":\"CNY\",\"rate_rule_id\":\"300000531\",\"OTHER_USER_NICK\":\"甲方\",\"RATE_TYPE\":\"14\",\"ITEM_NAME\":\"盒马.促销推广费\",\"rate_rule_inst_id\":\"1009129180821\",\"TAX_RATE\":\"0.190000\",\"ITEM_CODE\":\"BILL_HM_6000007\",\"CONTRACT_SIDE\":\"12345\",\"UNTAX_AMOUNT\":\"300.000000\",\"CONTRACT_VERSION\":\"V001\",\"CONTRACT_NO\":\"no1513922344271\",\"P_TRADE_ID\":\"1513922344273\"},\"gmtCreate\":\"2017-12-23 14:11:03\",\"gmtModified\":\"2017-12-23 14:11:03\",\"id\":6235300020395,\"indexNum\":0,\"innerId\":6300120395,\"innerTable\":\"SETTLE_DATA\",\"isJoin\":\"FALSE\",\"itemId\":90000000007031,\"mesId\":3235,\"mesReceiveTime\":\"2017-12-22 13:59:05\",\"outBizId\":\"USER_ID==2049884395&&CONTRACT_NO==\\\"no1513922344271\\\"\",\"pTradeId\":3235,\"priority\":0,\"proration\":0.6,\"quantity\":476.000000,\"rateDefineId\":40000443,\"rateParams\":{\"@type\":\"java.util.LinkedHashMap\"},\"status\":\"SUCCESS\",\"tradeId\":3761,\"userId\":2049884395,\"userNick\":\"乙方\",\"version\":1}";
        Serializable obj = JSON.parseObject(event1, Serializable.class, config);
        System.out.println(obj);
    }

            

Reported by PMD.

System.out.println is used
Design

Line: 19

              
        String event1 = "{\"@type\":\"com.alibaba.json.bvt.issue_1600.issue_1699.obj.RatingDetailBO\",\"amount\":285.600000,\"billId\":3945,\"bizId\":\"6000007==201712==USER_ID==2049884395&&CONTRACT_NO==\\\"no1513922344271\\\"\",\"bizTime\":\"2017-12-31 00:00:00\",\"bizType\":\"6000007\",\"currency\":\"CNY\",\"dealTime\":\"2017-12-23 14:11:03\",\"detailType\":\"CYCLE_CHARGING\",\"extendInfo\":{\"@type\":\"java.util.LinkedHashMap\",\"BUY_AMOUNT\":\"3\",\"P_BIZ_ID\":\"USER_ID==2049884395&&CONTRACT_NO==\\\"no1513922344271\\\"\",\"SETTLE_SIDE\":\"654321\",\"SETTLE_CYCLE_TYPE\":\"3\",\"AUCTION_PRICE\":\"119\",\"CALCULATE_RANGE\":\"STORE\",\"TOTAL_NUM\":\"1\",\"BILL_CYCLE\":\"201712\",\"IS_PRE_CHARGING\":\"false\",\"BRANCH_SHOP\":\"branchShop1\",\"CONTRACT_TYPE\":\"HEMA_CHARGING_PROD\",\"stepRateType\":\"3\",\"SOURCE_TYPE\":\"PURCHASE_ADJUST\",\"SETTLE_SIDE_NICK\":\"测试结算主体\",\"express_value\":\"USER_ID==2049884395&&CONTRACT_NO==\\\"no1513922344271\\\"\",\"BIZ_TIME\":\"2017-12-22 13:59:05\",\"TRADE_ID\":\"1513922344273\",\"QUANTITY\":\"3.000000\",\"MES_RECEIVE_TIME\":\"2017-12-22 13:59:05\",\"UN_TAX_UNIT_PRICE\":\"100.000000\",\"AUCTION_ID\":\"123\",\"AUCTION_NAME\":\"测试商品\",\"rate_value\":\"{\\\"extendInfo\\\":{},\\\"intervalValues\\\":[{\\\"max\\\":600.000000,\\\"min\\\":0.000000,\\\"rate\\\":0.600000},{\\\"max\\\":1000.000000,\\\"min\\\":600.000000,\\\"rate\\\":0.300000},{\\\"max\\\":999999999999.000000,\\\"min\\\":1000.000000,\\\"rate\\\":0.100000}]}\",\"CAT_ID\":\"16\",\"UNIT\":\"kilometer\",\"TERM_NAME\":\"盒马.合同返利.促销推广费\",\"USER_ID\":\"2049884395\",\"UNIT_PRICE\":\"119.000000\",\"tbRuleCode\":\"HM_SETTLE_CHARGING\",\"AMOUNT\":\"357.000000\",\"CAT_NAME\":\"水果\",\"EXTERNAL_NO\":\"HM==1513922344273\",\"CHANNEL\":\"online\",\"is_default_rate\":\"false\",\"CURRENCY\":\"CNY\",\"rate_rule_id\":\"300000531\",\"OTHER_USER_NICK\":\"甲方\",\"RATE_TYPE\":\"14\",\"ITEM_NAME\":\"盒马.促销推广费\",\"rate_rule_inst_id\":\"1009129180821\",\"TAX_RATE\":\"0.190000\",\"ITEM_CODE\":\"BILL_HM_6000007\",\"CONTRACT_SIDE\":\"12345\",\"UNTAX_AMOUNT\":\"300.000000\",\"CONTRACT_VERSION\":\"V001\",\"CONTRACT_NO\":\"no1513922344271\",\"P_TRADE_ID\":\"1513922344273\"},\"gmtCreate\":\"2017-12-23 14:11:03\",\"gmtModified\":\"2017-12-23 14:11:03\",\"id\":6235300020395,\"indexNum\":0,\"innerId\":6300120395,\"innerTable\":\"SETTLE_DATA\",\"isJoin\":\"FALSE\",\"itemId\":90000000007031,\"mesId\":3235,\"mesReceiveTime\":\"2017-12-22 13:59:05\",\"outBizId\":\"USER_ID==2049884395&&CONTRACT_NO==\\\"no1513922344271\\\"\",\"pTradeId\":3235,\"priority\":0,\"proration\":0.6,\"quantity\":476.000000,\"rateDefineId\":40000443,\"rateParams\":{\"@type\":\"java.util.LinkedHashMap\"},\"status\":\"SUCCESS\",\"tradeId\":3761,\"userId\":2049884395,\"userNick\":\"乙方\",\"version\":1}";
        Serializable obj = JSON.parseObject(event1, Serializable.class, config);
        System.out.println(obj);
    }
}

            

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

    public void test_for_issue() {
        ParserConfig config = new ParserConfig();
        config.setAutoTypeSupport(true);

        System.out.println(JSON.VERSION);


            

Reported by PMD.

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

Line: 11

              
public class TestJson extends TestCase {

    public void test_for_issue() {
        ParserConfig config = new ParserConfig();
        config.setAutoTypeSupport(true);

        System.out.println(JSON.VERSION);


            

Reported by PMD.