simplify boolean NOT operation

This commit is contained in:
igor-suhorukov 2018-03-09 00:03:09 +03:00 committed by Juergen Hoeller
parent d89f9af22d
commit 2f9d0a7de8
1 changed files with 3 additions and 3 deletions

View File

@ -119,7 +119,7 @@ public abstract class NamedParameterUtils {
String parameter = null;
if (j < statement.length && c == ':' && statement[j] == '{') {
// :{x} style parameter
while (j < statement.length && !('}' == statement[j])) {
while (j < statement.length && '}' != statement[j]) {
j++;
if (':' == statement[j] || '{' == statement[j]) {
throw new InvalidDataAccessApiUsageException("Parameter name contains invalid character '" +
@ -210,7 +210,7 @@ public abstract class NamedParameterUtils {
if (statement[position] == START_SKIP[i].charAt(0)) {
boolean match = true;
for (int j = 1; j < START_SKIP[i].length(); j++) {
if (!(statement[position + j] == START_SKIP[i].charAt(j))) {
if (statement[position + j] != START_SKIP[i].charAt(j)) {
match = false;
break;
}
@ -226,7 +226,7 @@ public abstract class NamedParameterUtils {
// last comment not closed properly
return statement.length;
}
if (!(statement[m + n] == STOP_SKIP[i].charAt(n))) {
if (statement[m + n] != STOP_SKIP[i].charAt(n)) {
endMatch = false;
break;
}