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

Commit 997e798

Browse files
committed
code cleanup: deleted dead code regarding unset functionality.
1 parent d8b44f7 commit 997e798

File tree

4 files changed

+0
-25
lines changed

4 files changed

+0
-25
lines changed

cypher-shell/src/integration-test/java/org/neo4j/shell/commands/CypherShellIntegrationTest.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,5 @@ public void paramsAndListVariables() throws CommandException {
178178
List<String> queryResult = captor.getAllValues();
179179
assertThat(queryResult.get(0), is("{ bob }\n" + randomLong));
180180
assertEquals(randomLong, shell.getAll().get("bob"));
181-
182-
shell.remove("bob");
183-
assertTrue(shell.getAll().isEmpty());
184181
}
185182
}

cypher-shell/src/main/java/org/neo4j/shell/CypherShell.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -173,12 +173,6 @@ public Map<String, Object> getAll() {
173173
return queryParams;
174174
}
175175

176-
@Override
177-
@Nonnull
178-
public Optional remove(@Nonnull String name) {
179-
return Optional.ofNullable(queryParams.remove(name));
180-
}
181-
182176
public void setCommandHelper(@Nonnull CommandHelper commandHelper) {
183177
this.commandHelper = commandHelper;
184178
}

cypher-shell/src/main/java/org/neo4j/shell/VariableHolder.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,4 @@ public interface VariableHolder {
2222
*/
2323
@Nonnull
2424
Map<String, Object> getAll();
25-
26-
/**
27-
*
28-
* @param name of variable to delete
29-
*/
30-
Optional remove(@Nonnull String name);
3125
}

cypher-shell/src/test/java/org/neo4j/shell/CypherShellTest.java

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,6 @@ public void verifyVariableMethods() throws CommandException {
144144
Optional result = offlineTestShell.set("bob", "99");
145145
assertEquals("99", result.get());
146146
assertEquals("99", offlineTestShell.getAll().get("bob"));
147-
148-
offlineTestShell.remove("bob");
149-
assertTrue(offlineTestShell.getAll().isEmpty());
150147
}
151148

152149
@Test
@@ -232,13 +229,6 @@ public void specifyingACypherStringShouldGiveAStringRunner() throws IOException
232229
}
233230
}
234231

235-
@Test
236-
public void unsetAlreadyClearedValue() throws CommandException {
237-
// when
238-
// then
239-
assertFalse("Expected param to be unset", offlineTestShell.remove("unknown var").isPresent());
240-
}
241-
242232
@Test
243233
public void setWithSomeBoltError() throws CommandException {
244234
// then

0 commit comments

Comments
 (0)