The following issues were found

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

Line: 596

                   * @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_address

            

Reported by PMD.

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

Line: 597

                   */
    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_address
         *

            

Reported by PMD.

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

Line: 7

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

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

            

Reported by PMD.

Too many fields
Design

Line: 7

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

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

            

Reported by PMD.

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

Line: 7

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

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

            

Reported by PMD.

Possible God Class (WMC=64, ATFD=71, TCC=9.073%)
Design

Line: 7

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

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

            

Reported by PMD.

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

Line: 469

                   * @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_address.deleted

            

Reported by PMD.

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

Line: 469

                   * @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_address.deleted

            

Reported by PMD.

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

Line: 504

                   */
    @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: 505

                  @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-core/src/main/java/org/linlinjava/litemall/core/util/bcrypt/BCrypt.java
78 issues
The class 'BCrypt' has a Modified Cyclomatic Complexity of 4 (Highest = 12).
Design

Line: 59

               *
 * @author Damien Miller
 */
public class BCrypt {
    // BCrypt parameters

    static final int MIN_LOG_ROUNDS = 4;
    static final int MAX_LOG_ROUNDS = 31;
    private static final int GENSALT_DEFAULT_LOG2_ROUNDS = 10;

            

Reported by PMD.

Possible God Class (WMC=75, ATFD=14, TCC=6.667%)
Design

Line: 59

               *
 * @author Damien Miller
 */
public class BCrypt {
    // BCrypt parameters

    static final int MIN_LOG_ROUNDS = 4;
    static final int MAX_LOG_ROUNDS = 31;
    private static final int GENSALT_DEFAULT_LOG2_ROUNDS = 10;

            

Reported by PMD.

The class 'BCrypt' has a Standard Cyclomatic Complexity of 4 (Highest = 12).
Design

Line: 59

               *
 * @author Damien Miller
 */
public class BCrypt {
    // BCrypt parameters

    static final int MIN_LOG_ROUNDS = 4;
    static final int MAX_LOG_ROUNDS = 31;
    private static final int GENSALT_DEFAULT_LOG2_ROUNDS = 10;

            

Reported by PMD.

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

Line: 59

               *
 * @author Damien Miller
 */
public class BCrypt {
    // BCrypt parameters

    static final int MIN_LOG_ROUNDS = 4;
    static final int MAX_LOG_ROUNDS = 31;
    private static final int GENSALT_DEFAULT_LOG2_ROUNDS = 10;

            

Reported by PMD.

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

Line: 262

                          -1, -1, -1, -1, -1, -1, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
            41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, -1, -1, -1, -1, -1};
    // Expanded Blowfish key
    private int P[];
    private int S[];

