Skip to content

Commit

Permalink
Move trim before try so whitespace input is not treated as SQL.
Browse files Browse the repository at this point in the history
  • Loading branch information
gramian committed Dec 20, 2022
1 parent fb500e2 commit f044e85
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion console/src/main/java/com/arcadedb/console/Console.java
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,11 @@ public void setOutput(final ConsoleOutput output) {

private boolean execute(String line) throws IOException {
try {

line = line.trim();

if (line != null && !line.isEmpty()) {
line = line.trim();

final String lineLowerCase = line.toLowerCase();

if (lineLowerCase.startsWith("begin"))
Expand Down

0 comments on commit f044e85

Please sign in to comment.