The following issues were found

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

               * Created by wenshao on 24/04/2017.
 */
public class Issue1150 extends TestCase {
    public void test_for_issue() throws Exception {
        Model model = JSON.parseObject("{\"values\":\"\"}", Model.class);
        assertNull(model.values);
    }

    public void test_for_issue_array() throws Exception {

            

Reported by PMD.

JUnit assertions should include a message
Design

Line: 14

              public class Issue1150 extends TestCase {
    public void test_for_issue() throws Exception {
        Model model = JSON.parseObject("{\"values\":\"\"}", Model.class);
        assertNull(model.values);
    }

    public void test_for_issue_array() throws Exception {
        Model2 model = JSON.parseObject("{\"values\":\"\"}", Model2.class);
        assertNull(model.values);

            

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

                      assertNull(model.values);
    }

    public void test_for_issue_array() throws Exception {
        Model2 model = JSON.parseObject("{\"values\":\"\"}", Model2.class);
        assertNull(model.values);
    }

    public static class Model {

            

Reported by PMD.

JUnit assertions should include a message
Design

Line: 19

              
    public void test_for_issue_array() throws Exception {
        Model2 model = JSON.parseObject("{\"values\":\"\"}", Model2.class);
        assertNull(model.values);
    }

    public static class Model {
        public List values;
    }

            

Reported by PMD.

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

Line: 23

                  }

    public static class Model {
        public List values;
    }

    public static class Model2 {
        public Item[] values;
    }

            

Reported by PMD.

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

Line: 27

                  }

    public static class Model2 {
        public Item[] values;
    }

    public static class Item {

    }

            

Reported by PMD.

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

              import com.alibaba.fastjson.serializer.SerializerFeature;

public class Issue2678 extends TestCase {
    public void test_field() throws Exception {
        Person person = new Person();
        person.setName("Ariston");
        person.setAge(23);
        String json = JSON.toJSONString(person);
        assertEquals("{\"age\":23,'name':'Ariston'}", json);

            

Reported by PMD.

JUnit assertions should include a message
Design

Line: 14

                      person.setName("Ariston");
        person.setAge(23);
        String json = JSON.toJSONString(person);
        assertEquals("{\"age\":23,'name':'Ariston'}", json);
    }

    public void test_getter() throws Exception {
        Person2 person = new Person2();
        person.setName("Ariston");

            

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("{\"age\":23,'name':'Ariston'}", json);
    }

    public void test_getter() throws Exception {
        Person2 person = new Person2();
        person.setName("Ariston");
        person.setAge(23);
        String json = JSON.toJSONString(person);
        assertEquals("{\"age\":23,'name':'Ariston'}", json);

            

Reported by PMD.

JUnit assertions should include a message
Design

Line: 22

                      person.setName("Ariston");
        person.setAge(23);
        String json = JSON.toJSONString(person);
        assertEquals("{\"age\":23,'name':'Ariston'}", json);
    }

    static class Person {

        @JSONField(serialzeFeatures = SerializerFeature.UseSingleQuotes)

            

Reported by PMD.

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

Line: 25

                      assertEquals("{\"age\":23,'name':'Ariston'}", json);
    }

    static class Person {

        @JSONField(serialzeFeatures = SerializerFeature.UseSingleQuotes)
        private String name;

        private int age;

            

Reported by PMD.

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

Line: 53

                      }
    }

    static class Person2 {

        private String name;

        private int age;


            

Reported by PMD.

src/test/java/com/alibaba/json/bvt/parser/JSONReaderScannerTest__entity_boolean.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: 16

              
public class JSONReaderScannerTest__entity_boolean extends TestCase {

    public void test_scanInt() throws Exception {
        StringBuffer buf = new StringBuffer();
        buf.append('[');
        for (int i = 0; i < 10; ++i) {
            if (i != 0) {
                buf.append(',');

            

Reported by PMD.

StringBuffer constructor is initialized with size 16, but has at least 17 characters appended.
Performance

Line: 17

              public class JSONReaderScannerTest__entity_boolean extends TestCase {

    public void test_scanInt() throws Exception {
        StringBuffer buf = new StringBuffer();
        buf.append('[');
        for (int i = 0; i < 10; ++i) {
            if (i != 0) {
                buf.append(',');
            }

            

Reported by PMD.

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

Line: 34

                      }
        buf.append(']');

        Reader reader = new StringReader(buf.toString());

        JSONReaderScanner scanner = new JSONReaderScanner(reader);

        DefaultJSONParser parser = new DefaultJSONParser(scanner);
        List<VO> array = parser.parseArray(VO.class);

            

Reported by PMD.

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

Line: 42

                      List<VO> array = parser.parseArray(VO.class);
        for (int i = 0; i < array.size(); ++i) {
            if (i % 2 == 0) {
                Assert.assertEquals(true, array.get(i).getId());    
            } else {
                Assert.assertEquals(false, array.get(i).getId());
            }
        }
    }

            

Reported by PMD.

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

Line: 44

                          if (i % 2 == 0) {
                Assert.assertEquals(true, array.get(i).getId());    
            } else {
                Assert.assertEquals(false, array.get(i).getId());
            }
        }
    }

    public static class VO {

            

Reported by PMD.

Avoid unused imports such as 'com.alibaba.fastjson.JSONArray'
Design

Line: 10

              import org.junit.Assert;
import junit.framework.TestCase;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.parser.DefaultJSONParser;
import com.alibaba.fastjson.parser.JSONReaderScanner;

public class JSONReaderScannerTest__entity_boolean extends TestCase {


            

Reported by PMD.

src/test/java/com/alibaba/json/bvt/issue_1700/Issue1723.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: 8

              import junit.framework.TestCase;

public class Issue1723 extends TestCase {
    public void test_for_issue() throws Exception {
        User user = JSON.parseObject("{\"age\":\"0.9390308260917664\"}", User.class);
        assertEquals(0.9390308260917664F, user.age);
    }

    public void test_for_issue_1() throws Exception {

            

Reported by PMD.

JUnit assertions should include a message
Design

Line: 10

              public class Issue1723 extends TestCase {
    public void test_for_issue() throws Exception {
        User user = JSON.parseObject("{\"age\":\"0.9390308260917664\"}", User.class);
        assertEquals(0.9390308260917664F, user.age);
    }

    public void test_for_issue_1() throws Exception {
        User user = JSON.parseObject("{\"age\":\"8.200000000000001\"}", User.class);
        assertEquals(8.200000000000001F, user.age);

            

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

                      assertEquals(0.9390308260917664F, user.age);
    }

    public void test_for_issue_1() throws Exception {
        User user = JSON.parseObject("{\"age\":\"8.200000000000001\"}", User.class);
        assertEquals(8.200000000000001F, user.age);
    }

    public void test_for_issue_2() throws Exception {

            

Reported by PMD.

JUnit assertions should include a message
Design

Line: 15

              
    public void test_for_issue_1() throws Exception {
        User user = JSON.parseObject("{\"age\":\"8.200000000000001\"}", User.class);
        assertEquals(8.200000000000001F, user.age);
    }

    public void test_for_issue_2() throws Exception {
        User user = JSON.parseObject("[\"8.200000000000001\"]", User.class, Feature.SupportArrayToBean);
        assertEquals(8.200000000000001F, user.age);

            

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

                      assertEquals(8.200000000000001F, user.age);
    }

    public void test_for_issue_2() throws Exception {
        User user = JSON.parseObject("[\"8.200000000000001\"]", User.class, Feature.SupportArrayToBean);
        assertEquals(8.200000000000001F, user.age);
    }

    public static class User {

            

Reported by PMD.

JUnit assertions should include a message
Design

Line: 20

              
    public void test_for_issue_2() throws Exception {
        User user = JSON.parseObject("[\"8.200000000000001\"]", User.class, Feature.SupportArrayToBean);
        assertEquals(8.200000000000001F, user.age);
    }

    public static class User {
        private float age;
        public float getAge() {

            

Reported by PMD.

src/test/java/com/alibaba/json/bvt/parser/JSONLexerTest_5.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: 13

              
public class JSONLexerTest_5 extends TestCase {

    public void test_scanFieldString() throws Exception {
        VO vo = JSON.parseObject("{\"values\":[\"abc\"]}", VO.class);
        Assert.assertEquals("abc", vo.getValues().get(0));
    }

    public static class VO {

            

Reported by PMD.

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

Line: 15

              
    public void test_scanFieldString() throws Exception {
        VO vo = JSON.parseObject("{\"values\":[\"abc\"]}", VO.class);
        Assert.assertEquals("abc", vo.getValues().get(0));
    }

    public static class VO {

        public LinkedList<String> values;

            

Reported by PMD.

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

Line: 15

              
    public void test_scanFieldString() throws Exception {
        VO vo = JSON.parseObject("{\"values\":[\"abc\"]}", VO.class);
        Assert.assertEquals("abc", vo.getValues().get(0));
    }

    public static class VO {

        public LinkedList<String> values;

            

Reported by PMD.

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

Line: 20

              
    public static class VO {

        public LinkedList<String> values;

        public LinkedList<String> getValues() {
            return values;
        }


            

Reported by PMD.

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

Line: 22

              
        public LinkedList<String> values;

        public LinkedList<String> getValues() {
            return values;
        }

        public void setValues(LinkedList<String> values) {
            this.values = values;

            

Reported by PMD.

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

Line: 26

                          return values;
        }

        public void setValues(LinkedList<String> values) {
            this.values = values;
        }
    }
}

            

Reported by PMD.

src/test/java/com/alibaba/json/bvt/issue_3500/Issue3516.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: 7

              import junit.framework.TestCase;

public class Issue3516 extends TestCase {
    public void test_for_issue() throws Exception {
        JSONValidator validator = JSONValidator.from("{}");
        assertEquals(JSONValidator.Type.Object, validator.getType());
        assertTrue(validator.validate());
    }
}

            

Reported by PMD.

Unit tests should not contain more than 1 assert(s).
Design

Line: 7

              import junit.framework.TestCase;

public class Issue3516 extends TestCase {
    public void test_for_issue() throws Exception {
        JSONValidator validator = JSONValidator.from("{}");
        assertEquals(JSONValidator.Type.Object, validator.getType());
        assertTrue(validator.validate());
    }
}

            

Reported by PMD.

JUnit assertions should include a message
Design

Line: 9

              public class Issue3516 extends TestCase {
    public void test_for_issue() throws Exception {
        JSONValidator validator = JSONValidator.from("{}");
        assertEquals(JSONValidator.Type.Object, validator.getType());
        assertTrue(validator.validate());
    }
}

            

Reported by PMD.

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

Line: 9

              public class Issue3516 extends TestCase {
    public void test_for_issue() throws Exception {
        JSONValidator validator = JSONValidator.from("{}");
        assertEquals(JSONValidator.Type.Object, validator.getType());
        assertTrue(validator.validate());
    }
}

            

Reported by PMD.

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

Line: 10

                  public void test_for_issue() throws Exception {
        JSONValidator validator = JSONValidator.from("{}");
        assertEquals(JSONValidator.Type.Object, validator.getType());
        assertTrue(validator.validate());
    }
}

            

Reported by PMD.

JUnit assertions should include a message
Design

Line: 10

                  public void test_for_issue() throws Exception {
        JSONValidator validator = JSONValidator.from("{}");
        assertEquals(JSONValidator.Type.Object, validator.getType());
        assertTrue(validator.validate());
    }
}

            

Reported by PMD.

src/test/java/com/alibaba/json/bvt/issue_2100/Issue2189.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: 7

              import junit.framework.TestCase;

public class Issue2189 extends TestCase {
    public void test_for_issue() throws Exception {
        String str = "[{\"id\":\"1\",\"name\":\"a\"},{\"id\":\"2\",\"name\":\"b\"}]";
        assertEquals("[\"1\",\"2\"]",
                JSONPath.extract(str, "$.*.id")
                        .toString()
        );

            

Reported by PMD.

JUnit assertions should include a message
Design

Line: 9

              public class Issue2189 extends TestCase {
    public void test_for_issue() throws Exception {
        String str = "[{\"id\":\"1\",\"name\":\"a\"},{\"id\":\"2\",\"name\":\"b\"}]";
        assertEquals("[\"1\",\"2\"]",
                JSONPath.extract(str, "$.*.id")
                        .toString()
        );
    }


            

Reported by PMD.

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

Line: 10

                  public void test_for_issue() throws Exception {
        String str = "[{\"id\":\"1\",\"name\":\"a\"},{\"id\":\"2\",\"name\":\"b\"}]";
        assertEquals("[\"1\",\"2\"]",
                JSONPath.extract(str, "$.*.id")
                        .toString()
        );
    }

    public void test_for_issue_1() 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: 15

                      );
    }

    public void test_for_issue_1() throws Exception {
        String str = "[{\"id\":\"1\",\"name\":\"a\"},{\"id\":\"2\",\"name\":\"b\"}]";
        assertEquals("[\"2\"]",
                JSONPath.extract(str, "$.*[?(@.name=='b')].id")
                        .toString()
        );

            

Reported by PMD.

JUnit assertions should include a message
Design

Line: 17

              
    public void test_for_issue_1() throws Exception {
        String str = "[{\"id\":\"1\",\"name\":\"a\"},{\"id\":\"2\",\"name\":\"b\"}]";
        assertEquals("[\"2\"]",
                JSONPath.extract(str, "$.*[?(@.name=='b')].id")
                        .toString()
        );
    }
}

            

Reported by PMD.

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

Line: 18

                  public void test_for_issue_1() throws Exception {
        String str = "[{\"id\":\"1\",\"name\":\"a\"},{\"id\":\"2\",\"name\":\"b\"}]";
        assertEquals("[\"2\"]",
                JSONPath.extract(str, "$.*[?(@.name=='b')].id")
                        .toString()
        );
    }
}

            

Reported by PMD.

src/test/java/com/alibaba/json/bvt/issue_3500/Issue3579.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: 10

              import java.math.BigDecimal;

public class Issue3579 extends TestCase {
    public void test_for_issue() throws Exception {
        assertEquals("1",
                JSON.toJSONString(new BigDecimal("1"))
        );

        assertEquals("1.",

            

Reported by PMD.

Unit tests should not contain more than 1 assert(s).
Design

Line: 10

              import java.math.BigDecimal;

public class Issue3579 extends TestCase {
    public void test_for_issue() throws Exception {
        assertEquals("1",
                JSON.toJSONString(new BigDecimal("1"))
        );

        assertEquals("1.",

            

Reported by PMD.

JUnit assertions should include a message
Design

Line: 11

              
public class Issue3579 extends TestCase {
    public void test_for_issue() throws Exception {
        assertEquals("1",
                JSON.toJSONString(new BigDecimal("1"))
        );

        assertEquals("1.",
                JSON.toJSONString(new BigDecimal("1"), SerializerFeature.WriteClassName)

            

Reported by PMD.

Dont create instances of already existing BigInteger and BigDecimal (ZERO, ONE, TEN)
Performance

Line: 12

              public class Issue3579 extends TestCase {
    public void test_for_issue() throws Exception {
        assertEquals("1",
                JSON.toJSONString(new BigDecimal("1"))
        );

        assertEquals("1.",
                JSON.toJSONString(new BigDecimal("1"), SerializerFeature.WriteClassName)
        );

            

Reported by PMD.

JUnit assertions should include a message
Design

Line: 15

                              JSON.toJSONString(new BigDecimal("1"))
        );

        assertEquals("1.",
                JSON.toJSONString(new BigDecimal("1"), SerializerFeature.WriteClassName)
        );
    }
}

            

Reported by PMD.

Dont create instances of already existing BigInteger and BigDecimal (ZERO, ONE, TEN)
Performance

Line: 16

                      );

        assertEquals("1.",
                JSON.toJSONString(new BigDecimal("1"), SerializerFeature.WriteClassName)
        );
    }
}

            

Reported by PMD.

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

               * Created by wenshao on 16/05/2017.
 */
public class Issue1203 extends TestCase {
    public void test_for_issue() throws Exception {
        String[] strArr = new String[5];
        strArr[0] = "a";
        strArr[1] = "b";
        strArr[3] = "d";
        strArr[4] = "";

            

Reported by PMD.

JUnit assertions should include a message
Design

Line: 19

                      strArr[4] = "";

        String json = JSON.toJSONString(strArr, SerializerFeature.WriteNullStringAsEmpty);
        assertEquals("[\"a\",\"b\",\"\",\"d\",\"\"]", json);
    }
}

            

Reported by PMD.

Found 'DD'-anomaly for variable 'strArr' (lines '12'-'13').
Error

Line: 12

               */
public class Issue1203 extends TestCase {
    public void test_for_issue() throws Exception {
        String[] strArr = new String[5];
        strArr[0] = "a";
        strArr[1] = "b";
        strArr[3] = "d";
        strArr[4] = "";


            

Reported by PMD.

Found 'DD'-anomaly for variable 'strArr' (lines '13'-'14').
Error

Line: 13

              public class Issue1203 extends TestCase {
    public void test_for_issue() throws Exception {
        String[] strArr = new String[5];
        strArr[0] = "a";
        strArr[1] = "b";
        strArr[3] = "d";
        strArr[4] = "";

        String json = JSON.toJSONString(strArr, SerializerFeature.WriteNullStringAsEmpty);

            

Reported by PMD.

Found 'DD'-anomaly for variable 'strArr' (lines '14'-'15').
Error

Line: 14

                  public void test_for_issue() throws Exception {
        String[] strArr = new String[5];
        strArr[0] = "a";
        strArr[1] = "b";
        strArr[3] = "d";
        strArr[4] = "";

        String json = JSON.toJSONString(strArr, SerializerFeature.WriteNullStringAsEmpty);
        assertEquals("[\"a\",\"b\",\"\",\"d\",\"\"]", json);

            

Reported by PMD.

Found 'DD'-anomaly for variable 'strArr' (lines '15'-'16').
Error

Line: 15

                      String[] strArr = new String[5];
        strArr[0] = "a";
        strArr[1] = "b";
        strArr[3] = "d";
        strArr[4] = "";

        String json = JSON.toJSONString(strArr, SerializerFeature.WriteNullStringAsEmpty);
        assertEquals("[\"a\",\"b\",\"\",\"d\",\"\"]", json);
    }

            

Reported by PMD.

src/test/java/com/alibaba/json/bvt/issue_1200/Issue1225.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: 25

              //                new TypeReference<ExtendGenericType<String>>(){}).data.get(1));
//    }

    public void test_parseObject_2() {
        SimpleGenericObject object = JSON.parseObject("{\"data\":[\"1\",\"2\",\"3\"],\"a\":\"a\"}",
                SimpleGenericObject.class);

        assertEquals("2", object.data.get(1));
    }

            

Reported by PMD.

JUnit assertions should include a message
Design

Line: 29

                      SimpleGenericObject object = JSON.parseObject("{\"data\":[\"1\",\"2\",\"3\"],\"a\":\"a\"}",
                SimpleGenericObject.class);

        assertEquals("2", object.data.get(1));
    }

//    public void test_parseObject_2_jackson() throws Exception {
//        ObjectMapper mapper = new ObjectMapper();
//        SimpleGenericObject object = mapper.readValue("{\"data\":[\"1\",\"2\",\"3\"]}",

            

Reported by PMD.

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

Line: 29

                      SimpleGenericObject object = JSON.parseObject("{\"data\":[\"1\",\"2\",\"3\"],\"a\":\"a\"}",
                SimpleGenericObject.class);

        assertEquals("2", object.data.get(1));
    }

//    public void test_parseObject_2_jackson() throws Exception {
//        ObjectMapper mapper = new ObjectMapper();
//        SimpleGenericObject object = mapper.readValue("{\"data\":[\"1\",\"2\",\"3\"]}",

            

Reported by PMD.

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

Line: 42

              //    }

    static class BaseGenericType<T> {
        public T data;
    }

    static class ExtendGenericType<T> extends BaseGenericType<List<T>> {
    }


            

Reported by PMD.

Avoid unused imports such as 'com.alibaba.fastjson.TypeReference'
Design

Line: 4

              package com.alibaba.json.bvt.issue_1200;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import junit.framework.TestCase;

import java.util.List;


            

Reported by PMD.

Avoid unused imports such as 'com.fasterxml.jackson.databind.ObjectMapper'
Design

Line: 5

              
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import junit.framework.TestCase;

import java.util.List;

/**

            

Reported by PMD.