Enable checkstyle rule to disallow C style
array declarations (byte foo[]) and fix
instances of it.

Change-Id: I34499c9f28bae5e2f2c5c47330768de76439e3d5
diff --git a/conf/checkstyle/sun_checks.xml b/conf/checkstyle/sun_checks.xml
index 8dfe187..533f906 100644
--- a/conf/checkstyle/sun_checks.xml
+++ b/conf/checkstyle/sun_checks.xml
@@ -299,9 +299,7 @@
 
         <!-- Miscellaneous other checks.                   -->
         <!-- See http://checkstyle.sf.net/config_misc.html -->
-        <module name="ArrayTypeStyle">
-          <property name="severity" value="warning"/>
-        </module>
+        <module name="ArrayTypeStyle"/>
 
         <!--  Many violations of this rule currently, too many to fix
         in the current cleanup. -->
diff --git a/src/main/java/net/onrc/onos/apps/bgproute/PatriciaTrie.java b/src/main/java/net/onrc/onos/apps/bgproute/PatriciaTrie.java
index 8225d7d..817e571 100644
--- a/src/main/java/net/onrc/onos/apps/bgproute/PatriciaTrie.java
+++ b/src/main/java/net/onrc/onos/apps/bgproute/PatriciaTrie.java
@@ -4,7 +4,7 @@
 import java.util.NoSuchElementException;
 
 public class PatriciaTrie<V> implements IPatriciaTrie<V> {
-    private final byte maskBits[] = {(byte) 0x00, (byte) 0x80, (byte) 0xc0, (byte) 0xe0, (byte) 0xf0,
+    private final byte[] maskBits = {(byte) 0x00, (byte) 0x80, (byte) 0xc0, (byte) 0xe0, (byte) 0xf0,
             (byte) 0xf8, (byte) 0xfc, (byte) 0xfe, (byte) 0xff};
 
     private int maxPrefixLength;
diff --git a/src/main/java/net/onrc/onos/apps/bgproute/Ptree.java b/src/main/java/net/onrc/onos/apps/bgproute/Ptree.java
index 9a0400f..b56fa0c 100644
--- a/src/main/java/net/onrc/onos/apps/bgproute/Ptree.java
+++ b/src/main/java/net/onrc/onos/apps/bgproute/Ptree.java
@@ -15,7 +15,7 @@
     private int maxKeyOctets;
     //private int refCount;
     private PtreeNode top;
-    private byte maskBits[] = {(byte) 0x00, (byte) 0x80, (byte) 0xc0, (byte) 0xe0, (byte) 0xf0, (byte) 0xf8, (byte) 0xfc, (byte) 0xfe, (byte) 0xff};
+    private byte[] maskBits = {(byte) 0x00, (byte) 0x80, (byte) 0xc0, (byte) 0xe0, (byte) 0xf0, (byte) 0xf8, (byte) 0xfc, (byte) 0xfe, (byte) 0xff};
 
     public Ptree(int max_key_bits) {
         maxKeyBits = max_key_bits;
diff --git a/src/main/java/net/onrc/onos/apps/bgproute/PtreeNode.java b/src/main/java/net/onrc/onos/apps/bgproute/PtreeNode.java
index e1b4c55..c872a4e 100644
--- a/src/main/java/net/onrc/onos/apps/bgproute/PtreeNode.java
+++ b/src/main/java/net/onrc/onos/apps/bgproute/PtreeNode.java
@@ -8,7 +8,7 @@
     public PtreeNode left;
     public PtreeNode right;
 
-    public byte key[];
+    public byte[] key;
     public int keyBits;
 
     public int refCount;
diff --git a/src/main/java/net/onrc/onos/core/intent/PathIntent.java b/src/main/java/net/onrc/onos/core/intent/PathIntent.java
index e541454..633fe8b 100644
--- a/src/main/java/net/onrc/onos/core/intent/PathIntent.java
+++ b/src/main/java/net/onrc/onos/core/intent/PathIntent.java
@@ -15,7 +15,7 @@
     }
 
     public static String createNextId(String currentId) {
-        String parts[] = currentId.split("___");
+        String[] parts = currentId.split("___");
         return String.format("%s___%d", parts[0], Long.valueOf(parts[1]) + 1);
     }
 
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 a395ab6..59abceb 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
@@ -139,8 +139,8 @@
     // periodically or in response to a recieved LLDP
     private static final byte TLV_DIRECTION_TYPE = 0x73;
     private static final short TLV_DIRECTION_LENGTH = 1;  // 1 byte
-    private static final byte TLV_DIRECTION_VALUE_FORWARD[] = {0x01};
-    private static final byte TLV_DIRECTION_VALUE_REVERSE[] = {0x02};
+    private static final byte[] TLV_DIRECTION_VALUE_FORWARD = {0x01};
+    private static final byte[] TLV_DIRECTION_VALUE_REVERSE = {0x02};
     private static final LLDPTLV forwardTLV
             = new LLDPTLV().
             setType(TLV_DIRECTION_TYPE).
diff --git a/src/main/java/net/onrc/onos/core/util/PerformanceMonitor.java b/src/main/java/net/onrc/onos/core/util/PerformanceMonitor.java
index b6cdd94..fa05536 100644
--- a/src/main/java/net/onrc/onos/core/util/PerformanceMonitor.java
+++ b/src/main/java/net/onrc/onos/core/util/PerformanceMonitor.java
@@ -256,7 +256,7 @@
         theInstance.reportStep(tag);
     }
 
-    public static void main(String args[]) {
+    public static void main(String[] args) {
         // test the measurement overhead
         String tag;
         for (int i = 0; i < 2; i++) {