From 63c38df91f19ca4dd3649754dfa3b7c716acec5c Mon Sep 17 00:00:00 2001 From: Florian Dupuy Date: Thu, 23 Nov 2023 13:58:01 +0100 Subject: [PATCH] Replace switch with ThreeSides::valueOf Signed-off-by: Florian Dupuy --- .../java/com/powsybl/dynaflow/xml/ConstraintsReader.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/dynaflow/src/main/java/com/powsybl/dynaflow/xml/ConstraintsReader.java b/dynaflow/src/main/java/com/powsybl/dynaflow/xml/ConstraintsReader.java index 8ba676199..9f55633f9 100644 --- a/dynaflow/src/main/java/com/powsybl/dynaflow/xml/ConstraintsReader.java +++ b/dynaflow/src/main/java/com/powsybl/dynaflow/xml/ConstraintsReader.java @@ -167,12 +167,7 @@ private static ThreeSides toThreeSides(Integer side) { if (side == null) { return null; } - return switch (side) { - case 1 -> ThreeSides.ONE; - case 2 -> ThreeSides.TWO; - case 3 -> ThreeSides.THREE; - default -> null; - }; + return ThreeSides.valueOf(side); } private static LimitViolationType toLimitViolationType(String kind) {