@@ -702,16 +702,18 @@ public void removeAsRegulatingPoint() {
702
702
}
703
703
704
704
});
705
- String regulatingEquiments = getAttributes ().getRegulatingEquipments ().stream ()
706
- .map (RegulatingEquipmentIdentifier ::getEquipmentId ).collect (Collectors .joining (", " ));
707
- connectable .getNetwork ().getReportNodeContext ().getReportNode ().newReportNode ()
708
- .withMessageTemplate ("regulatedTerminalDeleted" , "${identifiableId} has been deleted and it was regulated. " +
709
- "The following regulating equipments have their regulation set to Local : [${regulatingEquipments}] " )
710
- .withUntypedValue ("identifiableId" , connectable .getId ())
711
- .withUntypedValue ("regulatingEquipments" , regulatingEquiments )
712
- .withSeverity (TypedValue .INFO_SEVERITY )
713
- .add ();
714
- getAttributes ().getRegulatingEquipments ().clear ();
705
+ if (!getAttributes ().getRegulatingEquipments ().isEmpty ()) {
706
+ String regulatingEquiments = getAttributes ().getRegulatingEquipments ().stream ()
707
+ .map (RegulatingEquipmentIdentifier ::getEquipmentId ).collect (Collectors .joining (", " ));
708
+ connectable .getNetwork ().getReportNodeContext ().getReportNode ().newReportNode ()
709
+ .withMessageTemplate ("regulatedTerminalDeleted" , "${identifiableId} has been deleted and it was regulated. " +
710
+ "The following regulating equipments have their regulation set to Local : [${regulatingEquipments}] " )
711
+ .withUntypedValue ("identifiableId" , connectable .getId ())
712
+ .withUntypedValue ("regulatingEquipments" , regulatingEquiments )
713
+ .withSeverity (TypedValue .INFO_SEVERITY )
714
+ .add ();
715
+ getAttributes ().getRegulatingEquipments ().clear ();
716
+ }
715
717
}
716
718
717
719
public ReferrerManager <Terminal > getReferrerManager () {
0 commit comments