Make AbstractDOMBroker.isSupported() static 79/50379/4
authorRobert Varga <rovarga@cisco.com>
Thu, 12 Jan 2017 17:45:39 +0000 (18:45 +0100)
committerRobert Varga <nite@hq.sk>
Tue, 24 Jan 2017 10:05:43 +0000 (10:05 +0000)
This is a utility method, make it static and simplify
it it.

Change-Id: I90e4d8b54b92fd319f373b4ecd0137fc8c5575ef
Signed-off-by: Robert Varga <rovarga@cisco.com>
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/databroker/AbstractDOMBroker.java

index 103f7a6..68191fb 100644 (file)
@@ -91,17 +91,15 @@ abstract class AbstractDOMBroker extends AbstractDOMTransactionFactory<DOMStore>
         }
     }
 
-    private boolean isSupported(Map<LogicalDatastoreType, DOMStore> datastores,
+    private static boolean isSupported(Map<LogicalDatastoreType, DOMStore> datastores,
             Class<?> expDOMStoreInterface) {
-        boolean supported = true;
         for (DOMStore ds : datastores.values()) {
             if (!expDOMStoreInterface.isAssignableFrom(ds.getClass())) {
-                supported = false;
-                break;
+                return false;
             }
         }
 
-        return supported;
+        return true;
     }
 
     public void setCloseable(final AutoCloseable closeable) {

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.