Expose ListInstance constructor 70/111170/2
authorRobert Varga <robert.varga@pantheon.tech>
Tue, 2 Apr 2024 07:45:19 +0000 (09:45 +0200)
committerRobert Varga <nite@hq.sk>
Tue, 2 Apr 2024 09:31:10 +0000 (09:31 +0000)
The only way to create a ListInstance is through parsing. Expose the
constructor so it can be externally instantiated, just like
ApiIdentifier.

JIRA: NETCONF-1264
Change-Id: I917b18266cc1acda5bc5c4108df228c368c4ff33
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
protocol/restconf-api/src/main/java/org/opendaylight/restconf/api/ApiPath.java

index 9c4c41c76676cf59117d2ba105d837d894d261bd..ce0d15f59852beadd8433e0120f3a7aa2c73c2d8 100644 (file)
@@ -114,7 +114,8 @@ public record ApiPath(ImmutableList<Step> steps) implements HierarchicalIdentifi
     public static final class ListInstance extends Step {
         private final ImmutableList<String> keyValues;
 
-        ListInstance(final @Nullable String module, final String identifier, final ImmutableList<String> keyValues) {
+        public ListInstance(final @Nullable String module, final String identifier,
+                final ImmutableList<String> keyValues) {
             super(module, identifier);
             this.keyValues = requireNonNull(keyValues);
         }