Eliminate ParserIdentifier.stringFromYangInstanceIdentifier()
[netconf.git] / restconf / restconf-nb-rfc8040 / src / main / java / org / opendaylight / restconf / nb / rfc8040 / rests / utils / PostDataTransactionUtil.java
index bdb37a0524da69bfe9486ad4433f715c3f691e6a..8d3aaf0757b69cef67dbb623e0c9e687b4923f5d 100644 (file)
@@ -23,6 +23,7 @@ import org.opendaylight.restconf.common.errors.RestconfDocumentedException;
 import org.opendaylight.restconf.nb.rfc8040.rests.transactions.RestconfStrategy;
 import org.opendaylight.restconf.nb.rfc8040.rests.transactions.RestconfTransaction;
 import org.opendaylight.restconf.nb.rfc8040.rests.utils.RestconfDataServiceConstant.PostPutQueryParameters.Insert;
+import org.opendaylight.restconf.nb.rfc8040.utils.parser.IdentifierCodec;
 import org.opendaylight.restconf.nb.rfc8040.utils.parser.ParserIdentifier;
 import org.opendaylight.yangtools.yang.common.ErrorTag;
 import org.opendaylight.yangtools.yang.common.ErrorType;
@@ -204,10 +205,7 @@ public final class PostDataTransactionUtil {
             }
         }
 
-        return uriInfo.getBaseUriBuilder()
-                .path("data")
-                .path(ParserIdentifier.stringFromYangInstanceIdentifier(path, schemaContext))
-                .build();
+        return uriInfo.getBaseUriBuilder().path("data").path(IdentifierCodec.serialize(path, schemaContext)).build();
     }
 
     /**