Skip to content

Commit 0a96d37

Browse files
review
1 parent 5805e75 commit 0a96d37

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

src/main/java/org/gridsuite/voltageinit/server/service/VoltageInitRunContext.java

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ public class VoltageInitRunContext {
3838

3939
private final UUID parametersUuid;
4040

41-
private final Map<String, Double> voltageLevelsIdsRestricted;
41+
private final Map<String, Double> voltageLevelsIdsRestricted = new HashMap<>();
4242
private final Reporter rootReporter;
4343

44-
public VoltageInitRunContext(UUID networkUuid, String variantId, String receiver, UUID reportUuid, String reporterId, String reportType, String userId, UUID parametersUuid, Map<String, Double> voltageLevelsIdsRestricted) {
44+
public VoltageInitRunContext(UUID networkUuid, String variantId, String receiver, UUID reportUuid, String reporterId, String reportType, String userId, UUID parametersUuid) {
4545
this.networkUuid = Objects.requireNonNull(networkUuid);
4646
this.variantId = variantId;
4747
this.receiver = receiver;
@@ -50,16 +50,11 @@ public VoltageInitRunContext(UUID networkUuid, String variantId, String receiver
5050
this.reportType = reportType;
5151
this.userId = userId;
5252
this.parametersUuid = parametersUuid;
53-
this.voltageLevelsIdsRestricted = voltageLevelsIdsRestricted;
5453
if (this.reportUuid == null) {
5554
this.rootReporter = Reporter.NO_OP;
5655
} else {
5756
final String rootReporterId = reporterId == null ? VOLTAGE_INIT_TYPE_REPORT : reporterId + "@" + reportType;
5857
this.rootReporter = new ReporterModel(rootReporterId, rootReporterId);
5958
}
6059
}
61-
62-
public VoltageInitRunContext(UUID networkUuid, String variantId, String receiver, UUID reportUuid, String reporterId, String reportType, String userId, UUID parametersUuid) {
63-
this(networkUuid, variantId, receiver, reportUuid, reporterId, reportType, userId, parametersUuid, new HashMap<>());
64-
}
6560
}

src/main/java/org/gridsuite/voltageinit/server/service/VoltageInitService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public VoltageInitService(NotificationService notificationService,
5050
}
5151

5252
public UUID runAndSaveResult(UUID networkUuid, String variantId, String receiver, UUID reportUuid, String reporterId, String userId, String reportType, UUID parametersUuid) {
53-
VoltageInitRunContext runContext = new VoltageInitRunContext(networkUuid, variantId, receiver, reportUuid, reporterId, reportType, userId, parametersUuid, new HashMap<>());
53+
VoltageInitRunContext runContext = new VoltageInitRunContext(networkUuid, variantId, receiver, reportUuid, reporterId, reportType, userId, parametersUuid);
5454
Objects.requireNonNull(runContext);
5555
var resultUuid = uuidGeneratorService.generate();
5656

0 commit comments

Comments
 (0)