Make private methods static
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / DatastoreContextIntrospector.java
index 3ca64210bea11986689765fdeee5936f2ba99bc3..6a4d0a6f6d5bfc712b80950c149c733dfee43deb 100644 (file)
@@ -196,11 +196,13 @@ public class DatastoreContextIntrospector {
      * @param properties the properties to apply
      * @return true if the cached DatastoreContext was updated, false otherwise.
      */
-    public boolean update(Dictionary<String, Object> properties) {
+    public synchronized boolean update(Dictionary<String, Object> properties) {
         if(properties == null || properties.isEmpty()) {
             return false;
         }
 
+        LOG.debug("In update: properties: {}", properties);
+
         Builder builder = DatastoreContext.newBuilderFrom(context);
 
         final String dataStoreTypePrefix = context.getDataStoreType() + '.';
@@ -255,7 +257,7 @@ public class DatastoreContextIntrospector {
         return updated;
     }
 
-    private String convertToCamelCase(String inString) {
+    private static String convertToCamelCase(String inString) {
         String str = inString.trim();
         if(StringUtils.contains(str, '-') || StringUtils.contains(str, ' ')) {
             str = inString.replace('-', ' ');
@@ -291,12 +293,12 @@ public class DatastoreContextIntrospector {
     }
 
     private Object constructorValueRecursively(Class<?> toType, Object fromValue) throws Exception {
-        LOG.debug("convertValueRecursively - toType: {}, fromValue {} ({})",
+        LOG.trace("convertValueRecursively - toType: {}, fromValue {} ({})",
                 toType.getSimpleName(), fromValue, fromValue.getClass().getSimpleName());
 
         Constructor<?> ctor = constructors.get(toType);
 
-        LOG.debug("Found {}", ctor);
+        LOG.trace("Found {}", ctor);
 
         if(ctor == null) {
             throw new IllegalArgumentException(String.format("Constructor not found for type %s", toType));