diff --git a/src/main/java/de/dhbwstuttgart/target/generate/ASTToTargetAST.java b/src/main/java/de/dhbwstuttgart/target/generate/ASTToTargetAST.java index 67e2330a..09897269 100644 --- a/src/main/java/de/dhbwstuttgart/target/generate/ASTToTargetAST.java +++ b/src/main/java/de/dhbwstuttgart/target/generate/ASTToTargetAST.java @@ -74,7 +74,7 @@ public class ASTToTargetAST { for (var s : all) { sigma = s; List params = convert(input.getParameterList()); - if (!parameterSet.stream().filter(p -> p.equals(params)).findFirst().isPresent()) { + if (parameterSet.stream().noneMatch(p -> p.equals(params))) { result.add(new TargetConstructor(input.modifier, new TargetRefType(owner.getClassName().getClassName()), params, convert(input.block))); parameterSet.add(params); } @@ -91,7 +91,7 @@ public class ASTToTargetAST { for (var s : all) { sigma = s; List params = convert(input.getParameterList()); - if (!parameterSet.stream().filter(p -> p.equals(params)).findFirst().isPresent()) { + if (parameterSet.stream().noneMatch(p -> p.equals(params))) { result.add(new TargetMethod( input.modifier, new TargetRefType(owner.getClassName().getClassName()),