Fix checkstyle if-statements must use braces sal-dom-xsql
[controller.git] / opendaylight / md-sal / sal-dom-xsql / src / main / java / org / opendaylight / controller / md / sal / dom / xsql / jdbc / JDBCServer.java
index b348d8fda8b64da5509c39346e976e59b453ed99..7b2733ccf784dbf0784cf316ac4d3343d3705f45 100644 (file)
@@ -193,10 +193,12 @@ public class JDBCServer extends Thread {
             int braketCount = 0;
             int endSubQuery = startSubQuery;
             do {
-                if (sql.charAt(endSubQuery) == '(')
+                if (sql.charAt(endSubQuery) == '(') {
                     braketCount++;
-                else if (sql.charAt(endSubQuery) == ')')
+                }
+                else if (sql.charAt(endSubQuery) == ')') {
                     braketCount--;
+                }
                 endSubQuery++;
             } while (braketCount > 0 || endSubQuery == sql.length());
             String subQuerySQL = sql.substring(startSubQuery + 1,endSubQuery - 1);
@@ -338,8 +340,9 @@ public class JDBCServer extends Thread {
             whereTo = order;
         }
 
-        if(whereTo==-1)
+        if(whereTo==-1) {
             whereTo=lowSQL.length();
+        }
 
         String whereStatement = rs.getSQL().substring(where + 5, whereTo)
                 .trim();