Skip to content

Commit

Permalink
fix: compile error
Browse files Browse the repository at this point in the history
  • Loading branch information
paullatzelsperger committed Aug 8, 2023
1 parent e4ae6c8 commit b32d6b7
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

import org.eclipse.edc.spi.result.AbstractResult;
import org.eclipse.edc.spi.result.Failure;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.List;

Expand All @@ -32,4 +34,9 @@ class AggregatedResult<T> extends AbstractResult<T, Failure, AggregatedResult<T>
AggregatedResult(T successfulResult, List<String> failureMessage) {
super(successfulResult, failureMessage.isEmpty() ? null : new Failure(failureMessage));
}

@Override
protected <R1 extends AbstractResult<C1, Failure, R1>, C1> @NotNull R1 newInstance(@Nullable C1 content, @Nullable Failure failure) {
return (R1) new AggregatedResult<>(content, failure.getMessages());
}
}

0 comments on commit b32d6b7

Please sign in to comment.