Skip to content

Commit c5c8224

Browse files
committed
[#1857] Update utilities classes
1 parent 119e158 commit c5c8224

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

hibernate-reactive-core/src/main/java/org/hibernate/reactive/util/impl/CompletionStages.java

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,10 @@ public static <T> CompletionStage<T> nullFuture() {
8282
return (CompletionStage<T>) VOID;
8383
}
8484

85+
public static <T> CompletionStage<T> nullFuture(Void v) {
86+
return nullFuture();
87+
}
88+
8589
public static <T> CompletionStage<T> completedFuture(T value) {
8690
return CompletableFuture.completedFuture( value );
8791
}
@@ -110,13 +114,6 @@ public static <T extends Throwable, Ret> Ret returnOrRethrow(Throwable x, Ret re
110114
return result;
111115
}
112116

113-
/**
114-
* For CompletionStage#handle when we don't care about errors
115-
*/
116-
public static <U> U ignoreErrors(Void unused, Throwable throwable) {
117-
return null;
118-
}
119-
120117
public static void logSqlException(Throwable t, Supplier<String> message, String sql) {
121118
if ( t != null ) {
122119
LOG.failedToExecuteStatement( sql, message.get(), t );
@@ -225,10 +222,6 @@ public static <T> CompletionStage<Void> loop(Iterator<T> iterator, IntBiPredicat
225222
return voidFuture();
226223
}
227224

228-
public static <U> U nullFuture(Void unused) {
229-
return null;
230-
}
231-
232225
public static <R, T extends Throwable> CompletionStageHandler<R, T> handle(R result, T throwable) {
233226
return new CompletionStageHandler<>( result, throwable );
234227
}

0 commit comments

Comments
 (0)