From 384ab5b09862f6f596410cf7fdfffbcd1f98f5b4 Mon Sep 17 00:00:00 2001 From: Thang PHAM Date: Tue, 28 Nov 2023 16:41:30 +0100 Subject: [PATCH] Style check --- .../proxies/expertfiler/ExpertFilterRepositoryProxy.java | 3 +-- .../org/gridsuite/filter/server/ExpertFilterUtilsTest.java | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/gridsuite/filter/server/repositories/proxies/expertfiler/ExpertFilterRepositoryProxy.java b/src/main/java/org/gridsuite/filter/server/repositories/proxies/expertfiler/ExpertFilterRepositoryProxy.java index a1d76296..73408fba 100644 --- a/src/main/java/org/gridsuite/filter/server/repositories/proxies/expertfiler/ExpertFilterRepositoryProxy.java +++ b/src/main/java/org/gridsuite/filter/server/repositories/proxies/expertfiler/ExpertFilterRepositoryProxy.java @@ -75,8 +75,7 @@ public static AbstractExpertRule entityToDto(ExpertRuleEntity filterEntity) { if (filterEntity.getValue() != null) { if (isMultipleCriteriaOperator(filterEntity.getOperator())) { // for multiple values ruleBuilder.values(Stream.of(filterEntity.getValue().split(",")).map(Double::valueOf).collect(Collectors.toSet())); - } - else { // for single value + } else { // for single value ruleBuilder.value(Double.valueOf(filterEntity.getValue())); } } diff --git a/src/test/java/org/gridsuite/filter/server/ExpertFilterUtilsTest.java b/src/test/java/org/gridsuite/filter/server/ExpertFilterUtilsTest.java index 52e9293a..721027b3 100644 --- a/src/test/java/org/gridsuite/filter/server/ExpertFilterUtilsTest.java +++ b/src/test/java/org/gridsuite/filter/server/ExpertFilterUtilsTest.java @@ -230,8 +230,8 @@ public void testEvaluateExpertFilterInAndNotInOperators() { VoltageLevel voltageLevel1 = Mockito.mock(VoltageLevel.class); Mockito.when(voltageLevel1.getId()).thenReturn("VL1"); Mockito.when(voltageLevel1.getNominalV()).thenReturn(13.0); - Mockito.when(voltageLevel1.getSubstation()).thenReturn(Optional.of(substation1)); + Mockito.when(voltageLevel1.getSubstation()).thenReturn(Optional.of(substation1)); Terminal terminal1 = Mockito.mock(Terminal.class); Mockito.when(terminal1.getVoltageLevel()).thenReturn(voltageLevel1);