Skip to content

Commit 448a0cd

Browse files
committed
Couple small cleanups
1 parent 8a252db commit 448a0cd

File tree

3 files changed

+1
-17
lines changed

3 files changed

+1
-17
lines changed

driver/src/main/java/org/neo4j/driver/internal/handlers/PullAllResponseHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ private Throwable extractFailure()
236236
{
237237
if ( failure == null )
238238
{
239-
throw new IllegalStateException( "Can't consume failure because it does not exist" );
239+
throw new IllegalStateException( "Can't extract failure because it does not exist" );
240240
}
241241

242242
Throwable error = failure;

driver/src/main/java/org/neo4j/driver/internal/util/Futures.java

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@
2626
import java.util.concurrent.ExecutionException;
2727
import java.util.concurrent.Future;
2828

29-
import static java.util.concurrent.CompletableFuture.completedFuture;
30-
3129
public final class Futures
3230
{
3331
private Futures()
@@ -118,16 +116,4 @@ public static Throwable completionErrorCause( Throwable error )
118116
}
119117
return error;
120118
}
121-
122-
public static <T> CompletionStage<T> firstNotNull( CompletionStage<T> stage1, CompletionStage<T> stage2 )
123-
{
124-
return stage1.thenCompose( value ->
125-
{
126-
if ( value != null )
127-
{
128-
return completedFuture( value );
129-
}
130-
return stage2;
131-
} );
132-
}
133119
}

driver/src/test/java/org/neo4j/driver/v1/integration/TransactionAsyncIT.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -969,8 +969,6 @@ public void shouldFailToCommitWhenQueriesFailAndErrorNotConsumed() throws Interr
969969
tx.runAsync( "RETURN 10 / 0" );
970970
tx.runAsync( "CREATE (:TestNode)" );
971971

972-
Thread.sleep( 1000 );
973-
974972
try
975973
{
976974
getBlocking( tx.commitAsync() );

0 commit comments

Comments
 (0)