mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
fixed sonar rule violations
This commit is contained in:
@@ -245,7 +245,7 @@ public class SQLASTOutputVisitor extends SQLASTVisitorAdapter {
|
||||
for (int i = groupList.size() - 1; i >= 0; --i) {
|
||||
SQLExpr item = groupList.get(i);
|
||||
visitBinaryLeft(item, x.getOperator());
|
||||
|
||||
|
||||
if (relational) {
|
||||
println();
|
||||
} else {
|
||||
@@ -255,7 +255,6 @@ public class SQLASTOutputVisitor extends SQLASTVisitorAdapter {
|
||||
print(" ");
|
||||
}
|
||||
|
||||
|
||||
visitorBinaryRight(x);
|
||||
|
||||
if (isRoot && relational) {
|
||||
@@ -376,8 +375,9 @@ public class SQLASTOutputVisitor extends SQLASTVisitorAdapter {
|
||||
}
|
||||
|
||||
public boolean visit(SQLExistsExpr x) {
|
||||
if (x.isNot()) print("NOT EXISTS (");
|
||||
else {
|
||||
if (x.isNot()) {
|
||||
print("NOT EXISTS (");
|
||||
} else {
|
||||
print("EXISTS (");
|
||||
}
|
||||
incrementIndent();
|
||||
@@ -426,12 +426,12 @@ public class SQLASTOutputVisitor extends SQLASTVisitorAdapter {
|
||||
public boolean visit(SQLAggregateExpr x) {
|
||||
print(x.getMethodName());
|
||||
print("(");
|
||||
|
||||
|
||||
if (x.getOption() != null) {
|
||||
print(x.getOption().toString());
|
||||
print(' ');
|
||||
}
|
||||
|
||||
|
||||
printAndAccept(x.getArguments(), ", ");
|
||||
print(")");
|
||||
return false;
|
||||
@@ -1123,7 +1123,7 @@ public class SQLASTOutputVisitor extends SQLASTVisitorAdapter {
|
||||
print("*/");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean visit(SQLCreateDatabaseStatement x) {
|
||||
print("CREATE DATABASE ");
|
||||
|
||||
Reference in New Issue
Block a user