Skip to content

Commit

Permalink
clean and checkstyle
Browse files Browse the repository at this point in the history
Signed-off-by: vmouradian <valentin.mouradian@artelys.com>
  • Loading branch information
vmouradian committed Apr 17, 2024
1 parent 46599c1 commit dbecfe5
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

public interface AreaAdder extends IdentifiableAdder<Area, AreaAdder> {


AreaAdder setAreaType(AreaType areaType);

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ public Optional<Area> getArea(AreaType areaType) {
}

@Override
public void addArea(Area area){
if (area.getVoltageLevels().contains(this)){
public void addArea(Area area) {
if (area.getVoltageLevels().contains(this)) {
areas.add(area);
} else {
area.addVoltageLevel(this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
import com.powsybl.iidm.network.AreaType;
import com.powsybl.iidm.network.impl.util.Ref;

import java.util.HashMap;
import java.util.stream.Collectors;

class AreaAdderImpl extends AbstractIdentifiableAdder<AreaAdderImpl> implements AreaAdder {

private final Ref<NetworkImpl> networkRef;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public void addVoltageLevel(VoltageLevel voltageLevel) {
checkNetwork(voltageLevel);
Optional<Area> previousArea = voltageLevel.getArea(this.getAreaType());
if (previousArea.isPresent() && previousArea.get() != this) {
throw new PowsyblException("VoltageLevel " + voltageLevel.getId() + " is already in Area " + this.getId());
throw new PowsyblException("VoltageLevel " + voltageLevel.getId() + " is already in Area " + this.getId());
} else {
// Add the VoltageLevel to the Area
// (do this even if the voltageLevel already has this area as an attribute, to make sure it is in the voltagelevels set)
Expand Down

0 comments on commit dbecfe5

Please sign in to comment.