X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-distributed-datastore%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fdatastore%2FDatastoreContextIntrospector.java;h=6a4d0a6f6d5bfc712b80950c149c733dfee43deb;hp=3ca64210bea11986689765fdeee5936f2ba99bc3;hb=ecccb6d5b43dd73aef0d2d19349d19ee9b4728f7;hpb=64db87e8fb5de25e68ba824ec2eaa17e3f217c96 diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DatastoreContextIntrospector.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DatastoreContextIntrospector.java index 3ca64210be..6a4d0a6f6d 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DatastoreContextIntrospector.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DatastoreContextIntrospector.java @@ -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 properties) { + public synchronized boolean update(Dictionary 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));