Fix checkstyle contridictions on datarouter node
[dmaap/datarouter.git] / datarouter-node / src / main / java / org / onap / dmaap / datarouter / node / ProvData.java
index c436076..2c20580 100644 (file)
@@ -54,6 +54,7 @@ import org.onap.dmaap.datarouter.node.eelf.EelfMsgs;
 public class ProvData {
 
     private static final String FEED_ID = "feedid";
+
     private static EELFLogger eelfLogger = EELFManager.getInstance().getLogger(ProvData.class);
     private NodeConfig.ProvNode[] pn;
     private NodeConfig.ProvParam[] pp;
@@ -84,8 +85,8 @@ public class ProvData {
         try {
             JSONTokener jtx = new JSONTokener(reader);
             JSONObject jcfg = new JSONObject(jtx);
-            char c = jtx.nextClean();
-            if (c != '\0') {
+            char cch = jtx.nextClean();
+            if (cch != '\0') {
                 throw new JSONException("Spurious characters following configuration");
             }
             reader.close();
@@ -152,7 +153,7 @@ public class ProvData {
     }
 
     /**
-     * Get the raw node configuration entries
+     * Get the raw node configuration entries.
      */
     public NodeConfig.ProvNode[] getNodes() {
         return (pn);
@@ -333,6 +334,9 @@ public class ProvData {
         if (jnodes != null) {
             for (int nx = 0; nx < jnodes.length(); nx++) {
                 String nn = gvas(jnodes, nx);
+                if (nn == null) {
+                    continue;
+                }
                 if (nn.indexOf('.') == -1) {
                     nn = nn + "." + sfx;
                 }