Skip to content

Commit

Permalink
some clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
wumpz committed Feb 20, 2013
1 parent 35a17b5 commit 0079970
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@
import net.sf.jsqlparser.expression.Expression;
import net.sf.jsqlparser.schema.Table;

/**
*/
/**
* The core of a "SELECT" statement (no UNION, no ORDER BY)
*/
Expand Down Expand Up @@ -163,9 +161,7 @@ public void setGroupByColumnReferences(List<Expression> list) {

@Override
public String toString() {
String sql = "";

sql = "SELECT ";
String sql = "SELECT ";
sql += ((distinct != null) ? "" + distinct + " " : "");
sql += ((top != null) ? "" + top + " " : "");
sql += getStringList(selectItems);
Expand Down
9 changes: 3 additions & 6 deletions src/main/java/net/sf/jsqlparser/util/TablesNamesFinder.java
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,7 @@ public void visit(PlainSelect plainSelect) {
plainSelect.getFromItem().accept(this);

if (plainSelect.getJoins() != null) {
for (Iterator joinsIt = plainSelect.getJoins().iterator(); joinsIt.hasNext();) {
Join join = (Join) joinsIt.next();
for (Join join : plainSelect.getJoins()) {
join.getRightItem().accept(this);
}
}
Expand Down Expand Up @@ -249,8 +248,7 @@ public void visitBinaryExpression(BinaryExpression binaryExpression) {

@Override
public void visit(ExpressionList expressionList) {
for (Iterator iter = expressionList.getExpressions().iterator(); iter.hasNext();) {
Expression expression = (Expression) iter.next();
for (Expression expression : expressionList.getExpressions()) {
expression.accept(this);
}

Expand Down Expand Up @@ -345,8 +343,7 @@ public void visit(AnalyticExpression analytic) {

@Override
public void visit(SetOperationList list) {
for (Iterator iter = list.getPlainSelects().iterator(); iter.hasNext();) {
PlainSelect plainSelect = (PlainSelect) iter.next();
for (PlainSelect plainSelect : list.getPlainSelects()) {
visit(plainSelect);
}
}
Expand Down

0 comments on commit 0079970

Please sign in to comment.