From 928ecedbb9a7ab373ba2a2a3780ce469083daddb Mon Sep 17 00:00:00 2001 From: Florian Dupuy Date: Thu, 18 Nov 2021 10:07:03 +0100 Subject: [PATCH] Fix BranchStatus code smells Signed-off-by: Florian Dupuy --- .../java/com/powsybl/sld/iidm/extensions/BranchStatus.java | 6 +++--- .../com/powsybl/sld/iidm/extensions/BranchStatusImpl.java | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/single-line-diagram-iidm-extensions/src/main/java/com/powsybl/sld/iidm/extensions/BranchStatus.java b/single-line-diagram-iidm-extensions/src/main/java/com/powsybl/sld/iidm/extensions/BranchStatus.java index 945c6e09c..c7947fa47 100644 --- a/single-line-diagram-iidm-extensions/src/main/java/com/powsybl/sld/iidm/extensions/BranchStatus.java +++ b/single-line-diagram-iidm-extensions/src/main/java/com/powsybl/sld/iidm/extensions/BranchStatus.java @@ -14,9 +14,9 @@ */ public interface BranchStatus> extends Extension { - static final String NAME = "branchStatus"; + String NAME = "branchStatus"; - public enum Status { + enum Status { IN_OPERATION, PLANNED_OUTAGE, FORCED_OUTAGE @@ -29,5 +29,5 @@ default String getName() { Status getStatus(); - BranchStatus setStatus(Status status); + BranchStatus setStatus(Status status); } diff --git a/single-line-diagram-iidm-extensions/src/main/java/com/powsybl/sld/iidm/extensions/BranchStatusImpl.java b/single-line-diagram-iidm-extensions/src/main/java/com/powsybl/sld/iidm/extensions/BranchStatusImpl.java index 41539efaa..f7db205ac 100644 --- a/single-line-diagram-iidm-extensions/src/main/java/com/powsybl/sld/iidm/extensions/BranchStatusImpl.java +++ b/single-line-diagram-iidm-extensions/src/main/java/com/powsybl/sld/iidm/extensions/BranchStatusImpl.java @@ -27,7 +27,7 @@ public Status getStatus() { return status; } - public BranchStatus setStatus(Status branchStatus) { + public BranchStatus setStatus(Status branchStatus) { Objects.requireNonNull(branchStatus); this.status = branchStatus; return this;