fixed sonar rule violations

This commit is contained in:
wenshao
2012-08-29 15:36:45 +08:00
parent c96af1628e
commit 5c6d5fcadc
17 changed files with 206 additions and 211 deletions
@@ -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 ");