我The Cyclomatic Complexity of this method "mapRow" is 13 which is greater than 10 authorized
从下面的代码中得到圈复杂度():
public RedemptionReport mapRow(ResultSet rs, int row) throws SQLException {
RedemptionReport redemptionReport = new RedemptionReport();
redemptionReport.setRedeemDate(rs.getString(1));
redemptionReport.setCashierID(rs.getString(2) != null? rs.getString(2) : "");
redemptionReport.setTillNo(rs.getString(3) != null? rs.getString(3) : "");
redemptionReport.setReferenceNumber(rs.getString(4) != null? rs.getString(4) : "");
redemptionReport.setTransactionNumber(rs.getString(5) != null? rs.getString(5) : "");
redemptionReport.setRedemptionAmount(rs.getString(6) != null? rs.getString(6) : "0");
redemptionReport.setNetBillValues(rs.getString(7) != null? rs.getString(7) : "0");
redemptionReport.setStoreCode(rs.getString(8) != null? rs.getString(8) : "");
redemptionReport.setCardNumber(rs.getString(9) != null? rs.getString(9) : "");
redemptionReport.setCardType(rs.getString(10) != null? rs.getString(10) : "");
redemptionReport.setStoreDesc(rs.getString(11) != null? rs.getString(11) : "");
redemptionReport.setZoneDesc(rs.getString(12) != null? rs.getString(12) : "");
redemptionReport.setMobileNo(rs.getString(13) != null? rs.getString(13) : "");
redemptionReport.setSchemeName(rs.getString(14));
return redemptionReport;
}
如何从上述代码中消除这种复杂性?