The following issues were found

src/test/java/com/alibaba/json/bvt/support/hsf/HSFJSONUtilsTest_4.java
14 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

              import java.util.HashSet;

public class HSFJSONUtilsTest_4 extends TestCase {
    public void test_for_hsf() throws Exception {
        final Method method = HSFJSONUtilsTest_4.class.getMethod("f", HashSet.class, BigDecimalDO.class);

        String json = "{\"argsTypes\":[\"java.util.HashSet\",\"com.alibaba.json.bvt.support.hsf.HSFJSONUtilsTest_4$BigDecimalDO\"],\"argsObjs\":[[{\"bd\":10.12379}],{\"$ref\":\"$.argsObjs[0][0]\"}]}";

        Object[] values = HSFJSONUtils.parseInvocationArguments(json, new MethodLocator() {

            

Reported by PMD.

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

Line: 13

              import java.util.HashSet;

public class HSFJSONUtilsTest_4 extends TestCase {
    public void test_for_hsf() throws Exception {
        final Method method = HSFJSONUtilsTest_4.class.getMethod("f", HashSet.class, BigDecimalDO.class);

        String json = "{\"argsTypes\":[\"java.util.HashSet\",\"com.alibaba.json.bvt.support.hsf.HSFJSONUtilsTest_4$BigDecimalDO\"],\"argsObjs\":[[{\"bd\":10.12379}],{\"$ref\":\"$.argsObjs[0][0]\"}]}";

        Object[] values = HSFJSONUtils.parseInvocationArguments(json, new MethodLocator() {

            

Reported by PMD.

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

Line: 14

              
public class HSFJSONUtilsTest_4 extends TestCase {
    public void test_for_hsf() throws Exception {
        final Method method = HSFJSONUtilsTest_4.class.getMethod("f", HashSet.class, BigDecimalDO.class);

        String json = "{\"argsTypes\":[\"java.util.HashSet\",\"com.alibaba.json.bvt.support.hsf.HSFJSONUtilsTest_4$BigDecimalDO\"],\"argsObjs\":[[{\"bd\":10.12379}],{\"$ref\":\"$.argsObjs[0][0]\"}]}";

        Object[] values = HSFJSONUtils.parseInvocationArguments(json, new MethodLocator() {


            

Reported by PMD.

JUnit assertions should include a message
Design

Line: 25

                          }
        });

        assertEquals(2, values.length);

        HashSet<BigDecimalDO> set = (HashSet<BigDecimalDO>) values[0];
        assertEquals(1, set.size());
        assertSame(set.iterator().next(), values[1]);
    }

            

Reported by PMD.

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

Line: 28

                      assertEquals(2, values.length);

        HashSet<BigDecimalDO> set = (HashSet<BigDecimalDO>) values[0];
        assertEquals(1, set.size());
        assertSame(set.iterator().next(), values[1]);
    }

    public static void f(HashSet<BigDecimalDO> a, BigDecimalDO b) {


            

Reported by PMD.

JUnit assertions should include a message
Design

Line: 28

                      assertEquals(2, values.length);

        HashSet<BigDecimalDO> set = (HashSet<BigDecimalDO>) values[0];
        assertEquals(1, set.size());
        assertSame(set.iterator().next(), values[1]);
    }

    public static void f(HashSet<BigDecimalDO> a, BigDecimalDO b) {


            

Reported by PMD.

JUnit assertions should include a message
Design

Line: 29

              
        HashSet<BigDecimalDO> set = (HashSet<BigDecimalDO>) values[0];
        assertEquals(1, set.size());
        assertSame(set.iterator().next(), values[1]);
    }

    public static void f(HashSet<BigDecimalDO> a, BigDecimalDO b) {

    }

            

Reported by PMD.

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

Line: 29

              
        HashSet<BigDecimalDO> set = (HashSet<BigDecimalDO>) values[0];
        assertEquals(1, set.size());
        assertSame(set.iterator().next(), values[1]);
    }

    public static void f(HashSet<BigDecimalDO> a, BigDecimalDO b) {

    }

            

Reported by PMD.

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

Line: 29

              
        HashSet<BigDecimalDO> set = (HashSet<BigDecimalDO>) values[0];
        assertEquals(1, set.size());
        assertSame(set.iterator().next(), values[1]);
    }

    public static void f(HashSet<BigDecimalDO> a, BigDecimalDO b) {

    }

            

Reported by PMD.

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

Line: 32

                      assertSame(set.iterator().next(), values[1]);
    }

    public static void f(HashSet<BigDecimalDO> a, BigDecimalDO b) {

    }

    public static class BigDecimalDO implements Serializable {


            

Reported by PMD.

src/test/java/com/alibaba/json/bvt/parser/deser/DefaultObjectDeserializerTest_collection.java
14 issues
Avoid throwing raw exception types.
Design

Line: 54

              	public static class MyMap<K, V> extends HashMap {

		public MyMap() {
			throw new RuntimeException();
		}

	}
}

            

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

	public void test_0() throws Exception {
		String input = "[{}]";

		List<HashMap> map = JSON.parseObject(input,
				new TypeReference<List<HashMap>>() {
				}.getType());

            

Reported by PMD.

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

Line: 21

              				new TypeReference<List<HashMap>>() {
				}.getType());

		Assert.assertEquals(HashMap.class, map.get(0).getClass());
	}

	public void test_1() throws Exception {
		String input = "{}";


            

Reported by PMD.

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

Line: 21

              				new TypeReference<List<HashMap>>() {
				}.getType());

		Assert.assertEquals(HashMap.class, map.get(0).getClass());
	}

	public void test_1() throws Exception {
		String input = "{}";


            

Reported by PMD.

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

Line: 24

              		Assert.assertEquals(HashMap.class, map.get(0).getClass());
	}

	public void test_1() throws Exception {
		String input = "{}";

		BO<HashMap> map = JSON.parseObject(input,
				new TypeReference<BO<HashMap>>() {
				}.getType());

            

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

              		Assert.assertEquals(HashMap.class, map.get(0).getClass());
	}

	public void test_1() throws Exception {
		String input = "{}";

		BO<HashMap> map = JSON.parseObject(input,
				new TypeReference<BO<HashMap>>() {
				}.getType());

            

Reported by PMD.

Avoid unused local variables such as 'map'.
Design

Line: 27

              	public void test_1() throws Exception {
		String input = "{}";

		BO<HashMap> map = JSON.parseObject(input,
				new TypeReference<BO<HashMap>>() {
				}.getType());
	}

	public void test_2() 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: 32

              				}.getType());
	}

	public void test_2() throws Exception {

		Exception error = null;
		try {
			String input = "{'map':{}}";


            

Reported by PMD.

Avoid unused local variables such as 'map'.
Design

Line: 38

              		try {
			String input = "{'map':{}}";

			MyMap<String, HashMap> map = JSON.parseObject(input,
					new TypeReference<MyMap<String, HashMap>>() {
					}.getType());
		} catch (Exception ex) {
			error = ex;
		}

            

Reported by PMD.

Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block
Design

Line: 41

              			MyMap<String, HashMap> map = JSON.parseObject(input,
					new TypeReference<MyMap<String, HashMap>>() {
					}.getType());
		} catch (Exception ex) {
			error = ex;
		}
		Assert.assertNotNull(error);
	}


            

