Enable checkstyle whitespace rules

Enable checkstyle whitespace rules and fix the violations that are reported.
Also suppressed checkstyle errors from Topology.java, which is machine generated.

Change-Id: I7c608321359f31b3b70c77a20b77e46306d4d2ec
diff --git a/conf/checkstyle/onos_suppressions.xml b/conf/checkstyle/onos_suppressions.xml
index 53f456e..a32b222 100644
--- a/conf/checkstyle/onos_suppressions.xml
+++ b/conf/checkstyle/onos_suppressions.xml
@@ -10,6 +10,7 @@
     <suppress files="edu.stanford.ramcloud.*" checks="[_a-zA-Z0-9]*"/>
     <suppress files="net.floodlightcontroller.*" checks="[_a-zA-Z0-9]*"/>
     <suppress files="org.openflow.*" checks="[_a-zA-Z0-9]*"/>
+    <suppress files="net.onrc.onos.core.datastore.serializers.*" checks="[_a-zA-Z0-9]*"/>
 
     <suppress files=".*" checks="FinalParametersCheck"/>
     <suppress files=".*" checks="MagicNumbersCheck"/>
diff --git a/conf/checkstyle/sun_checks.xml b/conf/checkstyle/sun_checks.xml
index 975350e..0f685fa 100644
--- a/conf/checkstyle/sun_checks.xml
+++ b/conf/checkstyle/sun_checks.xml
@@ -170,33 +170,18 @@
 
         <!-- Checks for whitespace                               -->
         <!-- See http://checkstyle.sf.net/config_whitespace.html -->
-        <module name="EmptyForIteratorPad">
-          <property name="severity" value="warning"/>
-        </module>
-
+        <module name="EmptyForIteratorPad"/>
         <module name="GenericWhitespace"/>
         <module name="MethodParamPad"/>
-
-        <module name="NoWhitespaceAfter">
-          <property name="severity" value="warning"/>
-        </module>
-
-        <module name="NoWhitespaceBefore">
-          <property name="severity" value="warning"/>
-        </module>
+        <module name="NoWhitespaceAfter"/>
+        <module name="NoWhitespaceBefore"/>
 
         <!-- Disabled for ONOS.  Default rules specify undesired behavior for the '?' operator -->
         <!-- <module name="OperatorWrap"/> -->
         <module name="ParenPad"/>
         <module name="TypecastParenPad"/>
-
-        <module name="WhitespaceAfter">
-          <property name="severity" value="warning"/>
-        </module>
-
-        <module name="WhitespaceAround">
-          <property name="severity" value="warning"/>
-        </module>
+        <module name="WhitespaceAfter"/>
+        <module name="WhitespaceAround"/>
 
 
 
diff --git a/src/main/java/net/onrc/onos/apps/forwarding/Forwarding.java b/src/main/java/net/onrc/onos/apps/forwarding/Forwarding.java
index 68bfaff..3d2ab93 100644
--- a/src/main/java/net/onrc/onos/apps/forwarding/Forwarding.java
+++ b/src/main/java/net/onrc/onos/apps/forwarding/Forwarding.java
@@ -377,7 +377,7 @@
                     Boolean isflowEntryForThisSwitch = false;
                     net.onrc.onos.core.topology.Path path = pathIntent.getPath();
 
-                    for (Iterator<LinkEvent> i = path.iterator(); i.hasNext(); ) {
+                    for (Iterator<LinkEvent> i = path.iterator(); i.hasNext();) {
                         LinkEvent le = (LinkEvent) i.next();
                         if (le.getSrc().dpid == sw.getId()) {
                             log.debug("src {} dst {}", le.getSrc(), le.getDst());
diff --git a/src/main/java/net/onrc/onos/core/datastore/ramcloud/RCClient.java b/src/main/java/net/onrc/onos/core/datastore/ramcloud/RCClient.java
index 41fda9e..4d228ef 100644
--- a/src/main/java/net/onrc/onos/core/datastore/ramcloud/RCClient.java
+++ b/src/main/java/net/onrc/onos/core/datastore/ramcloud/RCClient.java
@@ -324,7 +324,7 @@
     public boolean multiRead(final Collection<IMultiEntryOperation> ops) {
 
         if (ops.size() <= MAX_MULTI_READS && ops instanceof ArrayList) {
-            @SuppressWarnings({"unchecked", "rawtypes"})
+            @SuppressWarnings({ "unchecked", "rawtypes" })
             final ArrayList<RCMultiEntryOperation> arrays = (ArrayList) ops;
             return multiReadInternal(arrays);
         }
@@ -357,7 +357,7 @@
     public boolean multiWrite(final List<IMultiEntryOperation> ops) {
 
         if (ops.size() <= MAX_MULTI_WRITES && ops instanceof ArrayList) {
-            @SuppressWarnings({"unchecked", "rawtypes"})
+            @SuppressWarnings({ "unchecked", "rawtypes" })
             final ArrayList<RCMultiEntryOperation> arrays = (ArrayList) ops;
             return multiWriteInternal(arrays);
         }
diff --git a/src/main/java/net/onrc/onos/core/intent/runtime/PathCalcRuntimeModule.java b/src/main/java/net/onrc/onos/core/intent/runtime/PathCalcRuntimeModule.java
index bacb5a3..d6cd25a 100755
--- a/src/main/java/net/onrc/onos/core/intent/runtime/PathCalcRuntimeModule.java
+++ b/src/main/java/net/onrc/onos/core/intent/runtime/PathCalcRuntimeModule.java
@@ -315,7 +315,7 @@
             log.debug("Unmatched link events: {} events", unmatchedLinkEvents.size());
         }
 
-        if (rerouteAll) {//addedLinkEvents.size() > 0) { // ||
+        if (rerouteAll) { //addedLinkEvents.size() > 0) { // ||
 //                              addedPortEvents.size() > 0 ||
 //                              addedSwitchEvents.size() > 0) {
             p.log("begin_getAllIntents");
diff --git a/src/main/java/net/onrc/onos/core/registry/ZookeeperRegistry.java b/src/main/java/net/onrc/onos/core/registry/ZookeeperRegistry.java
index 884df0e..d85faf2 100755
--- a/src/main/java/net/onrc/onos/core/registry/ZookeeperRegistry.java
+++ b/src/main/java/net/onrc/onos/core/registry/ZookeeperRegistry.java
@@ -204,8 +204,6 @@
         }
     }
 
-    ;
-
     protected class ClusterLeaderListener implements LeaderLatchListener {
         LeaderLatch latch;