Skip to content

Commit a754036

Browse files
committed
sonar
Signed-off-by: Godelaine de Montmorillon <godelaine.demontmorillon@rte-france.com>
1 parent e9f6422 commit a754036

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

commons/src/main/java/com/powsybl/openrao/commons/TemporalDataImpl.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ public <U> TemporalData<U> mapMultiThreading(Function<T, U> function, int parall
6767
return new TemporalDataImpl<>(result);
6868

6969
} catch (InterruptedException | ExecutionException e) {
70+
Thread.currentThread().interrupt();
7071
throw new OpenRaoException(e);
7172
} finally {
7273
executor.shutdown();

data/ics-importer/src/main/java/com/powsybl/openrao/data/icsimporter/IcsDataImporter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ private static boolean isShutDownRespected(CSVRecord staticRecord, Boolean shutD
369369
}
370370

371371
private static boolean isLeadTimeAndLagTimeRespected(CSVRecord staticRecord, int countConsecutiveNullValues, Optional<Integer> lagAndLead, OffsetDateTime currentDateTime) {
372-
if (countConsecutiveNullValues < lagAndLead.get()) {
372+
if (lagAndLead.isPresent() && countConsecutiveNullValues < lagAndLead.get()) {
373373
BUSINESS_WARNS.warn("Redispatching action {} is not imported (hour {}): lagTime + leadTime ({}) not respected. RA was OFF after shut down for only {} timestamps",
374374
staticRecord.get(0), currentDateTime.getHour(), lagAndLead.get(), countConsecutiveNullValues);
375375
return false;

0 commit comments

Comments
 (0)