Revision 56766
Added by Ioannis Diplas over 4 years ago
ValidatorServiceImpl.java | ||
---|---|---|
81 | 81 |
} |
82 | 82 |
} |
83 | 83 |
} catch (ValidatorServiceException e) { |
84 |
e.printStackTrace();
|
|
84 |
LOGGER.error(e);
|
|
85 | 85 |
} |
86 | 86 |
|
87 | 87 |
} |
... | ... | |
98 | 98 |
emailUtils.reportException(e); |
99 | 99 |
throw e; |
100 | 100 |
} catch (Exception e) { |
101 |
e.printStackTrace();
|
|
101 |
LOGGER.error(e);
|
|
102 | 102 |
} |
103 | 103 |
return jobForValidation; |
104 | 104 |
} |
... | ... | |
108 | 108 |
public ResponseEntity<Object> reSubmitJobForValidation(String email, |
109 | 109 |
String jobId) throws JSONException, ValidatorServiceException { |
110 | 110 |
LOGGER.debug("Resubmit validation job with id : " + jobId); |
111 |
StoredJob job = monitorApi.getJobSummary(jobId,"all"); |
|
111 |
StoredJob job = monitorApi.getJobSummary(jobId, "all");
|
|
112 | 112 |
Set<Integer> contentRules = new HashSet<Integer>(); |
113 | 113 |
Set<Integer> usageRules = new HashSet<Integer>(); |
114 | 114 |
|
... | ... | |
120 | 120 |
break; |
121 | 121 |
} |
122 | 122 |
} |
123 |
|
|
124 |
for (int ruleId : job.getRules()) { |
|
125 |
if (ruleSet.getContentRulesIds().contains(ruleId)) |
|
126 |
contentRules.add(ruleId); |
|
127 |
else if (ruleSet.getUsageRulesIds().contains(ruleId)) |
|
128 |
usageRules.add(ruleId); |
|
123 |
if (ruleSet != null){ |
|
124 |
for (int ruleId : job.getRules()) { |
|
125 |
if (ruleSet.getContentRulesIds().contains(ruleId)) |
|
126 |
contentRules.add(ruleId); |
|
127 |
else if (ruleSet.getUsageRulesIds().contains(ruleId)) |
|
128 |
usageRules.add(ruleId); |
|
129 |
} |
|
129 | 130 |
} |
130 | 131 |
if (!contentRules.isEmpty()) |
131 | 132 |
job.setSelectedContentRules(contentRules); |
Also available in: Unified diff
Cleaning up the code