Skip to content

Commit 52d7224

Browse files
Remove redundant text.length() checks
1 parent fb09d78 commit 52d7224

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/sqlancer/mysql/ast/MySQLBinaryOperation.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,20 +78,20 @@ public MySQLConstant getExpectedValue() {
7878
/* workaround for https://bugs.mysql.com/bug.php?id=95960 */
7979
if (leftExpected.isString()) {
8080
String text = leftExpected.castAsString();
81-
while ((text.startsWith(" ") || text.startsWith("\t")) && !text.isEmpty()) {
81+
while (text.startsWith(" ") || text.startsWith("\t")) {
8282
text = text.substring(1);
8383
}
84-
if (!text.isEmpty() && (text.startsWith("\n") || text.startsWith("."))) {
84+
if (text.startsWith("\n") || text.startsWith(".")) {
8585
throw new IgnoreMeException();
8686
}
8787
}
8888

8989
if (rightExpected.isString()) {
9090
String text = rightExpected.castAsString();
91-
while ((text.startsWith(" ") || text.startsWith("\t")) && !text.isEmpty()) {
91+
while (text.startsWith(" ") || text.startsWith("\t")) {
9292
text = text.substring(1);
9393
}
94-
if (!text.isEmpty() && (text.startsWith("\n") || text.startsWith("."))) {
94+
if (text.startsWith("\n") || text.startsWith(".")) {
9595
throw new IgnoreMeException();
9696
}
9797
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy