diff --git a/src/main/java/com/powsybl/openloadflow/ac/outerloop/DistributedSlackOuterLoop.java b/src/main/java/com/powsybl/openloadflow/ac/outerloop/DistributedSlackOuterLoop.java index 2d0486c30f..5641f75d85 100644 --- a/src/main/java/com/powsybl/openloadflow/ac/outerloop/DistributedSlackOuterLoop.java +++ b/src/main/java/com/powsybl/openloadflow/ac/outerloop/DistributedSlackOuterLoop.java @@ -104,13 +104,12 @@ public OuterLoopStatus check(AcOuterLoopContext context, Reporter reporter) { contextData.addDistributedActivePower(-distributedActivePower); return OuterLoopStatus.FAILED; } + default -> throw new IllegalArgumentException("Unknown slackDistributionFailureBehavior"); } } else { reportAndLogSuccess(iterationReporter, slackBusActivePowerMismatch, result); return OuterLoopStatus.UNSTABLE; } - - return OuterLoopStatus.STABLE; } private static void reportAndLogSuccess(Reporter reporter, double slackBusActivePowerMismatch, ActivePowerDistribution.Result result) {