From 3b439a49cd05140fc44705a6c21ea56165a26c8b Mon Sep 17 00:00:00 2001 From: Victorious3 Date: Fri, 17 Jun 2022 15:16:56 +0200 Subject: [PATCH] IDEA wants it that way --- .../java/de/dhbwstuttgart/target/generate/ASTToTargetAST.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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()),