From 1b686aebb5fc81ba6dd38eefad6d3eebf2a311ef Mon Sep 17 00:00:00 2001 From: Leclerc Clement Date: Mon, 9 Dec 2024 14:40:05 +0100 Subject: [PATCH] add Exception for null equipment Signed-off-by: Leclerc Clement --- .../powsybl/ucte/converter/AbstractNamingStrategy.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ucte/ucte-converter/src/main/java/com/powsybl/ucte/converter/AbstractNamingStrategy.java b/ucte/ucte-converter/src/main/java/com/powsybl/ucte/converter/AbstractNamingStrategy.java index f7c9067ed9a..af851db9c3d 100644 --- a/ucte/ucte-converter/src/main/java/com/powsybl/ucte/converter/AbstractNamingStrategy.java +++ b/ucte/ucte-converter/src/main/java/com/powsybl/ucte/converter/AbstractNamingStrategy.java @@ -37,7 +37,7 @@ public UcteNodeCode getUcteNodeCode(String id) { @Override public UcteNodeCode getUcteNodeCode(Bus bus) { - if(bus == null) { + if (bus == null) { throw new PowsyblException("the bus is null"); } return getUcteNodeCode(bus.getId()); @@ -59,7 +59,7 @@ public UcteElementId getUcteElementId(String id) { @Override public UcteElementId getUcteElementId(Switch sw) { - if(sw == null) { + if (sw == null) { throw new PowsyblException("the bus is null"); } return getUcteElementId(sw.getId()); @@ -67,7 +67,7 @@ public UcteElementId getUcteElementId(Switch sw) { @Override public UcteElementId getUcteElementId(Branch branch) { - if(branch == null) { + if (branch == null) { throw new PowsyblException("the bus is null"); } return getUcteElementId(branch.getId()); @@ -75,7 +75,7 @@ public UcteElementId getUcteElementId(Branch branch) { @Override public UcteElementId getUcteElementId(DanglingLine danglingLine) { - if(danglingLine == null) { + if (danglingLine == null) { throw new PowsyblException("the bus is null"); } return getUcteElementId(danglingLine.getId());