【发布时间】:2020-02-29 19:54:32
【问题描述】:
谁能帮我理解为什么我的模型类的圈复杂度为 89。 当我运行 PMD 时,它给了我“类 'GetResponse' 的总圈复杂度为 89(最高 1)”。
请查找代码 sn-p 为:
public class GetResponse {
private String ewbNo;
private String ewayBillDate;
private String genMode;
private String userGstin;
private String supplyType;
private String subSupplyType;
private String docType;
private String docNo;
private String docDate;
private String fromGstin;
private String fromTrdName;
private String fromAddr1;
private String fromAddr2;
private String fromPlace;
private String fromPincode;
private String fromStateCode;
private String toGstin;
private String toTrdName;
private String toAddr1;
private String toAddr2;
private String toPlace;
private String toPincode;
private String toStateCode;
private Float totalValue;
private Float totInvValue;
private Float cgstValue;
private Float sgstValue;
private Float igstValue;
private Float cessValue;
private String transporterId;
private String transporterName;
private String transDocNo;
private String transMode;
private String transDocDate;
private String status;
private Integer actualDist;
private Integer noValidDays;
private String validUpto;
private Integer extendedTimes;
private String rejectStatus;
private String vehicleType;
private String actFromStateCode;
private String actToStateCode;
private Object itemList;
private Object VehiclListDetails;
//getters and setters
}
【问题讨论】:
-
@YCF_L。谢谢你的回复。你能详细解释一下吗?其实我是新来的代码分析。
标签: java static-analysis code-metrics cyclomatic-complexity