Release patch 2.0.4
[dmaap/dbcapi.git] / src / main / java / org / onap / dmaap / dbcapi / util / Graph.java
index a7700a1..ab40765 100644 (file)
@@ -3,6 +3,8 @@
  * org.onap.dmaap
  * ================================================================================
  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ *
+ * Modifications Copyright (C) 2019 IBM.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 package org.onap.dmaap.dbcapi.util;
 
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
 import org.onap.dmaap.dbcapi.database.DatabaseClass;
 import org.onap.dmaap.dbcapi.model.DcaeLocation;
 import org.onap.dmaap.dbcapi.model.MR_Client;
 import org.onap.dmaap.dbcapi.model.MR_Cluster;
 import org.onap.dmaap.dbcapi.service.MR_ClusterService;
 
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
 
 public class Graph {
        private HashMap<String, String> graph;
@@ -52,19 +53,17 @@ public class Graph {
                if ( clients == null )
                        return;
                initGraph( clients, strict, "" );
-               return;
 
        }
        public Graph( List<MR_Client> clients, boolean strict, String group ) {
                if ( clients == null )
                        return;
                initGraph( clients, strict, group );
-               return;
        }
        
        private void initGraph(List<MR_Client> clients, boolean strict, String group ) {
                MR_ClusterService clusters = new MR_ClusterService();
-               this.graph = new HashMap<String, String>();
+               this.graph = new HashMap<>();
                this.hasCentral = false;
                for( MR_Client client: clients ) {
                        if ( ! strict || client.isStatusValid()) {