diff --git a/hibernate-reactive-core/src/main/java/org/hibernate/reactive/util/impl/CompletionStages.java b/hibernate-reactive-core/src/main/java/org/hibernate/reactive/util/impl/CompletionStages.java index 215602892..ca7df6d6e 100644 --- a/hibernate-reactive-core/src/main/java/org/hibernate/reactive/util/impl/CompletionStages.java +++ b/hibernate-reactive-core/src/main/java/org/hibernate/reactive/util/impl/CompletionStages.java @@ -82,6 +82,10 @@ public static CompletionStage nullFuture() { return (CompletionStage) VOID; } + public static CompletionStage nullFuture(Void v) { + return nullFuture(); + } + public static CompletionStage completedFuture(T value) { return CompletableFuture.completedFuture( value ); } @@ -110,13 +114,6 @@ public static Ret returnOrRethrow(Throwable x, Ret re return result; } - /** - * For CompletionStage#handle when we don't care about errors - */ - public static U ignoreErrors(Void unused, Throwable throwable) { - return null; - } - public static void logSqlException(Throwable t, Supplier message, String sql) { if ( t != null ) { LOG.failedToExecuteStatement( sql, message.get(), t ); @@ -225,10 +222,6 @@ public static CompletionStage loop(Iterator iterator, IntBiPredicat return voidFuture(); } - public static U nullFuture(Void unused) { - return null; - } - public static CompletionStageHandler handle(R result, T throwable) { return new CompletionStageHandler<>( result, throwable ); }