The following issues were found

litemall-db/src/main/java/org/linlinjava/litemall/db/domain/LitemallGoodsAttribute.java
48 issues
Avoid instantiating Boolean objects; reference Boolean.TRUE or Boolean.FALSE or call Boolean.valueOf() instead.
Performance

Line: 344

                   * @mbg.generated
     */
    public enum Deleted {
        NOT_DELETED(new Boolean("0"), "未删除"),
        IS_DELETED(new Boolean("1"), "已删除");

        /**
         * This field was generated by MyBatis Generator.
         * This field corresponds to the database table litemall_goods_attribute

            

Reported by PMD.

Avoid instantiating Boolean objects; reference Boolean.TRUE or Boolean.FALSE or call Boolean.valueOf() instead.
Performance

Line: 345

                   */
    public enum Deleted {
        NOT_DELETED(new Boolean("0"), "未删除"),
        IS_DELETED(new Boolean("1"), "已删除");

        /**
         * This field was generated by MyBatis Generator.
         * This field corresponds to the database table litemall_goods_attribute
         *

            

Reported by PMD.

The class 'LitemallGoodsAttribute' is suspected to be a Data Class (WOC=22.222%, NOPA=2, NOAM=14, WMC=36)
Design

Line: 7

              import java.util.ArrayList;
import java.util.Arrays;

public class LitemallGoodsAttribute {
    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database table litemall_goods_attribute
     *
     * @mbg.generated

            

Reported by PMD.

The class 'LitemallGoodsAttribute' has a Modified Cyclomatic Complexity of 2 (Highest = 11).
Design

Line: 7

              import java.util.ArrayList;
import java.util.Arrays;

public class LitemallGoodsAttribute {
    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database table litemall_goods_attribute
     *
     * @mbg.generated

            

Reported by PMD.

The class 'LitemallGoodsAttribute' has a Standard Cyclomatic Complexity of 2 (Highest = 11).
Design

Line: 7

              import java.util.ArrayList;
import java.util.Arrays;

public class LitemallGoodsAttribute {
    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database table litemall_goods_attribute
     *
     * @mbg.generated

            

Reported by PMD.

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

Line: 238

                   * @mbg.generated
     */
    public void andLogicalDeleted(boolean deleted) {
        setDeleted(deleted ? Deleted.IS_DELETED.value() : Deleted.NOT_DELETED.value());
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column litemall_goods_attribute.deleted

            

Reported by PMD.

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

Line: 238

                   * @mbg.generated
     */
    public void andLogicalDeleted(boolean deleted) {
        setDeleted(deleted ? Deleted.IS_DELETED.value() : Deleted.NOT_DELETED.value());
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column litemall_goods_attribute.deleted

            

Reported by PMD.

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

Line: 273

                   */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", IS_DELETED=").append(IS_DELETED);
        sb.append(", NOT_DELETED=").append(NOT_DELETED);

            

Reported by PMD.

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

Line: 274

                  @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", IS_DELETED=").append(IS_DELETED);
        sb.append(", NOT_DELETED=").append(NOT_DELETED);
        sb.append(", id=").append(id);

            

Reported by PMD.

StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable.
Performance

Line: 274

                  @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", IS_DELETED=").append(IS_DELETED);
        sb.append(", NOT_DELETED=").append(NOT_DELETED);
        sb.append(", id=").append(id);

            

Reported by PMD.

litemall-db/src/main/java/org/linlinjava/litemall/db/domain/LitemallSearchHistory.java
48 issues
Avoid instantiating Boolean objects; reference Boolean.TRUE or Boolean.FALSE or call Boolean.valueOf() instead.
Performance

Line: 344

                   * @mbg.generated
     */
    public enum Deleted {
        NOT_DELETED(new Boolean("0"), "未删除"),
        IS_DELETED(new Boolean("1"), "已删除");

        /**
         * This field was generated by MyBatis Generator.
         * This field corresponds to the database table litemall_search_history

            

Reported by PMD.

Avoid instantiating Boolean objects; reference Boolean.TRUE or Boolean.FALSE or call Boolean.valueOf() instead.
Performance

Line: 345

                   */
    public enum Deleted {
        NOT_DELETED(new Boolean("0"), "未删除"),
        IS_DELETED(new Boolean("1"), "已删除");

        /**
         * This field was generated by MyBatis Generator.
         * This field corresponds to the database table litemall_search_history
         *

            

Reported by PMD.

The class 'LitemallSearchHistory' is suspected to be a Data Class (WOC=22.222%, NOPA=2, NOAM=14, WMC=36)
Design

Line: 7

              import java.util.ArrayList;
import java.util.Arrays;

public class LitemallSearchHistory {
    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database table litemall_search_history
     *
     * @mbg.generated

            

Reported by PMD.

The class 'LitemallSearchHistory' has a Modified Cyclomatic Complexity of 2 (Highest = 11).
Design

Line: 7

              import java.util.ArrayList;
import java.util.Arrays;

public class LitemallSearchHistory {
    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database table litemall_search_history
     *
     * @mbg.generated

            

Reported by PMD.

The class 'LitemallSearchHistory' has a Standard Cyclomatic Complexity of 2 (Highest = 11).
Design

Line: 7

              import java.util.ArrayList;
import java.util.Arrays;

public class LitemallSearchHistory {
    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database table litemall_search_history
     *
     * @mbg.generated

            

Reported by PMD.

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

Line: 238

                   * @mbg.generated
     */
    public void andLogicalDeleted(boolean deleted) {
        setDeleted(deleted ? Deleted.IS_DELETED.value() : Deleted.NOT_DELETED.value());
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column litemall_search_history.deleted

            

Reported by PMD.

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

Line: 238

                   * @mbg.generated
     */
    public void andLogicalDeleted(boolean deleted) {
        setDeleted(deleted ? Deleted.IS_DELETED.value() : Deleted.NOT_DELETED.value());
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column litemall_search_history.deleted

            

Reported by PMD.

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

Line: 273

                   */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", IS_DELETED=").append(IS_DELETED);
        sb.append(", NOT_DELETED=").append(NOT_DELETED);

            

Reported by PMD.

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

Line: 274

                  @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", IS_DELETED=").append(IS_DELETED);
        sb.append(", NOT_DELETED=").append(NOT_DELETED);
        sb.append(", id=").append(id);

            

Reported by PMD.

StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable.
Performance

Line: 274

                  @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", IS_DELETED=").append(IS_DELETED);
        sb.append(", NOT_DELETED=").append(NOT_DELETED);
        sb.append(", id=").append(id);

            

Reported by PMD.

litemall-wx-api/src/main/java/org/linlinjava/litemall/wx/web/WxGoodsController.java
47 issues
Logger should be defined private static final and have the correct class
Error

Line: 35

              @RequestMapping("/wx/goods")
@Validated
public class WxGoodsController {
	private final Log logger = LogFactory.getLog(WxGoodsController.class);

	@Autowired
	private LitemallGoodsService goodsService;

	@Autowired

            

Reported by PMD.

Avoid unused private fields such as 'logger'.
Design

Line: 35

              @RequestMapping("/wx/goods")
@Validated
public class WxGoodsController {
	private final Log logger = LogFactory.getLog(WxGoodsController.class);

	@Autowired
	private LitemallGoodsService goodsService;

	@Autowired

            

Reported by PMD.

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

Line: 38

              	private final Log logger = LogFactory.getLog(WxGoodsController.class);

	@Autowired
	private LitemallGoodsService goodsService;

	@Autowired
	private LitemallGoodsProductService productService;

	@Autowired

            

Reported by PMD.

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

Line: 41

              	private LitemallGoodsService goodsService;

	@Autowired
	private LitemallGoodsProductService productService;

	@Autowired
	private LitemallIssueService goodsIssueService;

	@Autowired

            

Reported by PMD.

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

Line: 44

              	private LitemallGoodsProductService productService;

	@Autowired
	private LitemallIssueService goodsIssueService;

	@Autowired
	private LitemallGoodsAttributeService goodsAttributeService;

	@Autowired

            

Reported by PMD.

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

Line: 47

              	private LitemallIssueService goodsIssueService;

	@Autowired
	private LitemallGoodsAttributeService goodsAttributeService;

	@Autowired
	private LitemallBrandService brandService;

	@Autowired

            

Reported by PMD.

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

Line: 50

              	private LitemallGoodsAttributeService goodsAttributeService;

	@Autowired
	private LitemallBrandService brandService;

	@Autowired
	private LitemallCommentService commentService;

	@Autowired

            

Reported by PMD.

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

Line: 53

              	private LitemallBrandService brandService;

	@Autowired
	private LitemallCommentService commentService;

	@Autowired
	private LitemallUserService userService;

	@Autowired

            

Reported by PMD.

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

Line: 56

              	private LitemallCommentService commentService;

	@Autowired
	private LitemallUserService userService;

	@Autowired
	private LitemallCollectService collectService;

	@Autowired

            

Reported by PMD.

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

Line: 59

              	private LitemallUserService userService;

	@Autowired
	private LitemallCollectService collectService;

	@Autowired
	private LitemallFootprintService footprintService;

	@Autowired

            

Reported by PMD.

litemall-db/src/main/java/org/linlinjava/litemall/db/domain/LitemallUserExample.java
46 issues
Avoid throwing raw exception types.
Design

Line: 248

              
        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {

            

Reported by PMD.

Avoid throwing raw exception types.
Design

Line: 255

              
        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {

            

Reported by PMD.

Avoid throwing raw exception types.
Design

Line: 262

              
        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andIdIsNull() {

            

Reported by PMD.

This class has a bunch of public methods and attributes
Design

Line: 1

              package org.linlinjava.litemall.db.domain;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;

public class LitemallUserExample {
    /**

            

Reported by PMD.

Avoid really long classes.
Design

Line: 8

              import java.util.ArrayList;
import java.util.List;

public class LitemallUserExample {
    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database table litemall_user
     *
     * @mbg.generated

            

Reported by PMD.

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

Line: 31

                   *
     * @mbg.generated
     */
    protected List<Criteria> oredCriteria;

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table litemall_user
     *

            

Reported by PMD.

Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty()
Design

Line: 152

                   */
    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }


            

Reported by PMD.

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

Line: 177

                   */
    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    /**
     * This method was generated by MyBatis Generator.

            

Reported by PMD.

This abstract class does not have any abstract methods
Design

Line: 226

                   *
     * @mbg.generated
     */
    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();

            

Reported by PMD.

This class has too many methods, consider refactoring it.
Design

Line: 226

                   *
     * @mbg.generated
     */
    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();

            

Reported by PMD.

litemall-db/src/main/java/org/linlinjava/litemall/db/domain/LitemallFootprint.java
44 issues
Avoid instantiating Boolean objects; reference Boolean.TRUE or Boolean.FALSE or call Boolean.valueOf() instead.
Performance

Line: 308

                   * @mbg.generated
     */
    public enum Deleted {
        NOT_DELETED(new Boolean("0"), "未删除"),
        IS_DELETED(new Boolean("1"), "已删除");

        /**
         * This field was generated by MyBatis Generator.
         * This field corresponds to the database table litemall_footprint

            

Reported by PMD.

Avoid instantiating Boolean objects; reference Boolean.TRUE or Boolean.FALSE or call Boolean.valueOf() instead.
Performance

Line: 309

                   */
    public enum Deleted {
        NOT_DELETED(new Boolean("0"), "未删除"),
        IS_DELETED(new Boolean("1"), "已删除");

        /**
         * This field was generated by MyBatis Generator.
         * This field corresponds to the database table litemall_footprint
         *

            

Reported by PMD.

The class 'LitemallFootprint' has a Standard Cyclomatic Complexity of 2 (Highest = 10).
Design

Line: 7

              import java.util.ArrayList;
import java.util.Arrays;

public class LitemallFootprint {
    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database table litemall_footprint
     *
     * @mbg.generated

            

Reported by PMD.

The class 'LitemallFootprint' is suspected to be a Data Class (WOC=25.000%, NOPA=2, NOAM=12, WMC=32)
Design

Line: 7

              import java.util.ArrayList;
import java.util.Arrays;

public class LitemallFootprint {
    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database table litemall_footprint
     *
     * @mbg.generated

            

Reported by PMD.

The class 'LitemallFootprint' has a Modified Cyclomatic Complexity of 2 (Highest = 10).
Design

Line: 7

              import java.util.ArrayList;
import java.util.Arrays;

public class LitemallFootprint {
    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database table litemall_footprint
     *
     * @mbg.generated

            

Reported by PMD.

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

Line: 205

                   * @mbg.generated
     */
    public void andLogicalDeleted(boolean deleted) {
        setDeleted(deleted ? Deleted.IS_DELETED.value() : Deleted.NOT_DELETED.value());
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column litemall_footprint.deleted

            

Reported by PMD.

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

Line: 205

                   * @mbg.generated
     */
    public void andLogicalDeleted(boolean deleted) {
        setDeleted(deleted ? Deleted.IS_DELETED.value() : Deleted.NOT_DELETED.value());
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column litemall_footprint.deleted

            

Reported by PMD.

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

Line: 240

                   */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", IS_DELETED=").append(IS_DELETED);
        sb.append(", NOT_DELETED=").append(NOT_DELETED);

            

Reported by PMD.

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

Line: 241

                  @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", IS_DELETED=").append(IS_DELETED);
        sb.append(", NOT_DELETED=").append(NOT_DELETED);
        sb.append(", id=").append(id);

            

Reported by PMD.

StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable.
Performance

Line: 241

                  @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", IS_DELETED=").append(IS_DELETED);
        sb.append(", NOT_DELETED=").append(NOT_DELETED);
        sb.append(", id=").append(id);

            

Reported by PMD.

litemall-db/src/main/java/org/linlinjava/litemall/db/domain/LitemallSystem.java
44 issues
Avoid instantiating Boolean objects; reference Boolean.TRUE or Boolean.FALSE or call Boolean.valueOf() instead.
Performance

Line: 308

                   * @mbg.generated
     */
    public enum Deleted {
        NOT_DELETED(new Boolean("0"), "未删除"),
        IS_DELETED(new Boolean("1"), "已删除");

        /**
         * This field was generated by MyBatis Generator.
         * This field corresponds to the database table litemall_system

            

Reported by PMD.

Avoid instantiating Boolean objects; reference Boolean.TRUE or Boolean.FALSE or call Boolean.valueOf() instead.
Performance

Line: 309

                   */
    public enum Deleted {
        NOT_DELETED(new Boolean("0"), "未删除"),
        IS_DELETED(new Boolean("1"), "已删除");

        /**
         * This field was generated by MyBatis Generator.
         * This field corresponds to the database table litemall_system
         *

            

Reported by PMD.

The class 'LitemallSystem' has a Modified Cyclomatic Complexity of 2 (Highest = 10).
Design

Line: 7

              import java.util.ArrayList;
import java.util.Arrays;

public class LitemallSystem {
    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database table litemall_system
     *
     * @mbg.generated

            

Reported by PMD.

The class 'LitemallSystem' is suspected to be a Data Class (WOC=25.000%, NOPA=2, NOAM=12, WMC=32)
Design

Line: 7

              import java.util.ArrayList;
import java.util.Arrays;

public class LitemallSystem {
    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database table litemall_system
     *
     * @mbg.generated

            

Reported by PMD.

The class 'LitemallSystem' has a Standard Cyclomatic Complexity of 2 (Highest = 10).
Design

Line: 7

              import java.util.ArrayList;
import java.util.Arrays;

public class LitemallSystem {
    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database table litemall_system
     *
     * @mbg.generated

            

Reported by PMD.

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

Line: 205

                   * @mbg.generated
     */
    public void andLogicalDeleted(boolean deleted) {
        setDeleted(deleted ? Deleted.IS_DELETED.value() : Deleted.NOT_DELETED.value());
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column litemall_system.deleted

            

Reported by PMD.

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

Line: 205

                   * @mbg.generated
     */
    public void andLogicalDeleted(boolean deleted) {
        setDeleted(deleted ? Deleted.IS_DELETED.value() : Deleted.NOT_DELETED.value());
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column litemall_system.deleted

            

Reported by PMD.

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

Line: 240

                   */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", IS_DELETED=").append(IS_DELETED);
        sb.append(", NOT_DELETED=").append(NOT_DELETED);

            

Reported by PMD.

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

Line: 241

                  @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", IS_DELETED=").append(IS_DELETED);
        sb.append(", NOT_DELETED=").append(NOT_DELETED);
        sb.append(", id=").append(id);

            

Reported by PMD.

StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable.
Performance

Line: 241

                  @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", IS_DELETED=").append(IS_DELETED);
        sb.append(", NOT_DELETED=").append(NOT_DELETED);
        sb.append(", id=").append(id);

            

Reported by PMD.

litemall-db/src/main/java/org/linlinjava/litemall/db/domain/LitemallIssue.java
44 issues
Avoid instantiating Boolean objects; reference Boolean.TRUE or Boolean.FALSE or call Boolean.valueOf() instead.
Performance

Line: 308

                   * @mbg.generated
     */
    public enum Deleted {
        NOT_DELETED(new Boolean("0"), "未删除"),
        IS_DELETED(new Boolean("1"), "已删除");

        /**
         * This field was generated by MyBatis Generator.
         * This field corresponds to the database table litemall_issue

            

Reported by PMD.

Avoid instantiating Boolean objects; reference Boolean.TRUE or Boolean.FALSE or call Boolean.valueOf() instead.
Performance

Line: 309

                   */
    public enum Deleted {
        NOT_DELETED(new Boolean("0"), "未删除"),
        IS_DELETED(new Boolean("1"), "已删除");

        /**
         * This field was generated by MyBatis Generator.
         * This field corresponds to the database table litemall_issue
         *

            

Reported by PMD.

The class 'LitemallIssue' has a Standard Cyclomatic Complexity of 2 (Highest = 10).
Design

Line: 7

              import java.util.ArrayList;
import java.util.Arrays;

public class LitemallIssue {
    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database table litemall_issue
     *
     * @mbg.generated

            

Reported by PMD.

The class 'LitemallIssue' is suspected to be a Data Class (WOC=25.000%, NOPA=2, NOAM=12, WMC=32)
Design

Line: 7

              import java.util.ArrayList;
import java.util.Arrays;

public class LitemallIssue {
    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database table litemall_issue
     *
     * @mbg.generated

            

Reported by PMD.

The class 'LitemallIssue' has a Modified Cyclomatic Complexity of 2 (Highest = 10).
Design

Line: 7

              import java.util.ArrayList;
import java.util.Arrays;

public class LitemallIssue {
    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database table litemall_issue
     *
     * @mbg.generated

            

Reported by PMD.

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

Line: 205

                   * @mbg.generated
     */
    public void andLogicalDeleted(boolean deleted) {
        setDeleted(deleted ? Deleted.IS_DELETED.value() : Deleted.NOT_DELETED.value());
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column litemall_issue.deleted

            

Reported by PMD.

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

Line: 205

                   * @mbg.generated
     */
    public void andLogicalDeleted(boolean deleted) {
        setDeleted(deleted ? Deleted.IS_DELETED.value() : Deleted.NOT_DELETED.value());
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column litemall_issue.deleted

            

Reported by PMD.

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

Line: 240

                   */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", IS_DELETED=").append(IS_DELETED);
        sb.append(", NOT_DELETED=").append(NOT_DELETED);

            

Reported by PMD.

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

Line: 241

                  @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", IS_DELETED=").append(IS_DELETED);
        sb.append(", NOT_DELETED=").append(NOT_DELETED);
        sb.append(", id=").append(id);

            

Reported by PMD.

StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable.
Performance

Line: 241

                  @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", IS_DELETED=").append(IS_DELETED);
        sb.append(", NOT_DELETED=").append(NOT_DELETED);
        sb.append(", id=").append(id);

            

Reported by PMD.

litemall-db/src/main/java/org/linlinjava/litemall/db/domain/LitemallPermission.java
44 issues
Avoid instantiating Boolean objects; reference Boolean.TRUE or Boolean.FALSE or call Boolean.valueOf() instead.
Performance

Line: 308

                   * @mbg.generated
     */
    public enum Deleted {
        NOT_DELETED(new Boolean("0"), "未删除"),
        IS_DELETED(new Boolean("1"), "已删除");

        /**
         * This field was generated by MyBatis Generator.
         * This field corresponds to the database table litemall_permission

            

Reported by PMD.

Avoid instantiating Boolean objects; reference Boolean.TRUE or Boolean.FALSE or call Boolean.valueOf() instead.
Performance

Line: 309

                   */
    public enum Deleted {
        NOT_DELETED(new Boolean("0"), "未删除"),
        IS_DELETED(new Boolean("1"), "已删除");

        /**
         * This field was generated by MyBatis Generator.
         * This field corresponds to the database table litemall_permission
         *

            

Reported by PMD.

The class 'LitemallPermission' has a Standard Cyclomatic Complexity of 2 (Highest = 10).
Design

Line: 7

              import java.util.ArrayList;
import java.util.Arrays;

public class LitemallPermission {
    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database table litemall_permission
     *
     * @mbg.generated

            

Reported by PMD.

The class 'LitemallPermission' is suspected to be a Data Class (WOC=25.000%, NOPA=2, NOAM=12, WMC=32)
Design

Line: 7

              import java.util.ArrayList;
import java.util.Arrays;

public class LitemallPermission {
    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database table litemall_permission
     *
     * @mbg.generated

            

Reported by PMD.

The class 'LitemallPermission' has a Modified Cyclomatic Complexity of 2 (Highest = 10).
Design

Line: 7

              import java.util.ArrayList;
import java.util.Arrays;

public class LitemallPermission {
    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database table litemall_permission
     *
     * @mbg.generated

            

Reported by PMD.

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

Line: 205

                   * @mbg.generated
     */
    public void andLogicalDeleted(boolean deleted) {
        setDeleted(deleted ? Deleted.IS_DELETED.value() : Deleted.NOT_DELETED.value());
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column litemall_permission.deleted

            

Reported by PMD.

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

Line: 205

                   * @mbg.generated
     */
    public void andLogicalDeleted(boolean deleted) {
        setDeleted(deleted ? Deleted.IS_DELETED.value() : Deleted.NOT_DELETED.value());
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column litemall_permission.deleted

            

Reported by PMD.

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

Line: 240

                   */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", IS_DELETED=").append(IS_DELETED);
        sb.append(", NOT_DELETED=").append(NOT_DELETED);

            

Reported by PMD.

StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable.
Performance

Line: 241

                  @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", IS_DELETED=").append(IS_DELETED);
        sb.append(", NOT_DELETED=").append(NOT_DELETED);
        sb.append(", id=").append(id);

            

Reported by PMD.

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

Line: 241

                  @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", IS_DELETED=").append(IS_DELETED);
        sb.append(", NOT_DELETED=").append(NOT_DELETED);
        sb.append(", id=").append(id);

            

Reported by PMD.

litemall-db/src/main/java/org/linlinjava/litemall/db/domain/LitemallAddressExample.java
43 issues
Avoid throwing raw exception types.
Design

Line: 247

              
        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {

            

Reported by PMD.

Avoid throwing raw exception types.
Design

Line: 254

              
        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {

            

Reported by PMD.

Avoid throwing raw exception types.
Design

Line: 261

              
        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andIdIsNull() {

            

Reported by PMD.

This class has a bunch of public methods and attributes
Design

Line: 1

              package org.linlinjava.litemall.db.domain;

import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;

public class LitemallAddressExample {
    /**
     * This field was generated by MyBatis Generator.

            

Reported by PMD.

Avoid really long classes.
Design

Line: 7

              import java.util.ArrayList;
import java.util.List;

public class LitemallAddressExample {
    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database table litemall_address
     *
     * @mbg.generated

            

Reported by PMD.

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

Line: 30

                   *
     * @mbg.generated
     */
    protected List<Criteria> oredCriteria;

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table litemall_address
     *

            

Reported by PMD.

Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty()
Design

Line: 151

                   */
    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }


            

Reported by PMD.

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

Line: 176

                   */
    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    /**
     * This method was generated by MyBatis Generator.

            

Reported by PMD.

This abstract class does not have any abstract methods
Design

Line: 225

                   *
     * @mbg.generated
     */
    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();

            

Reported by PMD.

Avoid really long classes.
Design

Line: 225

                   *
     * @mbg.generated
     */
    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();

            

Reported by PMD.

litemall-db/src/main/java/org/linlinjava/litemall/db/domain/LitemallGrouponExample.java
41 issues
Avoid throwing raw exception types.
Design

Line: 247

              
        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {

            

Reported by PMD.

Avoid throwing raw exception types.
Design

Line: 254

              
        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {

            

Reported by PMD.

Avoid throwing raw exception types.
Design

Line: 261

              
        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andIdIsNull() {

            

Reported by PMD.

This class has a bunch of public methods and attributes
Design

Line: 1

              package org.linlinjava.litemall.db.domain;

import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;

public class LitemallGrouponExample {
    /**
     * This field was generated by MyBatis Generator.

            

Reported by PMD.

Avoid really long classes.
Design

Line: 7

              import java.util.ArrayList;
import java.util.List;

public class LitemallGrouponExample {
    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database table litemall_groupon
     *
     * @mbg.generated

            

Reported by PMD.

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

Line: 30

                   *
     * @mbg.generated
     */
    protected List<Criteria> oredCriteria;

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table litemall_groupon
     *

            

Reported by PMD.

Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty()
Design

Line: 151

                   */
    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }


            

Reported by PMD.

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

Line: 176

                   */
    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    /**
     * This method was generated by MyBatis Generator.

            

Reported by PMD.

The class 'GeneratedCriteria' has a total cyclomatic complexity of 232 (highest 4).
Design

Line: 225

                   *
     * @mbg.generated
     */
    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();

            

Reported by PMD.

Avoid really long classes.
Design

Line: 225

                   *
     * @mbg.generated
     */
    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();

            

Reported by PMD.