File tree Expand file tree Collapse file tree 2 files changed +4
-11
lines changed
src/main/java/net/sf/jsqlparser Expand file tree Collapse file tree 2 files changed +4
-11
lines changed Original file line number Diff line number Diff line change 2727import net .sf .jsqlparser .expression .Expression ;
2828import net .sf .jsqlparser .schema .Table ;
2929
30- /**
31- */
3230/**
3331 * The core of a "SELECT" statement (no UNION, no ORDER BY)
3432 */
@@ -163,9 +161,7 @@ public void setGroupByColumnReferences(List<Expression> list) {
163161
164162 @ Override
165163 public String toString () {
166- String sql = "" ;
167-
168- sql = "SELECT " ;
164+ String sql = "SELECT " ;
169165 sql += ((distinct != null ) ? "" + distinct + " " : "" );
170166 sql += ((top != null ) ? "" + top + " " : "" );
171167 sql += getStringList (selectItems );
Original file line number Diff line number Diff line change @@ -93,8 +93,7 @@ public void visit(PlainSelect plainSelect) {
9393 plainSelect .getFromItem ().accept (this );
9494
9595 if (plainSelect .getJoins () != null ) {
96- for (Iterator joinsIt = plainSelect .getJoins ().iterator (); joinsIt .hasNext ();) {
97- Join join = (Join ) joinsIt .next ();
96+ for (Join join : plainSelect .getJoins ()) {
9897 join .getRightItem ().accept (this );
9998 }
10099 }
@@ -249,8 +248,7 @@ public void visitBinaryExpression(BinaryExpression binaryExpression) {
249248
250249 @ Override
251250 public void visit (ExpressionList expressionList ) {
252- for (Iterator iter = expressionList .getExpressions ().iterator (); iter .hasNext ();) {
253- Expression expression = (Expression ) iter .next ();
251+ for (Expression expression : expressionList .getExpressions ()) {
254252 expression .accept (this );
255253 }
256254
@@ -345,8 +343,7 @@ public void visit(AnalyticExpression analytic) {
345343
346344 @ Override
347345 public void visit (SetOperationList list ) {
348- for (Iterator iter = list .getPlainSelects ().iterator (); iter .hasNext ();) {
349- PlainSelect plainSelect = (PlainSelect ) iter .next ();
346+ for (PlainSelect plainSelect : list .getPlainSelects ()) {
350347 visit (plainSelect );
351348 }
352349 }
You can’t perform that action at this time.
0 commit comments