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;
}
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;
}
}
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;
}
}
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;
}
identityValue.setPredicates(predicates);
} else if (pathArgument instanceof NodeWithValue && identityValue != null) {
final List<Predicate> 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);
}
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;