Reported by PMD.

src/test/java/com/alibaba/json/bvt/parser/JSONLexerTest_set.java
14 issues
JUnit tests should include assert() or fail()
Design

Line: 11

              
public class JSONLexerTest_set extends TestCase {

    public void test_treeSet() throws Exception {
        JSON.parse("Set[]");
    }

    public void test_error() throws Exception {
        Exception error = 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: 11

              
public class JSONLexerTest_set extends TestCase {

    public void test_treeSet() throws Exception {
        JSON.parse("Set[]");
    }

    public void test_error() throws Exception {
        Exception error = 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: 15

                      JSON.parse("Set[]");
    }

    public void test_error() throws Exception {
        Exception error = null;
        try {
            JSON.parse("S_t[]");
        } catch (Exception ex) {
            error = ex;

            

Reported by PMD.

Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block
Design

Line: 19

                      Exception error = null;
        try {
            JSON.parse("S_t[]");
        } catch (Exception ex) {
            error = ex;
        }
        Assert.assertNotNull(error);
    }
   

            

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.assertNotNull(error);
    }
   
    public void test_error_1() throws Exception {
        Exception error = null;
        try {
            JSON.parse("Se_[]");
        } catch (Exception ex) {
            error = ex;

            

Reported by PMD.

Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block
Design

Line: 29

                      Exception error = null;
        try {
            JSON.parse("Se_[]");
        } catch (Exception ex) {
            error = ex;
        }
        Assert.assertNotNull(error);
    }
    

            

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

                  }
    
    
    public void test_error_2() throws Exception {
        Exception error = null;
        try {
            JSON.parse("Set_[]");
        } catch (Exception ex) {
            error = ex;

            

Reported by PMD.

Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block
Design

Line: 40

                      Exception error = null;
        try {
            JSON.parse("Set_[]");
        } catch (Exception ex) {
            error = ex;
        }
        Assert.assertNotNull(error);
    }
    

            

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

                      Assert.assertNotNull(error);
    }
    
    public void test_error_3() throws Exception {
        Exception error = null;
        try {
            JSON.parse("Xet[]");
        } catch (Exception ex) {
            error = ex;

            

Reported by PMD.

Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block
Design

Line: 50

                      Exception error = null;
        try {
            JSON.parse("Xet[]");
        } catch (Exception ex) {
            error = ex;
        }
        Assert.assertNotNull(error);
    }
}

            

Reported by PMD.

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

Line: 22

               * Created by wenshao on 16/03/2017.
 */
public class Mogujie_01 extends TestCase {
    public void test_for_issue() throws Exception {
        JSON.parseObject("{}", Model.class);


    }
    public static class Model {

            

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

               * Created by wenshao on 16/03/2017.
 */
public class Mogujie_01 extends TestCase {
    public void test_for_issue() throws Exception {
        JSON.parseObject("{}", Model.class);


    }
    public static class Model {

            

Reported by PMD.

Too many fields
Design

Line: 27

              

    }
    public static class Model {
        public int f0;
        public int f1;
        public int f2;
        public int f3;
        public int f4;

            

Reported by PMD.

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

Line: 4

              package com.alibaba.json.bvt.bug;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONWriter;
import com.alibaba.fastjson.parser.Feature;
import com.alibaba.fastjson.parser.ParserConfig;
import com.alibaba.fastjson.serializer.SerializerFeature;
import com.alibaba.json.bvtVO.mogujie.BindQueryRespDTO;
import junit.framework.TestCase;

            

Reported by PMD.

Avoid unused imports such as 'com.alibaba.fastjson.parser.Feature'
Design

Line: 5

              
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONWriter;
import com.alibaba.fastjson.parser.Feature;
import com.alibaba.fastjson.parser.ParserConfig;
import com.alibaba.fastjson.serializer.SerializerFeature;
import com.alibaba.json.bvtVO.mogujie.BindQueryRespDTO;
import junit.framework.TestCase;


            

Reported by PMD.

Avoid unused imports such as 'com.alibaba.fastjson.parser.ParserConfig'
Design

Line: 6

              import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONWriter;
import com.alibaba.fastjson.parser.Feature;
import com.alibaba.fastjson.parser.ParserConfig;
import com.alibaba.fastjson.serializer.SerializerFeature;
import com.alibaba.json.bvtVO.mogujie.BindQueryRespDTO;
import junit.framework.TestCase;

import java.io.ByteArrayOutputStream;

            

Reported by PMD.

Avoid unused imports such as 'com.alibaba.fastjson.serializer.SerializerFeature'
Design

Line: 7

              import com.alibaba.fastjson.JSONWriter;
import com.alibaba.fastjson.parser.Feature;
import com.alibaba.fastjson.parser.ParserConfig;
import com.alibaba.fastjson.serializer.SerializerFeature;
import com.alibaba.json.bvtVO.mogujie.BindQueryRespDTO;
import junit.framework.TestCase;

import java.io.ByteArrayOutputStream;
import java.io.IOException;

            

Reported by PMD.

Avoid unused imports such as 'com.alibaba.json.bvtVO.mogujie.BindQueryRespDTO'
Design

Line: 8

              import com.alibaba.fastjson.parser.Feature;
import com.alibaba.fastjson.parser.ParserConfig;
import com.alibaba.fastjson.serializer.SerializerFeature;
import com.alibaba.json.bvtVO.mogujie.BindQueryRespDTO;
import junit.framework.TestCase;

import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.OutputStream;

            

Reported by PMD.

Avoid unused imports such as 'java.io.ByteArrayOutputStream'
Design

Line: 11

              import com.alibaba.json.bvtVO.mogujie.BindQueryRespDTO;
import junit.framework.TestCase;

import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.nio.charset.Charset;
import java.nio.charset.CodingErrorAction;

            

Reported by PMD.

Avoid unused imports such as 'java.io.IOException'
Design

Line: 12

              import junit.framework.TestCase;

import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.nio.charset.Charset;
import java.nio.charset.CodingErrorAction;


            

Reported by PMD.

src/test/java/com/alibaba/json/bvt/writeClassName/WriteClassNameTest_Set5.java
14 issues
Unit tests should not contain more than 1 assert(s).
Design

Line: 14

              
public class WriteClassNameTest_Set5 extends TestCase {

    public void test_list() throws Exception {
        Model model = new Model();
        LinkedHashSet tables = new LinkedHashSet();
        tables.add(new ExtTable(1001));
        tables.add(new Table());
        model.setTables(tables);

            

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

    public void test_list() throws Exception {
        Model model = new Model();
        LinkedHashSet tables = new LinkedHashSet();
        tables.add(new ExtTable(1001));
        tables.add(new Table());
        model.setTables(tables);

            

Reported by PMD.

JUnit assertions should include a message
Design

Line: 22

                      model.setTables(tables);

        String json = JSON.toJSONString(model);
        assertEquals("{\"tables\":[{\"@type\":\"com.alibaba.json.bvt.writeClassName.WriteClassNameTest_Set5$ExtTable\",\"id\":1001},{}]}", json);

        Model model2 = JSON.parseObject(json, Model.class);
        assertEquals(ExtTable.class, model2.getTables().iterator().next().getClass());

        JSONObject jsonObject = JSON.parseObject(json, Feature.IgnoreAutoType);

            

Reported by PMD.

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

Line: 25

                      assertEquals("{\"tables\":[{\"@type\":\"com.alibaba.json.bvt.writeClassName.WriteClassNameTest_Set5$ExtTable\",\"id\":1001},{}]}", json);

        Model model2 = JSON.parseObject(json, Model.class);
        assertEquals(ExtTable.class, model2.getTables().iterator().next().getClass());

        JSONObject jsonObject = JSON.parseObject(json, Feature.IgnoreAutoType);
        assertEquals("{\"tables\":[{\"id\":1001},{}]}", jsonObject.toJSONString());
    }


            

Reported by PMD.

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

Line: 25

                      assertEquals("{\"tables\":[{\"@type\":\"com.alibaba.json.bvt.writeClassName.WriteClassNameTest_Set5$ExtTable\",\"id\":1001},{}]}", json);

        Model model2 = JSON.parseObject(json, Model.class);
        assertEquals(ExtTable.class, model2.getTables().iterator().next().getClass());

        JSONObject jsonObject = JSON.parseObject(json, Feature.IgnoreAutoType);
        assertEquals("{\"tables\":[{\"id\":1001},{}]}", jsonObject.toJSONString());
    }


            

Reported by PMD.

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

Line: 25

                      assertEquals("{\"tables\":[{\"@type\":\"com.alibaba.json.bvt.writeClassName.WriteClassNameTest_Set5$ExtTable\",\"id\":1001},{}]}", json);

        Model model2 = JSON.parseObject(json, Model.class);
        assertEquals(ExtTable.class, model2.getTables().iterator().next().getClass());

        JSONObject jsonObject = JSON.parseObject(json, Feature.IgnoreAutoType);
        assertEquals("{\"tables\":[{\"id\":1001},{}]}", jsonObject.toJSONString());
    }


            

Reported by PMD.

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

Line: 25

                      assertEquals("{\"tables\":[{\"@type\":\"com.alibaba.json.bvt.writeClassName.WriteClassNameTest_Set5$ExtTable\",\"id\":1001},{}]}", json);

        Model model2 = JSON.parseObject(json, Model.class);
        assertEquals(ExtTable.class, model2.getTables().iterator().next().getClass());

        JSONObject jsonObject = JSON.parseObject(json, Feature.IgnoreAutoType);
        assertEquals("{\"tables\":[{\"id\":1001},{}]}", jsonObject.toJSONString());
    }


            

Reported by PMD.

JUnit assertions should include a message
Design

Line: 25

                      assertEquals("{\"tables\":[{\"@type\":\"com.alibaba.json.bvt.writeClassName.WriteClassNameTest_Set5$ExtTable\",\"id\":1001},{}]}", json);

        Model model2 = JSON.parseObject(json, Model.class);
        assertEquals(ExtTable.class, model2.getTables().iterator().next().getClass());

        JSONObject jsonObject = JSON.parseObject(json, Feature.IgnoreAutoType);
        assertEquals("{\"tables\":[{\"id\":1001},{}]}", jsonObject.toJSONString());
    }


            

Reported by PMD.

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

Line: 28

                      assertEquals(ExtTable.class, model2.getTables().iterator().next().getClass());

        JSONObject jsonObject = JSON.parseObject(json, Feature.IgnoreAutoType);
        assertEquals("{\"tables\":[{\"id\":1001},{}]}", jsonObject.toJSONString());
    }

    public static class Model {
        @JSONField(serialzeFeatures = SerializerFeature.WriteClassName)
        private LinkedHashSet<? extends Table> tables;

            

Reported by PMD.

JUnit assertions should include a message
Design

Line: 28

                      assertEquals(ExtTable.class, model2.getTables().iterator().next().getClass());

        JSONObject jsonObject = JSON.parseObject(json, Feature.IgnoreAutoType);
        assertEquals("{\"tables\":[{\"id\":1001},{}]}", jsonObject.toJSONString());
    }

    public static class Model {
        @JSONField(serialzeFeatures = SerializerFeature.WriteClassName)
        private LinkedHashSet<? extends Table> tables;

            

Reported by PMD.

src/main/java/com/alibaba/fastjson/parser/deserializer/TimeDeserializer.java
14 issues
The class 'TimeDeserializer' has a Standard Cyclomatic Complexity of 8 (Highest = 15).
Design

Line: 13

              import com.alibaba.fastjson.parser.JSONToken;
import com.alibaba.fastjson.util.TypeUtils;

public class TimeDeserializer implements ObjectDeserializer {

    public final static TimeDeserializer instance = new TimeDeserializer();

    @SuppressWarnings("unchecked")
    public <T> T deserialze(DefaultJSONParser parser, Type clazz, Object fieldName) {

            

Reported by PMD.

The class 'TimeDeserializer' has a Modified Cyclomatic Complexity of 8 (Highest = 15).
Design

Line: 13

              import com.alibaba.fastjson.parser.JSONToken;
import com.alibaba.fastjson.util.TypeUtils;

public class TimeDeserializer implements ObjectDeserializer {

    public final static TimeDeserializer instance = new TimeDeserializer();

    @SuppressWarnings("unchecked")
    public <T> T deserialze(DefaultJSONParser parser, Type clazz, Object fieldName) {

            

Reported by PMD.

The method 'deserialze' has a Modified Cyclomatic Complexity of 15.
Design

Line: 18

                  public final static TimeDeserializer instance = new TimeDeserializer();

    @SuppressWarnings("unchecked")
    public <T> T deserialze(DefaultJSONParser parser, Type clazz, Object fieldName) {
        JSONLexer lexer = parser.lexer;
        
        if (lexer.token() == JSONToken.COMMA) {
            lexer.nextToken(JSONToken.LITERAL_STRING);
            

            

Reported by PMD.

The method 'deserialze(DefaultJSONParser, Type, Object)' has an NPath complexity of 396, current threshold is 200
Design

Line: 18

                  public final static TimeDeserializer instance = new TimeDeserializer();

    @SuppressWarnings("unchecked")
    public <T> T deserialze(DefaultJSONParser parser, Type clazz, Object fieldName) {
        JSONLexer lexer = parser.lexer;
        
        if (lexer.token() == JSONToken.COMMA) {
            lexer.nextToken(JSONToken.LITERAL_STRING);
            

            

Reported by PMD.

The method 'deserialze' has a Standard Cyclomatic Complexity of 15.
Design

Line: 18

                  public final static TimeDeserializer instance = new TimeDeserializer();

    @SuppressWarnings("unchecked")
    public <T> T deserialze(DefaultJSONParser parser, Type clazz, Object fieldName) {
        JSONLexer lexer = parser.lexer;
        
        if (lexer.token() == JSONToken.COMMA) {
            lexer.nextToken(JSONToken.LITERAL_STRING);
            

            

Reported by PMD.

The method 'deserialze(DefaultJSONParser, Type, Object)' has a cyclomatic complexity of 20.
Design

Line: 18

                  public final static TimeDeserializer instance = new TimeDeserializer();

    @SuppressWarnings("unchecked")
    public <T> T deserialze(DefaultJSONParser parser, Type clazz, Object fieldName) {
        JSONLexer lexer = parser.lexer;
        
        if (lexer.token() == JSONToken.COMMA) {
            lexer.nextToken(JSONToken.LITERAL_STRING);
            

            

Reported by PMD.

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

Line: 21

                  public <T> T deserialze(DefaultJSONParser parser, Type clazz, Object fieldName) {
        JSONLexer lexer = parser.lexer;
        
        if (lexer.token() == JSONToken.COMMA) {
            lexer.nextToken(JSONToken.LITERAL_STRING);
            
            if (lexer.token() != JSONToken.LITERAL_STRING) {
                throw new JSONException("syntax error");
            }

            

Reported by PMD.

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

Line: 58

                          return (T) new java.sql.Time(((Number) val).longValue());
        } else if (val instanceof String) {
            String strVal = (String) val;
            if (strVal.length() == 0) {
                return null;
            }
            
            long longVal;
            JSONScanner dateLexer = new JSONScanner(strVal);

            

Reported by PMD.

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

Line: 65

                          long longVal;
            JSONScanner dateLexer = new JSONScanner(strVal);
            if (dateLexer.scanISO8601DateIfMatch()) {
                longVal = dateLexer.getCalendar().getTimeInMillis();
            } else {
                boolean isDigit = true;
                for (int i = 0; i< strVal.length(); ++i) {
                    char ch = strVal.charAt(i);
                    if (ch < '0' || ch > '9') {

            

Reported by PMD.

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

Line: 68

                              longVal = dateLexer.getCalendar().getTimeInMillis();
            } else {
                boolean isDigit = true;
                for (int i = 0; i< strVal.length(); ++i) {
                    char ch = strVal.charAt(i);
                    if (ch < '0' || ch > '9') {
                        isDigit = false;
                        break;
                    }

            

Reported by PMD.

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

               * Created by wenshao on 2016/10/19.
 */
public class Issue869 extends TestCase {
    public void test_for_issue() throws Exception {
        List<DoublePoint> doublePointList = new ArrayList<DoublePoint>();
        {
            DoublePoint doublePoint = new DoublePoint();
            doublePoint.startPoint = new Point(22, 35);
            doublePoint.endPoint = doublePoint.startPoint;

            

Reported by PMD.

JUnit assertions should include a message
Design

Line: 31

                      }

        String json = JSON.toJSONString(doublePointList);
        assertEquals("[{\"endPoint\":{\"x\":22,\"y\":35},\"startPoint\":{\"x\":22,\"y\":35}},{\"endPoint\":{\"x\":16,\"y\":18},\"startPoint\":{\"x\":16,\"y\":18}}]", json);
    }

    public void test_for_issue_parse() throws Exception {

        String text = "[{\"endPoint\":{\"x\":22,\"y\":35},\"startPoint\":{\"$ref\":\"$[0].endPoint\"}},{\"endPoint\":{\"$ref\":\"$[1].startPoint\"},\"startPoint\":{\"x\":16,\"y\":18}}]";

            

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

                      assertEquals("[{\"endPoint\":{\"x\":22,\"y\":35},\"startPoint\":{\"x\":22,\"y\":35}},{\"endPoint\":{\"x\":16,\"y\":18},\"startPoint\":{\"x\":16,\"y\":18}}]", json);
    }

    public void test_for_issue_parse() throws Exception {

        String text = "[{\"endPoint\":{\"x\":22,\"y\":35},\"startPoint\":{\"$ref\":\"$[0].endPoint\"}},{\"endPoint\":{\"$ref\":\"$[1].startPoint\"},\"startPoint\":{\"x\":16,\"y\":18}}]";
        List<DoublePoint> doublePointList = JSON.parseObject(text, new TypeReference<List<DoublePoint>>(){});
        assertNotNull(doublePointList.get(0));
        assertNotNull(doublePointList.get(1));

            

Reported by PMD.

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

Line: 34

                      assertEquals("[{\"endPoint\":{\"x\":22,\"y\":35},\"startPoint\":{\"x\":22,\"y\":35}},{\"endPoint\":{\"x\":16,\"y\":18},\"startPoint\":{\"x\":16,\"y\":18}}]", json);
    }

    public void test_for_issue_parse() throws Exception {

        String text = "[{\"endPoint\":{\"x\":22,\"y\":35},\"startPoint\":{\"$ref\":\"$[0].endPoint\"}},{\"endPoint\":{\"$ref\":\"$[1].startPoint\"},\"startPoint\":{\"x\":16,\"y\":18}}]";
        List<DoublePoint> doublePointList = JSON.parseObject(text, new TypeReference<List<DoublePoint>>(){});
        assertNotNull(doublePointList.get(0));
        assertNotNull(doublePointList.get(1));

            

Reported by PMD.

JUnit assertions should include a message
Design

Line: 38

              
        String text = "[{\"endPoint\":{\"x\":22,\"y\":35},\"startPoint\":{\"$ref\":\"$[0].endPoint\"}},{\"endPoint\":{\"$ref\":\"$[1].startPoint\"},\"startPoint\":{\"x\":16,\"y\":18}}]";
        List<DoublePoint> doublePointList = JSON.parseObject(text, new TypeReference<List<DoublePoint>>(){});
        assertNotNull(doublePointList.get(0));
        assertNotNull(doublePointList.get(1));
        assertSame(doublePointList.get(0).startPoint, doublePointList.get(0).endPoint);
        assertSame(doublePointList.get(1).startPoint, doublePointList.get(1).endPoint);
    }


            

Reported by PMD.

JUnit assertions should include a message
Design

Line: 39

                      String text = "[{\"endPoint\":{\"x\":22,\"y\":35},\"startPoint\":{\"$ref\":\"$[0].endPoint\"}},{\"endPoint\":{\"$ref\":\"$[1].startPoint\"},\"startPoint\":{\"x\":16,\"y\":18}}]";
        List<DoublePoint> doublePointList = JSON.parseObject(text, new TypeReference<List<DoublePoint>>(){});
        assertNotNull(doublePointList.get(0));
        assertNotNull(doublePointList.get(1));
        assertSame(doublePointList.get(0).startPoint, doublePointList.get(0).endPoint);
        assertSame(doublePointList.get(1).startPoint, doublePointList.get(1).endPoint);
    }

    public static  class DoublePoint{

            

Reported by PMD.

JUnit assertions should include a message
Design

Line: 40

                      List<DoublePoint> doublePointList = JSON.parseObject(text, new TypeReference<List<DoublePoint>>(){});
        assertNotNull(doublePointList.get(0));
        assertNotNull(doublePointList.get(1));
        assertSame(doublePointList.get(0).startPoint, doublePointList.get(0).endPoint);
        assertSame(doublePointList.get(1).startPoint, doublePointList.get(1).endPoint);
    }

    public static  class DoublePoint{
        public Point startPoint;

            

Reported by PMD.

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

Line: 40

                      List<DoublePoint> doublePointList = JSON.parseObject(text, new TypeReference<List<DoublePoint>>(){});
        assertNotNull(doublePointList.get(0));
        assertNotNull(doublePointList.get(1));
        assertSame(doublePointList.get(0).startPoint, doublePointList.get(0).endPoint);
        assertSame(doublePointList.get(1).startPoint, doublePointList.get(1).endPoint);
    }

    public static  class DoublePoint{
        public Point startPoint;

            

Reported by PMD.

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

Line: 40

                      List<DoublePoint> doublePointList = JSON.parseObject(text, new TypeReference<List<DoublePoint>>(){});
        assertNotNull(doublePointList.get(0));
        assertNotNull(doublePointList.get(1));
        assertSame(doublePointList.get(0).startPoint, doublePointList.get(0).endPoint);
        assertSame(doublePointList.get(1).startPoint, doublePointList.get(1).endPoint);
    }

    public static  class DoublePoint{
        public Point startPoint;

            

Reported by PMD.

JUnit assertions should include a message
Design

Line: 41

                      assertNotNull(doublePointList.get(0));
        assertNotNull(doublePointList.get(1));
        assertSame(doublePointList.get(0).startPoint, doublePointList.get(0).endPoint);
        assertSame(doublePointList.get(1).startPoint, doublePointList.get(1).endPoint);
    }

    public static  class DoublePoint{
        public Point startPoint;
        public Point endPoint;

            

Reported by PMD.

src/test/java/com/alibaba/json/bvt/writeClassName/WriteClassNameTest5.java
14 issues
System.out.println is used
Design

Line: 20

                      model.a = b;

        String str = JSON.toJSONString(model);
        System.out.println(str);
        assertEquals("{\"a\":{\"@type\":\"com.alibaba.json.bvt.writeClassName.WriteClassNameTest5$B\",\"id\":1001,\"value\":2017}}", str);

        Model model2 = JSON.parseObject(str, Model.class);
        assertTrue(model2.a instanceof B);
    }

            

Reported by PMD.

System.out.println is used
Design

Line: 34

                      model.a = a;

        String str = JSON.toJSONString(model);
        System.out.println(str);
        assertEquals("{\"a\":{\"id\":1001}}", str);

        Model model2 = JSON.parseObject(str, Model.class);
        assertSame(A.class, model2.a.getClass());
    }

            

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 14/08/2017.
 */
public class WriteClassNameTest5 extends TestCase {
    public void test_for_writeClassName() throws Exception {
        Model model = new Model();
        B b = new B();
        b.id = 1001;
        b.value = 2017;
        model.a = b;

            

Reported by PMD.

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

Line: 12

               * Created by wenshao on 14/08/2017.
 */
public class WriteClassNameTest5 extends TestCase {
    public void test_for_writeClassName() throws Exception {
        Model model = new Model();
        B b = new B();
        b.id = 1001;
        b.value = 2017;
        model.a = b;

            

Reported by PMD.

JUnit assertions should include a message
Design

Line: 21

              
        String str = JSON.toJSONString(model);
        System.out.println(str);
        assertEquals("{\"a\":{\"@type\":\"com.alibaba.json.bvt.writeClassName.WriteClassNameTest5$B\",\"id\":1001,\"value\":2017}}", str);

        Model model2 = JSON.parseObject(str, Model.class);
        assertTrue(model2.a instanceof B);
    }


            

Reported by PMD.

JUnit assertions should include a message
Design

Line: 24

                      assertEquals("{\"a\":{\"@type\":\"com.alibaba.json.bvt.writeClassName.WriteClassNameTest5$B\",\"id\":1001,\"value\":2017}}", str);

        Model model2 = JSON.parseObject(str, Model.class);
        assertTrue(model2.a instanceof B);
    }

    public void test_for_writeClassName_no() throws Exception {
        Model model = new Model();
        A a = new A();

            

Reported by PMD.

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

Line: 27

                      assertTrue(model2.a instanceof B);
    }

    public void test_for_writeClassName_no() throws Exception {
        Model model = new Model();
        A a = new A();
        a.id = 1001;
        model.a = a;


            

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

                      assertTrue(model2.a instanceof B);
    }

    public void test_for_writeClassName_no() throws Exception {
        Model model = new Model();
        A a = new A();
        a.id = 1001;
        model.a = a;


            

Reported by PMD.

JUnit assertions should include a message
Design

Line: 35

              
        String str = JSON.toJSONString(model);
        System.out.println(str);
        assertEquals("{\"a\":{\"id\":1001}}", str);

        Model model2 = JSON.parseObject(str, Model.class);
        assertSame(A.class, model2.a.getClass());
    }


            

Reported by PMD.

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

Line: 38

                      assertEquals("{\"a\":{\"id\":1001}}", str);

        Model model2 = JSON.parseObject(str, Model.class);
        assertSame(A.class, model2.a.getClass());
    }

    public static class Model {
        @JSONField(serialzeFeatures = SerializerFeature.WriteClassName)
        public A a;

            

Reported by PMD.

src/main/java/com/alibaba/fastjson/parser/deserializer/ResolveFieldDeserializer.java
14 issues
Found non-transient, non-static member. Please mark as transient or provide accessors.
Error

Line: 16

              @SuppressWarnings("rawtypes")
public final class ResolveFieldDeserializer extends FieldDeserializer {

    private final int               index;
    private final List              list;
    private final DefaultJSONParser parser;
    
    private final Object              key;
    private final Map map;

            

Reported by PMD.

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

Line: 17

              public final class ResolveFieldDeserializer extends FieldDeserializer {

    private final int               index;
    private final List              list;
    private final DefaultJSONParser parser;
    
    private final Object              key;
    private final Map map;
    

            

Reported by PMD.

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

Line: 18

              
    private final int               index;
    private final List              list;
    private final DefaultJSONParser parser;
    
    private final Object              key;
    private final Map map;
    
    private final Collection collection;

            

Reported by PMD.

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

Line: 20

                  private final List              list;
    private final DefaultJSONParser parser;
    
    private final Object              key;
    private final Map map;
    
    private final Collection collection;

    public ResolveFieldDeserializer(DefaultJSONParser parser, List list, int index){

            

Reported by PMD.

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

Line: 21

                  private final DefaultJSONParser parser;
    
    private final Object              key;
    private final Map map;
    
    private final Collection collection;

    public ResolveFieldDeserializer(DefaultJSONParser parser, List list, int index){
        super(null, null);

            

Reported by PMD.

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

Line: 23

                  private final Object              key;
    private final Map map;
    
    private final Collection collection;

    public ResolveFieldDeserializer(DefaultJSONParser parser, List list, int index){
        super(null, null);
        this.parser = parser;
        this.index = index;

            

Reported by PMD.

Assigning an Object to null is a code smell. Consider refactoring.
Error

Line: 40

                  public ResolveFieldDeserializer(Map map, Object index){
        super(null, null);
        
        this.parser = null;
        this.index = -1;
        this.list = null;
        
        this.key = index;
        this.map = map;

            

Reported by PMD.

Assigning an Object to null is a code smell. Consider refactoring.
Error

Line: 42

                      
        this.parser = null;
        this.index = -1;
        this.list = null;
        
        this.key = index;
        this.map = map;
        
        collection = null;

            

Reported by PMD.

Assigning an Object to null is a code smell. Consider refactoring.
Error

Line: 53

                  public ResolveFieldDeserializer(Collection collection){
        super(null, null);
        
        this.parser = null;
        this.index = -1;
        this.list = null;
        
        key = null;
        map = null;

            

Reported by PMD.

Assigning an Object to null is a code smell. Consider refactoring.
Error

Line: 55

                      
        this.parser = null;
        this.index = -1;
        this.list = null;
        
        key = null;
        map = null;
        
        this.collection = collection;

            

Reported by PMD.

src/test/java/com/alibaba/json/bvt/feature/DisableFieldSmartMatchTest.java
14 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 17/03/2017.
 */
public class DisableFieldSmartMatchTest extends TestCase {
    public void test_feature() throws Exception {
        assertEquals(123, JSON.parseObject("{\"person_id\":123}", Model_for_disableFieldSmartMatchMask.class).personId);
        assertEquals(0, JSON.parseObject("{\"person_id\":123}", Model_for_disableFieldSmartMatchMask.class, Feature.DisableFieldSmartMatch).personId);
        assertEquals(123, JSON.parseObject("{\"personId\":123}", Model_for_disableFieldSmartMatchMask.class, Feature.DisableFieldSmartMatch).personId);
    }


            

Reported by PMD.

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

Line: 12

               * Created by wenshao on 17/03/2017.
 */
public class DisableFieldSmartMatchTest extends TestCase {
    public void test_feature() throws Exception {
        assertEquals(123, JSON.parseObject("{\"person_id\":123}", Model_for_disableFieldSmartMatchMask.class).personId);
        assertEquals(0, JSON.parseObject("{\"person_id\":123}", Model_for_disableFieldSmartMatchMask.class, Feature.DisableFieldSmartMatch).personId);
        assertEquals(123, JSON.parseObject("{\"personId\":123}", Model_for_disableFieldSmartMatchMask.class, Feature.DisableFieldSmartMatch).personId);
    }


            

Reported by PMD.

JUnit assertions should include a message
Design

Line: 13

               */
public class DisableFieldSmartMatchTest extends TestCase {
    public void test_feature() throws Exception {
        assertEquals(123, JSON.parseObject("{\"person_id\":123}", Model_for_disableFieldSmartMatchMask.class).personId);
        assertEquals(0, JSON.parseObject("{\"person_id\":123}", Model_for_disableFieldSmartMatchMask.class, Feature.DisableFieldSmartMatch).personId);
        assertEquals(123, JSON.parseObject("{\"personId\":123}", Model_for_disableFieldSmartMatchMask.class, Feature.DisableFieldSmartMatch).personId);
    }

    public void test_feature2() throws Exception {

            

Reported by PMD.

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

Line: 13

               */
public class DisableFieldSmartMatchTest extends TestCase {
    public void test_feature() throws Exception {
        assertEquals(123, JSON.parseObject("{\"person_id\":123}", Model_for_disableFieldSmartMatchMask.class).personId);
        assertEquals(0, JSON.parseObject("{\"person_id\":123}", Model_for_disableFieldSmartMatchMask.class, Feature.DisableFieldSmartMatch).personId);
        assertEquals(123, JSON.parseObject("{\"personId\":123}", Model_for_disableFieldSmartMatchMask.class, Feature.DisableFieldSmartMatch).personId);
    }

    public void test_feature2() throws Exception {

            

Reported by PMD.

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

Line: 14

              public class DisableFieldSmartMatchTest extends TestCase {
    public void test_feature() throws Exception {
        assertEquals(123, JSON.parseObject("{\"person_id\":123}", Model_for_disableFieldSmartMatchMask.class).personId);
        assertEquals(0, JSON.parseObject("{\"person_id\":123}", Model_for_disableFieldSmartMatchMask.class, Feature.DisableFieldSmartMatch).personId);
        assertEquals(123, JSON.parseObject("{\"personId\":123}", Model_for_disableFieldSmartMatchMask.class, Feature.DisableFieldSmartMatch).personId);
    }

    public void test_feature2() throws Exception {
        assertEquals(0, JSON.parseObject("{\"person_id\":123}", Model_for_disableFieldSmartMatchMask2.class).personId);

            

Reported by PMD.

JUnit assertions should include a message
Design

Line: 14

              public class DisableFieldSmartMatchTest extends TestCase {
    public void test_feature() throws Exception {
        assertEquals(123, JSON.parseObject("{\"person_id\":123}", Model_for_disableFieldSmartMatchMask.class).personId);
        assertEquals(0, JSON.parseObject("{\"person_id\":123}", Model_for_disableFieldSmartMatchMask.class, Feature.DisableFieldSmartMatch).personId);
        assertEquals(123, JSON.parseObject("{\"personId\":123}", Model_for_disableFieldSmartMatchMask.class, Feature.DisableFieldSmartMatch).personId);
    }

    public void test_feature2() throws Exception {
        assertEquals(0, JSON.parseObject("{\"person_id\":123}", Model_for_disableFieldSmartMatchMask2.class).personId);

            

Reported by PMD.

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

Line: 15

                  public void test_feature() throws Exception {
        assertEquals(123, JSON.parseObject("{\"person_id\":123}", Model_for_disableFieldSmartMatchMask.class).personId);
        assertEquals(0, JSON.parseObject("{\"person_id\":123}", Model_for_disableFieldSmartMatchMask.class, Feature.DisableFieldSmartMatch).personId);
        assertEquals(123, JSON.parseObject("{\"personId\":123}", Model_for_disableFieldSmartMatchMask.class, Feature.DisableFieldSmartMatch).personId);
    }

    public void test_feature2() throws Exception {
        assertEquals(0, JSON.parseObject("{\"person_id\":123}", Model_for_disableFieldSmartMatchMask2.class).personId);
        assertEquals(123, JSON.parseObject("{\"personId\":123}", Model_for_disableFieldSmartMatchMask2.class).personId);

            

Reported by PMD.

JUnit assertions should include a message
Design

Line: 15

                  public void test_feature() throws Exception {
        assertEquals(123, JSON.parseObject("{\"person_id\":123}", Model_for_disableFieldSmartMatchMask.class).personId);
        assertEquals(0, JSON.parseObject("{\"person_id\":123}", Model_for_disableFieldSmartMatchMask.class, Feature.DisableFieldSmartMatch).personId);
        assertEquals(123, JSON.parseObject("{\"personId\":123}", Model_for_disableFieldSmartMatchMask.class, Feature.DisableFieldSmartMatch).personId);
    }

    public void test_feature2() throws Exception {
        assertEquals(0, JSON.parseObject("{\"person_id\":123}", Model_for_disableFieldSmartMatchMask2.class).personId);
        assertEquals(123, JSON.parseObject("{\"personId\":123}", Model_for_disableFieldSmartMatchMask2.class).personId);

            

Reported by PMD.

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

Line: 18

                      assertEquals(123, JSON.parseObject("{\"personId\":123}", Model_for_disableFieldSmartMatchMask.class, Feature.DisableFieldSmartMatch).personId);
    }

    public void test_feature2() throws Exception {
        assertEquals(0, JSON.parseObject("{\"person_id\":123}", Model_for_disableFieldSmartMatchMask2.class).personId);
        assertEquals(123, JSON.parseObject("{\"personId\":123}", Model_for_disableFieldSmartMatchMask2.class).personId);
    }

    public static class Model_for_disableFieldSmartMatchMask {

            

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(123, JSON.parseObject("{\"personId\":123}", Model_for_disableFieldSmartMatchMask.class, Feature.DisableFieldSmartMatch).personId);
    }

    public void test_feature2() throws Exception {
        assertEquals(0, JSON.parseObject("{\"person_id\":123}", Model_for_disableFieldSmartMatchMask2.class).personId);
        assertEquals(123, JSON.parseObject("{\"personId\":123}", Model_for_disableFieldSmartMatchMask2.class).personId);
    }

    public static class Model_for_disableFieldSmartMatchMask {

            

Reported by PMD.