Commit 6e23d39e authored by Joachim Müssig's avatar Joachim Müssig

Set field for all violations if generate violationsWrapper from dispro file

parent e7410325
......@@ -216,6 +216,18 @@ public class ViolationsWrapper {
JSONArray violArr = jSONObject.getJSONArray(VIOLATIONS);
created.uncheckedViolations = ViolationsSaverLoader.generateFromJSON(violArr, sdg);
//TODO: set allViolationsToCheck for .dispro load
//TODO: maybe add a json field for allViolations
List<IViolation<SecurityNode>> c = new ArrayList<>();
for (IViolation<SecurityNode> v : created.uncheckedViolations) {
c.add(v);
}
Collection<? extends IViolation<SecurityNode>> allViolationsToHandle = c;
created.allViolationsToCheck = allViolationsToHandle;
// for (IViolation<SecurityNode> v : created.uncheckedViolations) {
// created.allViolationsToCheck.add(v);
// ad
// }
JSONArray chopArr = jSONObject.getJSONArray(CHOPS);
for (int i = 0; i < chopArr.length(); ++i) {
......@@ -660,7 +672,7 @@ public class ViolationsWrapper {
public Collection<? extends IViolation<SecurityNode>> getAllViolationsToCheck() {
allViolationsToCheck.forEach((v)-> {
System.out.println(v);
// System.out.println(v);
});
return allViolationsToCheck;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment