Skip to content

Commit

Permalink
Refactoring: Changes suggested in pull request: #51
Browse files Browse the repository at this point in the history
  • Loading branch information
gerdwagner committed Dec 1, 2024
1 parent defb509 commit 91c32bb
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ public String findSetTerminatorInstruction(final int searchStartPos, SQLCommentA
return null;
}

if(isCommandPrecededBySpacesOrTabsOnly(_script, searchStartPos))
// Only when the comment starts on a new line
if(false == isCommandPrecededBySpacesOrTabsOnly(_script, searchStartPos))
{
return null;
}

// Only when the comment starts on a new line
int newLinePos = _script.indexOf('\n', searchStartPos);
if(newLinePos > searchStartPos + _terminatorCommandInclLineCommentPrefix.length())
{
Expand Down Expand Up @@ -79,10 +79,10 @@ private static boolean isCommandPrecededBySpacesOrTabsOnly(String script, int se
else if(c != ' ' && c != '\t')
{
// Found non-whitespace character
return true;
return false;
}
}
return false;
return true;
}

public boolean isActive()
Expand Down

0 comments on commit 91c32bb

Please sign in to comment.