Skip to content
This repository was archived by the owner on Jul 6, 2023. It is now read-only.

Commit 7ce9f78

Browse files
committed
Minor clean up
1 parent 09ff24f commit 7ce9f78

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

cypher-shell/src/main/java/org/neo4j/shell/state/BoltStateHandler.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -221,11 +221,12 @@ else if ( systemBookmark != null )
221221
session = driver.session( builder.build() );
222222

223223
resetActualDbName(); // Set this to null first in case run throws an exception
224-
wrap(command).apply();
224+
connect(command);
225225
}
226226

227-
private ThrowingAction<CommandException> wrap(ThrowingAction<CommandException> command) {
228-
return command == null ? getPing() : () ->
227+
private void connect( ThrowingAction<CommandException> command) throws CommandException
228+
{
229+
ThrowingAction<CommandException> toCall = command == null ? getPing() : () ->
229230
{
230231
try
231232
{
@@ -242,6 +243,9 @@ private ThrowingAction<CommandException> wrap(ThrowingAction<CommandException> c
242243
throw e;
243244
}
244245
};
246+
247+
//execute
248+
toCall.apply();
245249
}
246250

247251
private ThrowingAction<CommandException> getPing() {

0 commit comments

Comments
 (0)