log.warn("Null input, exiting.");
return null;
}
Map<String, Object> map = new HashMap<>();
Vulnerability vuln = allVulns.get(0);
Application application = vuln.getApplication();
if (application != null) {
applicationService.decryptCredentials(application);
}
AbstractDefectTracker dt = DefectTrackerFactory.getTracker(application);
if (dt == null) {
log.warn("Unable to load Defect Tracker.");
return null;
}
String editedSummary = summary, editedPreamble = preamble;
// TODO handle error cases better.
if (editedSummary == null || editedSummary.equals("")) {
if (vuln.getGenericVulnerability() != null && vuln.getSurfaceLocation() != null) {
editedSummary = createMessage(vuln);
} else {
editedSummary = "No editedSummary could be parsed.";
}
}
if (editedPreamble == null || editedPreamble.equals("")) {
if (vuln.getGenericVulnerability() != null && vuln.getSurfaceLocation() != null) {
if(additionalScannerInfo){
String additionalScannerInfoStr = getAdditionalScannerInfo(allVulns);
if(additionalScannerInfoStr == null || additionalScannerInfoStr.equals("")){