X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=restconf%2Fsal-rest-connector%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fnetconf%2Fsal%2Frestconf%2Fimpl%2FRestCodec.java;fp=restconf%2Fsal-rest-connector%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fnetconf%2Fsal%2Frestconf%2Fimpl%2FRestCodec.java;h=0202b722cc5d29cb1d78a468a0ce66751f09742a;hb=e0460d542f7088c543e51fd01917b3d360a1c1e2;hp=0518de3f8f75107ebbb63f223eab21a077616427;hpb=655343960ef1849c9ce50c210a964cf3a211b97c;p=netconf.git diff --git a/restconf/sal-rest-connector/src/main/java/org/opendaylight/netconf/sal/restconf/impl/RestCodec.java b/restconf/sal-rest-connector/src/main/java/org/opendaylight/netconf/sal/restconf/impl/RestCodec.java index 0518de3f8f..0202b722cc 100644 --- a/restconf/sal-rest-connector/src/main/java/org/opendaylight/netconf/sal/restconf/impl/RestCodec.java +++ b/restconf/sal-rest-connector/src/main/java/org/opendaylight/netconf/sal/restconf/impl/RestCodec.java @@ -212,11 +212,11 @@ public class RestCodec { final IdentityValuesDTO identityValuesDTO = new IdentityValuesDTO(); for (final PathArgument pathArgument : data.getPathArguments()) { final IdentityValue identityValue = qNameToIdentityValue(pathArgument.getNodeType()); - if ((pathArgument instanceof NodeIdentifierWithPredicates) && (identityValue != null)) { + if (pathArgument instanceof NodeIdentifierWithPredicates && identityValue != null) { final List predicates = keyValuesToPredicateList(((NodeIdentifierWithPredicates) pathArgument).getKeyValues()); identityValue.setPredicates(predicates); - } else if ((pathArgument instanceof NodeWithValue) && (identityValue != null)) { + } else if (pathArgument instanceof NodeWithValue && identityValue != null) { final List predicates = new ArrayList<>(); final String value = String.valueOf(((NodeWithValue) pathArgument).getValue()); predicates.add(new Predicate(null, value)); @@ -266,7 +266,7 @@ public class RestCodec { String.valueOf(identityValue.getValue())); return null; } - pathArgument = new NodeWithValue(qName, leafListPredicate.getValue()); + pathArgument = new NodeWithValue<>(qName, leafListPredicate.getValue()); } else if (node instanceof ListSchemaNode) { // predicates are keys of list final DataNodeContainer listNode = (DataNodeContainer) node; final Map predicatesMap = new HashMap<>(); @@ -286,7 +286,7 @@ public class RestCodec { } } result.add(pathArgument); - if (i < (identities.size() - 1)) { // last element in instance-identifier can be other than + if (i < identities.size() - 1) { // last element in instance-identifier can be other than // DataNodeContainer if (node instanceof DataNodeContainer) { parentContainer = (DataNodeContainer) node;