CompletionStrategy.java

1
package com.pivovarit.collectors;
2
3
import java.util.List;
4
import java.util.concurrent.CompletableFuture;
5
import java.util.function.Function;
6
import java.util.stream.Stream;
7
import java.util.stream.StreamSupport;
8
9
interface CompletionStrategy<T> extends Function<List<CompletableFuture<T>>, Stream<T>> {
10
11
    static <R> CompletionStrategy<R> unordered() {
12 2 1. lambda$unordered$0 : replaced return value with Stream.empty for com/pivovarit/collectors/CompletionStrategy::lambda$unordered$0 → KILLED
2. unordered : replaced return value with null for com/pivovarit/collectors/CompletionStrategy::unordered → KILLED
        return futures -> StreamSupport.stream(new CompletionOrderSpliterator<>(futures), false);
13
    }
14
15
    static <R> CompletionStrategy<R> ordered() {
16 2 1. lambda$ordered$1 : replaced return value with Stream.empty for com/pivovarit/collectors/CompletionStrategy::lambda$ordered$1 → KILLED
2. ordered : replaced return value with null for com/pivovarit/collectors/CompletionStrategy::ordered → KILLED
        return futures -> futures.stream().map(CompletableFuture::join);
17
    }
18
}

Mutations

12

1.1
Location : lambda$unordered$0
Killed by : com.pivovarit.collectors.FunctionalTest.[engine:junit-jupiter]/[class:com.pivovarit.collectors.FunctionalTest]/[test-factory:streaming_collectors()]/[dynamic-test:#2]
replaced return value with Stream.empty for com/pivovarit/collectors/CompletionStrategy::lambda$unordered$0 → KILLED

2.2
Location : unordered
Killed by : com.pivovarit.collectors.FunctionalTest.[engine:junit-jupiter]/[class:com.pivovarit.collectors.FunctionalTest]/[test-factory:streaming_collectors()]/[dynamic-test:#6]
replaced return value with null for com/pivovarit/collectors/CompletionStrategy::unordered → KILLED

16

1.1
Location : lambda$ordered$1
Killed by : com.pivovarit.collectors.FunctionalTest.[engine:junit-jupiter]/[class:com.pivovarit.collectors.FunctionalTest]/[test-factory:streaming_collectors()]/[dynamic-test:#14]
replaced return value with Stream.empty for com/pivovarit/collectors/CompletionStrategy::lambda$ordered$1 → KILLED

2.2
Location : ordered
Killed by : com.pivovarit.collectors.FunctionalTest.[engine:junit-jupiter]/[class:com.pivovarit.collectors.FunctionalTest]/[test-factory:streaming_collectors()]/[dynamic-test:#15]
replaced return value with null for com/pivovarit/collectors/CompletionStrategy::ordered → KILLED

Active mutators

Tests examined


Report generated by PIT 1.9.8