Wired ClusteredDataStore with Configuration Subsytem
[controller.git] / opendaylight / md-sal / sal-dom-broker / src / main / java / org / opendaylight / controller / sal / dom / broker / SchemaServiceImpl.java
index efbd81c615f8d8218a6a8ad2a2c422db91c85a30..a6c1c508aaa7327b7a008975dd50aa9c3b09ae9a 100644 (file)
@@ -146,7 +146,7 @@ public class SchemaServiceImpl implements //
 
     private synchronized boolean tryToUpdateState(Collection<URL> changedURLs, Multimap<Bundle, URL> proposedNewState,
             boolean adding) {
-        Preconditions.checkArgument(changedURLs.size() > 0, "No change can occur when no URLs are changed");
+        Preconditions.checkArgument(!changedURLs.isEmpty(), "No change can occur when no URLs are changed");
 
         try {
             // consistent state
@@ -165,8 +165,8 @@ public class SchemaServiceImpl implements //
         } catch (Exception e) {
             // inconsistent state
             logger.debug(
-                    "SchemaService is falling back on last consistent state containing {}, inconsistent yang files {}, reason {}",
-                    consistentBundlesToYangURLs, inconsistentBundlesToYangURLs, e.toString());
+                    "SchemaService is falling back on last consistent state containing {}, inconsistent yang files {}",
+                    consistentBundlesToYangURLs, inconsistentBundlesToYangURLs, e);
             return false;
         }
     }
@@ -224,8 +224,9 @@ public class SchemaServiceImpl implements //
             // system bundle might have config-api on classpath &&
             // config-api contains yang files =>
             // system bundle might contain yang files from that bundle
-            if (bundle.getBundleId() == 0)
+            if (bundle.getBundleId() == 0) {
                 return bundle;
+            }
 
             Enumeration<URL> enumeration = bundle.findEntries("META-INF/yang", "*.yang", false);
             if (enumeration != null && enumeration.hasMoreElements()) {