Skip to content

Commit

Permalink
Fix code smell
Browse files Browse the repository at this point in the history
Signed-off-by: lisrte <[email protected]>
  • Loading branch information
Lisrte committed Sep 10, 2024
1 parent 05ebad7 commit ac52179
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -323,12 +323,12 @@ public DynawoSimulationParameters setCriteriaFilePath(Path criteriaFilePath) {
return this;
}

private DynawoSimulationParameters setCriteriaFilePath(String criteriaPathName, FileSystem fileSystem) {
Path criteriaFilePath = criteriaPathName != null ? fileSystem.getPath(criteriaPathName) : null;
if (criteriaFilePath == null || !Files.exists(criteriaFilePath)) {
throw new PowsyblException("File " + criteriaFilePath + " set in 'criteria.file' property cannot be found");
private void setCriteriaFilePath(String criteriaPathName, FileSystem fileSystem) {
Path criteriaPath = criteriaPathName != null ? fileSystem.getPath(criteriaPathName) : null;
if (criteriaPath == null || !Files.exists(criteriaPath)) {
throw new PowsyblException("File " + criteriaPath + " set in 'criteria.file' property cannot be found");
}
return setCriteriaFilePath(criteriaFilePath);
setCriteriaFilePath(criteriaPath);
}

public boolean hasCriteriaFile() {
Expand Down

0 comments on commit ac52179

Please sign in to comment.