    /**
     * Encode a byte array using bcrypt's slightly-modified base64 encoding scheme. Note
     * that this is <strong>not</strong> compatible with the standard MIME-base64

            

Reported by PMD.

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

Line: 263

                          41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, -1, -1, -1, -1, -1};
    // Expanded Blowfish key
    private int P[];
    private int S[];

    /**
     * Encode a byte array using bcrypt's slightly-modified base64 encoding scheme. Note
     * that this is <strong>not</strong> compatible with the standard MIME-base64
     * encoding.

            

Reported by PMD.

A method or constructor should not explicitly declare unchecked exceptions in its 'throws' clause
Design

Line: 276

                   * @throws IllegalArgumentException if the length is invalid
     */
    static void encode_base64(byte d[], int len, StringBuilder rs)
            throws IllegalArgumentException {
        int off = 0;
        int c1, c2;

        if (len <= 0 || len > d.length) {
            throw new IllegalArgumentException("Invalid len");

            

Reported by PMD.

A method or constructor should not explicitly declare unchecked exceptions in its 'throws' clause
Design

Line: 330

                   * @return an array containing the decoded bytes
     * @throws IllegalArgumentException if maxolen is invalid
     */
    static byte[] decode_base64(String s, int maxolen) throws IllegalArgumentException {
        ByteArrayOutputStream out = new ByteArrayOutputStream(maxolen);
        int off = 0, slen = s.length(), olen = 0;
        byte c1, c2, c3, c4, o;

        if (maxolen <= 0) {

            

Reported by PMD.

The method 'decode_base64(String, int)' has a cyclomatic complexity of 12.
Design

Line: 330

                   * @return an array containing the decoded bytes
     * @throws IllegalArgumentException if maxolen is invalid
     */
    static byte[] decode_base64(String s, int maxolen) throws IllegalArgumentException {
        ByteArrayOutputStream out = new ByteArrayOutputStream(maxolen);
        int off = 0, slen = s.length(), olen = 0;
        byte c1, c2, c3, c4, o;

        if (maxolen <= 0) {

            

Reported by PMD.

Avoid assignments in operands
Error

Line: 348

                          o = (byte) (c1 << 2);
            o |= (c2 & 0x30) >> 4;
            out.write(o);
            if (++olen >= maxolen || off >= slen) {
                break;
            }
            c3 = char64(s.charAt(off++));
            if (c3 == -1) {
                break;

            

Reported by PMD.

litemall-admin-api/src/main/java/org/linlinjava/litemall/admin/service/AdminOrderService.java
76 issues
Avoid throwing raw exception types.
Design

Line: 152

                      order.setRefundContent(wxPayRefundResult.getRefundId());
        order.setRefundTime(now);
        if (orderService.updateWithOptimisticLocker(order) == 0) {
            throw new RuntimeException("更新数据已失效");
        }

        // 商品货品数量增加
        List<LitemallOrderGoods> orderGoodsList = orderGoodsService.queryByOid(orderId);
        for (LitemallOrderGoods orderGoods : orderGoodsList) {

            

Reported by PMD.

Avoid throwing raw exception types.
Design

Line: 161

                          Integer productId = orderGoods.getProductId();
            Short number = orderGoods.getNumber();
            if (productService.addStock(productId, number) == 0) {
                throw new RuntimeException("商品货品库存增加失败");
            }
        }

        // 返还优惠券
        List<LitemallCouponUser> couponUsers = couponUserService.findByOid(orderId);

            

Reported by PMD.

Logger calls should be surrounded by log level guards.
Design

Line: 134

                          return ResponseUtil.fail(ORDER_REFUND_FAILED, "订单退款失败");
        }
        if (!wxPayRefundResult.getReturnCode().equals("SUCCESS")) {
            logger.warn("refund fail: " + wxPayRefundResult.getReturnMsg());
            return ResponseUtil.fail(ORDER_REFUND_FAILED, "订单退款失败");
        }
        if (!wxPayRefundResult.getResultCode().equals("SUCCESS")) {
            logger.warn("refund fail: " + wxPayRefundResult.getReturnMsg());
            return ResponseUtil.fail(ORDER_REFUND_FAILED, "订单退款失败");

            

Reported by PMD.

Logger calls should be surrounded by log level guards.
Design

Line: 138

                          return ResponseUtil.fail(ORDER_REFUND_FAILED, "订单退款失败");
        }
        if (!wxPayRefundResult.getResultCode().equals("SUCCESS")) {
            logger.warn("refund fail: " + wxPayRefundResult.getReturnMsg());
            return ResponseUtil.fail(ORDER_REFUND_FAILED, "订单退款失败");
        }

        LocalDateTime now = LocalDateTime.now();
        // 设置订单取消状态

            

Reported by PMD.

The class 'AdminOrderService' has a Standard Cyclomatic Complexity of 5 (Highest = 13).
Design

Line: 36

              
@Service

public class AdminOrderService {
    private final Log logger = LogFactory.getLog(AdminOrderService.class);

    @Autowired
    private LitemallOrderGoodsService orderGoodsService;
    @Autowired

            

Reported by PMD.

The class 'AdminOrderService' has a Modified Cyclomatic Complexity of 5 (Highest = 13).
Design

Line: 36

              
@Service

public class AdminOrderService {
    private final Log logger = LogFactory.getLog(AdminOrderService.class);

    @Autowired
    private LitemallOrderGoodsService orderGoodsService;
    @Autowired

            

Reported by PMD.

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

Line: 37

              @Service

public class AdminOrderService {
    private final Log logger = LogFactory.getLog(AdminOrderService.class);

    @Autowired
    private LitemallOrderGoodsService orderGoodsService;
    @Autowired
    private LitemallOrderService orderService;

            

Reported by PMD.

Logger should be defined private static final and have the correct class
Error

Line: 37

              @Service

public class AdminOrderService {
    private final Log logger = LogFactory.getLog(AdminOrderService.class);

    @Autowired
    private LitemallOrderGoodsService orderGoodsService;
    @Autowired
    private LitemallOrderService orderService;

            

Reported by PMD.

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

Line: 40

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

    @Autowired
    private LitemallOrderGoodsService orderGoodsService;
    @Autowired
    private LitemallOrderService orderService;
    @Autowired
    private LitemallGoodsProductService productService;
    @Autowired

            

Reported by PMD.

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

Line: 42

                  @Autowired
    private LitemallOrderGoodsService orderGoodsService;
    @Autowired
    private LitemallOrderService orderService;
    @Autowired
    private LitemallGoodsProductService productService;
    @Autowired
    private LitemallUserService userService;
    @Autowired

            

Reported by PMD.

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

Line: 525

                   * @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_topic

            

Reported by PMD.

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

Line: 526

                   */
    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_topic
         *

            

Reported by PMD.

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

Line: 8

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

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

            

Reported by PMD.

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

Line: 8

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

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

            

Reported by PMD.

Possible God Class (WMC=54, ATFD=57, TCC=10.317%)
Design

Line: 8

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

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

            

Reported by PMD.

Too many fields
Design

Line: 8

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

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

            

Reported by PMD.

Returning 'goods' may expose an internal array.
Design

Line: 310

                   * @mbg.generated
     */
    public Integer[] getGoods() {
        return goods;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column litemall_topic.goods

            

Reported by PMD.

The user-supplied array 'goods' is stored directly.
Design

Line: 321

                   *
     * @mbg.generated
     */
    public void setGoods(Integer[] goods) {
        this.goods = goods;
    }

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

            

Reported by PMD.

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

Line: 380

                   * @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_topic.deleted

            

Reported by PMD.

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

Line: 380

                   * @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_topic.deleted

            

Reported by PMD.

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

Line: 524

                   * @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_ad

            

Reported by PMD.

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

Line: 525

                   */
    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_ad
         *

            

Reported by PMD.

Possible God Class (WMC=56, ATFD=61, TCC=10.317%)
Design

Line: 7

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

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

            

Reported by PMD.

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

Line: 7

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

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

            

Reported by PMD.

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

Line: 7

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

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

            

Reported by PMD.

Too many fields
Design

Line: 7

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

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

            

Reported by PMD.

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

Line: 403

                   * @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_ad.deleted

            

Reported by PMD.

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

Line: 403

                   * @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_ad.deleted

            

Reported by PMD.

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

Line: 438

                   */
    @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: 439

                  @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/LitemallFeedback.java
75 issues
Avoid instantiating Boolean objects; reference Boolean.TRUE or Boolean.FALSE or call Boolean.valueOf() instead.
Performance

Line: 524

                   * @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_feedback

            

Reported by PMD.

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

Line: 525

                   */
    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_feedback
         *

            

Reported by PMD.

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

Line: 7

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

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

            

Reported by PMD.

Possible God Class (WMC=54, ATFD=57, TCC=10.317%)
Design

Line: 7

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

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

            

Reported by PMD.

Too many fields
Design

Line: 7

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

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

            

Reported by PMD.

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

Line: 7

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

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

            

Reported by PMD.

Returning 'picUrls' may expose an internal array.
Design

Line: 333

                   * @mbg.generated
     */
    public String[] getPicUrls() {
        return picUrls;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column litemall_feedback.pic_urls

            

Reported by PMD.

The user-supplied array 'picUrls' is stored directly.
Design

Line: 344

                   *
     * @mbg.generated
     */
    public void setPicUrls(String[] picUrls) {
        this.picUrls = picUrls;
    }

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

            

Reported by PMD.

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

Line: 403

                   * @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_feedback.deleted

            

Reported by PMD.

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

Line: 403

                   * @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_feedback.deleted

            

Reported by PMD.

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

Line: 524

                   * @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_category

            

Reported by PMD.

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

Line: 525

                   */
    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_category
         *

            

Reported by PMD.

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

Line: 7

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

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

            

Reported by PMD.

Too many fields
Design

Line: 7

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

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

            

Reported by PMD.

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

Line: 7

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

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

            

Reported by PMD.

Possible God Class (WMC=56, ATFD=61, TCC=10.317%)
Design

Line: 7

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

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

            

Reported by PMD.

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

Line: 403

                   * @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_category.deleted

            

Reported by PMD.

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

Line: 403

                   * @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_category.deleted

            

Reported by PMD.

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

Line: 438

                   */
    @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: 439

                  @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/LitemallComment.java
74 issues
Avoid instantiating Boolean objects; reference Boolean.TRUE or Boolean.FALSE or call Boolean.valueOf() instead.
Performance

Line: 524

                   * @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_comment

            

Reported by PMD.

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

Line: 525

                   */
    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_comment
         *

            

Reported by PMD.

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

Line: 7

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

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

            

Reported by PMD.

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

Line: 7

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

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

            

Reported by PMD.

Too many fields
Design

Line: 7

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

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

            

Reported by PMD.

Possible God Class (WMC=54, ATFD=57, TCC=10.317%)
Design

Line: 7

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

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

            

Reported by PMD.

Returning 'picUrls' may expose an internal array.
Design

Line: 309

                   * @mbg.generated
     */
    public String[] getPicUrls() {
        return picUrls;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column litemall_comment.pic_urls

            

Reported by PMD.

The user-supplied array 'picUrls' is stored directly.
Design

Line: 320

                   *
     * @mbg.generated
     */
    public void setPicUrls(String[] picUrls) {
        this.picUrls = picUrls;
    }

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

            

Reported by PMD.

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

Line: 403

                   * @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_comment.deleted

            

Reported by PMD.

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

Line: 403

                   * @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_comment.deleted

            

Reported by PMD.

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

Line: 524

                   * @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_groupon

            

Reported by PMD.

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

Line: 525

                   */
    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_groupon
         *

            

Reported by PMD.

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

Line: 7

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

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

            

Reported by PMD.

Too many fields
Design

Line: 7

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

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

            

Reported by PMD.

Possible God Class (WMC=56, ATFD=61, TCC=10.317%)
Design

Line: 7

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

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

            

Reported by PMD.

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

Line: 7

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

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

            

Reported by PMD.

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

Line: 403

                   * @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_groupon.deleted

            

Reported by PMD.

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

Line: 403

                   * @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_groupon.deleted

            

Reported by PMD.

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

Line: 438

                   */
    @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: 439

                  @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/LitemallCouponUser.java
71 issues
Avoid instantiating Boolean objects; reference Boolean.TRUE or Boolean.FALSE or call Boolean.valueOf() instead.
Performance

Line: 488

                   * @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_coupon_user

            

Reported by PMD.

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

Line: 489

                   */
    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_coupon_user
         *

            

Reported by PMD.

Too many fields
Design

Line: 7

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

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

            

Reported by PMD.

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

Line: 7

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

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

            

Reported by PMD.

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

Line: 7

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

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

            

Reported by PMD.

Possible God Class (WMC=52, ATFD=56, TCC=11.077%)
Design

Line: 7

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

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

            

Reported by PMD.

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

Line: 370

                   * @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_coupon_user.deleted

            

Reported by PMD.

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

Line: 370

                   * @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_coupon_user.deleted

            

Reported by PMD.

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

Line: 405

                   */
    @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: 406

                  @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.