X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=restconf%2Frestconf-nb-bierman02%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fnetconf%2Fsal%2Frestconf%2Fimpl%2FRestCodec.java;h=6cf67830365ab096b51ff34bd61fe619432ab4c5;hb=4aac232d4c70207a15013088bf056565262f1da8;hp=513060e7bee6b756be50dc009c0c708f5181ffaf;hpb=cb1d2f74b370c16357af975a136e687fba3303e6;p=netconf.git diff --git a/restconf/restconf-nb-bierman02/src/main/java/org/opendaylight/netconf/sal/restconf/impl/RestCodec.java b/restconf/restconf-nb-bierman02/src/main/java/org/opendaylight/netconf/sal/restconf/impl/RestCodec.java index 513060e7be..6cf6783036 100644 --- a/restconf/restconf-nb-bierman02/src/main/java/org/opendaylight/netconf/sal/restconf/impl/RestCodec.java +++ b/restconf/restconf-nb-bierman02/src/main/java/org/opendaylight/netconf/sal/restconf/impl/RestCodec.java @@ -14,7 +14,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Map.Entry; -import org.opendaylight.controller.md.sal.dom.api.DOMMountPoint; +import org.opendaylight.mdsal.dom.api.DOMMountPoint; import org.opendaylight.netconf.sal.rest.impl.StringModuleInstanceIdentifierCodec; import org.opendaylight.restconf.common.util.IdentityValuesDTO; import org.opendaylight.restconf.common.util.IdentityValuesDTO.IdentityValue; @@ -116,15 +116,12 @@ public final class RestCodec { } return typeAwarecodec.deserialize(String.valueOf(input)); } else { - LOG.debug("Codec for type \"" + this.type.getQName().getLocalName() - + "\" is not implemented yet."); + LOG.debug("Codec for type \"{}\" is not implemented yet.", type.getQName().getLocalName()); return null; } } } catch (final ClassCastException e) { // TODO remove this catch when everyone use codecs - LOG.error( - "ClassCastException was thrown when codec is invoked with parameter " + String.valueOf(input), - e); + LOG.error("ClassCastException was thrown when codec is invoked with parameter {}", input, e); return null; } } @@ -145,17 +142,12 @@ public final class RestCodec { if (typeAwarecodec != null) { return typeAwarecodec.serialize(input); } else { - if (LOG.isDebugEnabled()) { - LOG.debug("Codec for type \"" + this.type.getQName().getLocalName() - + "\" is not implemented yet."); - } + LOG.debug("Codec for type \"{}\" is not implemented yet.", type.getQName().getLocalName()); return null; } } } catch (final ClassCastException e) { // TODO remove this catch when everyone use codecs - LOG.error( - "ClassCastException was thrown when codec is invoked with parameter " + String.valueOf(input), - e); + LOG.error("ClassCastException was thrown when codec is invoked with parameter {}", input, e); return input; } } @@ -169,7 +161,7 @@ public final class RestCodec { private final DOMMountPoint mountPoint; private final ControllerContext controllerContext; - public IdentityrefCodecImpl(final DOMMountPoint mountPoint, ControllerContext controllerContext) { + public IdentityrefCodecImpl(final DOMMountPoint mountPoint, final ControllerContext controllerContext) { this.mountPoint = mountPoint; this.controllerContext = controllerContext; } @@ -232,7 +224,7 @@ public final class RestCodec { identityValue.setPredicates(predicates); } else if (pathArgument instanceof NodeWithValue && identityValue != null) { final List predicates = new ArrayList<>(); - final String value = String.valueOf(((NodeWithValue) pathArgument).getValue()); + final String value = String.valueOf(((NodeWithValue) pathArgument).getValue()); predicates.add(new Predicate(null, value)); identityValue.setPredicates(predicates); } @@ -350,7 +342,7 @@ public final class RestCodec { module = controllerContext.findModuleByNamespace(validNamespace); } if (module == null) { - LOG.info("Module for namespace " + validNamespace + " wasn't found."); + LOG.info("Module for namespace {} was not found.", validNamespace); return null; } return module;