From 212f0674f62df966e0d3a171942dd414078dc811 Mon Sep 17 00:00:00 2001 From: parvy Date: Fri, 24 Nov 2023 12:37:15 +0100 Subject: [PATCH] Small refactor. Signed-off-by: parvy --- .../powsybl/openreac/parameters/input/OpenReacParameters.java | 2 +- .../parameters/input/json/OpenReacParametersSerializer.java | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/open-reac/src/main/java/com/powsybl/openreac/parameters/input/OpenReacParameters.java b/open-reac/src/main/java/com/powsybl/openreac/parameters/input/OpenReacParameters.java index cc15c01d..c367d713 100644 --- a/open-reac/src/main/java/com/powsybl/openreac/parameters/input/OpenReacParameters.java +++ b/open-reac/src/main/java/com/powsybl/openreac/parameters/input/OpenReacParameters.java @@ -34,7 +34,7 @@ public class OpenReacParameters { private final List variableTwoWindingsTransformers = new ArrayList<>(); - private List busesWithReactiveSlack = new ArrayList<>(); + private final List busesWithReactiveSlack = new ArrayList<>(); // Algo parameters diff --git a/open-reac/src/main/java/com/powsybl/openreac/parameters/input/json/OpenReacParametersSerializer.java b/open-reac/src/main/java/com/powsybl/openreac/parameters/input/json/OpenReacParametersSerializer.java index eb7e27c3..9461a463 100644 --- a/open-reac/src/main/java/com/powsybl/openreac/parameters/input/json/OpenReacParametersSerializer.java +++ b/open-reac/src/main/java/com/powsybl/openreac/parameters/input/json/OpenReacParametersSerializer.java @@ -35,7 +35,6 @@ public void serialize(OpenReacParameters openReacParameters, JsonGenerator jsonG serializerProvider.defaultSerializeField("constantQGenerators", openReacParameters.getConstantQGenerators(), jsonGenerator); serializerProvider.defaultSerializeField("variableTwoWindingsTransformers", openReacParameters.getVariableTwoWindingsTransformers(), jsonGenerator); serializerProvider.defaultSerializeField("variableShuntCompensators", openReacParameters.getVariableShuntCompensators(), jsonGenerator); - // Export configured buses only if if (openReacParameters.getBusesWithReactiveSlackConfig() == OpenReacBusesWithReactiveSlackConfig.SPECIFIED) { serializerProvider.defaultSerializeField("busesWithReactiveSlack", openReacParameters.getConfiguredBusesWithReactiveSlacks(), jsonGenerator); }