Skip to content

Commit 91c32bb

Browse files
committed
Refactoring: Changes suggested in pull request: #51
1 parent defb509 commit 91c32bb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

sql12/core/src/net/sourceforge/squirrel_sql/fw/sql/querytokenizer/ChangeStatementSeparatorSupport.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,12 @@ public String findSetTerminatorInstruction(final int searchStartPos, SQLCommentA
4444
return null;
4545
}
4646

47-
if(isCommandPrecededBySpacesOrTabsOnly(_script, searchStartPos))
47+
// Only when the comment starts on a new line
48+
if(false == isCommandPrecededBySpacesOrTabsOnly(_script, searchStartPos))
4849
{
4950
return null;
5051
}
5152

52-
// Only when the comment starts on a new line
5353
int newLinePos = _script.indexOf('\n', searchStartPos);
5454
if(newLinePos > searchStartPos + _terminatorCommandInclLineCommentPrefix.length())
5555
{
@@ -79,10 +79,10 @@ private static boolean isCommandPrecededBySpacesOrTabsOnly(String script, int se
7979
else if(c != ' ' && c != '\t')
8080
{
8181
// Found non-whitespace character
82-
return true;
82+
return false;
8383
}
8484
}
85-
return false;
85+
return true;
8686
}
8787

8888
public boolean isActive()

0 commit comments

Comments
 (0)