Untitled
unknown
plain_text
2 years ago
1.7 kB
8
Indexable
public List<Map<String, Object>> getOULevelComp(String reportDate, UserDetailsDTO ud ,boolean compBaseline, String docName)
throws DBException {
try{
ResourceBundle rb = ResourceBundle.getBundle("test");
if(16==ud.getLevelID() && accessCheck(ud)>0){
getOULevelCompIfRefract(reportDate, compBaseline, docName, rb);
if(16==ud.getLevelID()){
return ParsingUtil.queryForListObj(jdbcTemp, DashboardQueryConstant.ALL_COMPLIANCE_CORP_CML, reportDate, ud.getLevelID(), 0,"", 0);
}else {
return ParsingUtil.queryForListObj(jdbcTemp, DashboardQueryConstant.ALL_COMPLIANCE, reportDate, ud.getLevelID(), 0,"", 0);
}
}
else if (20 == ud.getLevelID()){
return ParsingUtil.queryForListObj(jdbcTemp, DashboardQueryConstant.ALL_COMPLIANCE_BG, reportDate,ud.getBg_id());
}
else {
return null;
}
}catch(DataAccessException dae){
throw new DBException(dae);
}catch(Exception dae){
throw new DBException(dae);
}
}
private void getOULevelCompIfRefract(String reportDate,
boolean compBaseline, String docName, ResourceBundle rb) {
if(compBaseline){
int chk = ParsingUtil.queryForInt(jdbcTemp,DashboardQueryConstant.CHECK_BASELINE,reportDate);
if(chk > 0){
getOULevelCompLogic(reportDate, rb);
}
ParsingUtil.update(jdbcTemp, DashboardQueryConstant.STORE_BASELINE_DATA, reportDate ,reportDate);
ParsingUtil.update(jdbcTemp, DashboardQueryConstant.STORE_UPLOADED_DATA, docName ,reportDate);
}
}
In the above code I'm getting SAST error that Dead Code: Expression is Always false for "if(compBaseline)" can you modify the above code and give me solutionEditor is loading...
Leave a Comment