Untitled
unknown
plain_text
2 years ago
1.3 kB
7
Indexable
public static String callAIPMethods(String localFilePath, String remoteFilePath, String fileName, String reportName,
String aipRole, int empId) {
LOG.info("inside callAIPMethods");
boolean sftpSuccessFlag = false;
String descResponse = "";
ResourceBundle rb = ResourceBundle.getBundle("resources.test");
String empID = Integer.toString(empId);
String aipWSURL = rb.getString("aipWSURL");
String aipHostName = rb.getString("aipHostName");
int aipPort = Integer.parseInt(rb.getString("aipPort"));
// SFTP method
sftpSuccessFlag = ParsingUtil.transferReportsToAIP(localFilePath, remoteFilePath, aipHostName, aipPort);
LOG.info("In callAIPMethods - SFTP Success : " + sftpSuccessFlag);
// SFTP completed or not condition
if (sftpSuccessFlag) {
// Webservice call
LOG.info("Inside WS call method " + sftpSuccessFlag);
descResponse = ParsingUtil.callAIPWS(rb, aipRole, empID, fileName, reportName,
LiteralConstants.AIP_EXPIRY_DAYS, aipWSURL);
LOG.info("In callAIPMethods - WS Response : " + descResponse);
}
return descResponse;
}
In the above code I'm getting SAST error that Dead Code: Expression is Always false for "if (sftpSuccessFlag)" can you modify the above code and give me solution
Editor is loading...
Leave a Comment