X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=restconf%2Frestconf-nb%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Frestconf%2Fserver%2Fspi%2FApiPathNormalizer.java;h=d2841c43430f770fba5a4ceeb85a3786cdc8b593;hb=cab753c95c227ed8b1ac216f535b6ff34892603c;hp=3a7acd415ee7d1f1687d2b0c92b28eafafcfcded;hpb=384ec6109e2cf811ec68915bf1eaf43031a5d8df;p=netconf.git diff --git a/restconf/restconf-nb/src/main/java/org/opendaylight/restconf/server/spi/ApiPathNormalizer.java b/restconf/restconf-nb/src/main/java/org/opendaylight/restconf/server/spi/ApiPathNormalizer.java index 3a7acd415e..d2841c4343 100644 --- a/restconf/restconf-nb/src/main/java/org/opendaylight/restconf/server/spi/ApiPathNormalizer.java +++ b/restconf/restconf-nb/src/main/java/org/opendaylight/restconf/server/spi/ApiPathNormalizer.java @@ -22,6 +22,7 @@ import org.opendaylight.restconf.api.ApiPath.ListInstance; import org.opendaylight.restconf.common.errors.RestconfDocumentedException; import org.opendaylight.restconf.nb.rfc8040.Insert.PointNormalizer; import org.opendaylight.restconf.server.api.DatabindContext; +import org.opendaylight.restconf.server.spi.ApiPathNormalizer.Path.Action; import org.opendaylight.restconf.server.spi.ApiPathNormalizer.Path.Data; import org.opendaylight.restconf.server.spi.ApiPathNormalizer.Path.Rpc; import org.opendaylight.yangtools.yang.common.ErrorTag; @@ -232,7 +233,7 @@ public final class ApiPathNormalizer implements PointNormalizer { final var stack = SchemaInferenceStack.of(modelContext); final var stmt = stack.enterSchemaTree(rpc.argument()); verify(rpc.equals(stmt), "Expecting %s, inferred %s", rpc, stmt); - return new OperationPath.Rpc(stack.toInference(), rpc); + return new Rpc(stack.toInference(), rpc); } final var stack = SchemaInferenceStack.of(modelContext); @@ -259,7 +260,7 @@ public final class ApiPathNormalizer implements PointNormalizer { final var actionStmt = action.asEffectiveStatement(); verify(actionStmt.equals(stmt), "Expecting %s, inferred %s", actionStmt, stmt); - return new OperationPath.Action(stack.toInference(), YangInstanceIdentifier.of(path), actionStmt); + return new Action(stack.toInference(), YangInstanceIdentifier.of(path), actionStmt); } } @@ -386,7 +387,7 @@ public final class ApiPathNormalizer implements PointNormalizer { if (path instanceof Data dataPath) { return dataPath; } - if (path instanceof OperationPath.Action actionPath) { + if (path instanceof Action actionPath) { return actionPath; } throw new RestconfDocumentedException("Unexpected path " + path, ErrorType.PROTOCOL, ErrorTag.DATA_MISSING);