Skip to content

Commit

Permalink
Fix remaining code smell
Browse files Browse the repository at this point in the history
Signed-off-by: Florian Dupuy <florian.dupuy@rte-france.com>
  • Loading branch information
flo-dup committed Apr 21, 2023
1 parent 09429cf commit 3b808b0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,20 +51,17 @@ public class DynaWaltzProvider implements DynamicSimulationProvider {
private static final String WORKING_DIR_PREFIX = "powsybl_dynawaltz_";
private static final String OUTPUT_IIDM_FILENAME = "outputIIDM.xml";

private final PlatformConfig platformConfig;

private final DynaWaltzConfig dynaWaltzConfig;

public DynaWaltzProvider() {
this(PlatformConfig.defaultConfig());
}

public DynaWaltzProvider(PlatformConfig platformConfig) {
this(platformConfig, DynaWaltzConfig.load(platformConfig));
this(DynaWaltzConfig.load(platformConfig));
}

public DynaWaltzProvider(PlatformConfig platformConfig, DynaWaltzConfig dynawoConfig) {
this.platformConfig = Objects.requireNonNull(platformConfig);
public DynaWaltzProvider(DynaWaltzConfig dynawoConfig) {
this.dynaWaltzConfig = Objects.requireNonNull(dynawoConfig);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class DynaWaltzTest extends AbstractDynawoTest {
@BeforeEach
void setUp() throws Exception {
super.setUp();
provider = new DynaWaltzProvider(PlatformConfig.defaultConfig(), new DynaWaltzConfig("/dynawo", false));
provider = new DynaWaltzProvider(new DynaWaltzConfig("/dynawo", false));
parameters = new DynamicSimulationParameters()
.setStartTime(1)
.setStopTime(100);
Expand Down

0 comments on commit 3b808b0

Please sign in to comment.