Enable checkstyle rule for too many formal parameters

Enable the "ParameterNumber" checkstyle rule and fix
any violations it uncovers.

There were 4 places in the code that violated this rule.
Changing these APIs was outside of the scope of the current work,
so suppressions were put in place for these 4 classes:

net.onrc.onos.core.intent.ConstrainedShortestPathIntent
net.onrc.onos.core.intent.runtime.PathCalcRuntimeModule
net.onrc.onos.core.linkdiscovery.internal.LinkDiscoveryManager
net.onrc.onos.core.topology.INetworkGraphListener

Change-Id: Iedc4177668efa33347f5c2300005dece68c36925
diff --git a/conf/checkstyle/sun_checks.xml b/conf/checkstyle/sun_checks.xml
index 9460b7c..d2eea90 100644
--- a/conf/checkstyle/sun_checks.xml
+++ b/conf/checkstyle/sun_checks.xml
@@ -151,10 +151,7 @@
           <property name="severity" value="warning"/>
         </module>
 
-        <module name="ParameterNumber">
-          <property name="severity" value="warning"/>
-        </module>
-
+        <module name="ParameterNumber"/>
 
         <!-- Checks for whitespace                               -->
         <!-- See http://checkstyle.sf.net/config_whitespace.html -->
diff --git a/src/main/java/net/onrc/onos/core/intent/ConstrainedShortestPathIntent.java b/src/main/java/net/onrc/onos/core/intent/ConstrainedShortestPathIntent.java
index 2f02857..1661c02 100644
--- a/src/main/java/net/onrc/onos/core/intent/ConstrainedShortestPathIntent.java
+++ b/src/main/java/net/onrc/onos/core/intent/ConstrainedShortestPathIntent.java
@@ -12,10 +12,12 @@
     protected ConstrainedShortestPathIntent() {
     }
 
+    // CHECKSTYLE:OFF suppress the warning about too many parameters
     public ConstrainedShortestPathIntent(String id,
                                          long srcSwitch, long srcPort, long srcMac,
                                          long dstSwitch, long dstPort, long dstMac,
                                          double bandwidth) {
+    // CHECKSTYLE:ON
         super(id, srcSwitch, srcPort, srcMac, dstSwitch, dstPort, dstMac);
         this.bandwidth = bandwidth;
     }
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 da8c9d2..a3ffa90 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
@@ -283,6 +283,7 @@
     // INetworkGraphListener implementations
     // ================================================================================
 
+    // CHECKSTYLE:OFF suppress warning about too many parameters
     @Override
     public void networkGraphEvents(Collection<SwitchEvent> addedSwitchEvents,
                                    Collection<SwitchEvent> removedSwitchEvents,
@@ -292,6 +293,7 @@
                                    Collection<LinkEvent> removedLinkEvents,
                                    Collection<DeviceEvent> addedDeviceEvents,
                                    Collection<DeviceEvent> removedDeviceEvents) {
+    // CHECKSTYLE:ON
 
         PerfLogger p = new PerfLogger("networkGraphEvents");
         HashSet<Intent> affectedPaths = new HashSet<>();
diff --git a/src/main/java/net/onrc/onos/core/linkdiscovery/internal/LinkDiscoveryManager.java b/src/main/java/net/onrc/onos/core/linkdiscovery/internal/LinkDiscoveryManager.java
index 306bbbb..e3d8432 100644
--- a/src/main/java/net/onrc/onos/core/linkdiscovery/internal/LinkDiscoveryManager.java
+++ b/src/main/java/net/onrc/onos/core/linkdiscovery/internal/LinkDiscoveryManager.java
@@ -1844,10 +1844,13 @@
         evTopoSwitch = evHistTopologySwitch.put(evTopoSwitch, actn);
     }
 
+    // CHECKSTYLE:OFF suppress warning about too many parameters
     private void evHistTopoLink(long srcDpid, long dstDpid, short srcPort,
                                 short dstPort, int srcPortState, int dstPortState,
                                 ILinkDiscovery.LinkType linkType,
                                 EvAction actn, String reason) {
+    // CHECKSTYLE:ON
+
         if (evTopoLink == null) {
             evTopoLink = new EventHistoryTopologyLink();
         }
diff --git a/src/main/java/net/onrc/onos/core/topology/INetworkGraphListener.java b/src/main/java/net/onrc/onos/core/topology/INetworkGraphListener.java
index 9e53222..6132fbb 100644
--- a/src/main/java/net/onrc/onos/core/topology/INetworkGraphListener.java
+++ b/src/main/java/net/onrc/onos/core/topology/INetworkGraphListener.java
@@ -33,6 +33,7 @@
      * @param addedDeviceEvents   the Added Device Events.
      * @param removedDeviceEvents the Removed Device Events.
      */
+    // CHECKSTYLE:OFF suppress warning about too many parameters
     public void networkGraphEvents(Collection<SwitchEvent> addedSwitchEvents,
                                    Collection<SwitchEvent> removedSwitchEvents,
                                    Collection<PortEvent> addedPortEvents,
@@ -41,4 +42,5 @@
                                    Collection<LinkEvent> removedLinkEvents,
                                    Collection<DeviceEvent> addedDeviceEvents,
                                    Collection<DeviceEvent> removedDeviceEvents);
+    // CHECKSTYLE:ON
 }