Skip to content

Commit 9fbe91a

Browse files
Better fix for sonatype issue?
1 parent 68375d2 commit 9fbe91a

File tree

1 file changed

+5
-1
lines changed
  • src/main/java/edu/ie3/datamodel/utils

1 file changed

+5
-1
lines changed

src/main/java/edu/ie3/datamodel/utils/Try.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,11 @@ public static <U, E extends Exception> Try<Stream<U>, FailureException> scanStre
251251
List<Try<U, E>> successes = map.get(true);
252252
List<Try<U, E>> failures = map.get(false);
253253

254-
if (failures != null && !failures.isEmpty()) {
254+
// Both lists should exist in map per definition of partitioningBy
255+
assert successes != null;
256+
assert failures != null;
257+
258+
if (!failures.isEmpty()) {
255259
E first = failures.get(0).exception;
256260

257261
return new Failure<>(

0 commit comments

Comments
 (0)