From 4b8b0ec3626f087bb35c397d2d07c872ef2cda49 Mon Sep 17 00:00:00 2001 From: Michael Uhl Date: Sun, 5 May 2019 22:33:16 +0200 Subject: [PATCH] ConcurrentModificationException umgangen. --- src/main/java/de/dhbwstuttgart/bytecode/BytecodeGen.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/de/dhbwstuttgart/bytecode/BytecodeGen.java b/src/main/java/de/dhbwstuttgart/bytecode/BytecodeGen.java index 3b0cb4b7..f89f7bbc 100644 --- a/src/main/java/de/dhbwstuttgart/bytecode/BytecodeGen.java +++ b/src/main/java/de/dhbwstuttgart/bytecode/BytecodeGen.java @@ -181,9 +181,11 @@ public class BytecodeGen implements ASTVisitor { // resultSet = listOfResultSets.get(0); boolean isConsWithNoParamsVisited = false; boolean isVisited = false; - for (ResultSet rs : listOfResultSets) { + List listOfResultSetsList = new ArrayList<>(listOfResultSets); + for (int i = 0; i < listOfResultSetsList.size(); i++) { + //for (ResultSet rs : listOfResultSets) { superClass = classOrInterface.getSuperClass().acceptTV(new TypeToDescriptor()); - resultSet = rs; + resultSet = listOfResultSetsList.get(i); tphExtractor.setResultSet(resultSet); // Nur einmal ausführen!!