Cleanup FieldsParam
[netconf.git] / restconf / restconf-nb-rfc8040 / src / main / java / org / opendaylight / restconf / nb / rfc8040 / FieldsParameterParser.java
index 177c23222b8a9b1c45c641156f40f9eae6629068..45ea6b6d1ae5c7b9edaacf41d610243a8ad8565c 100644 (file)
@@ -66,7 +66,7 @@ final class FieldsParameterParser {
     // parsers instead of ten.
     private Deque<NodeSelectorParser> parsers;
 
-    @NonNull ImmutableList<NodeSelector> parseNodeSelectors(final String str) throws ParseException {
+    @NonNull FieldsParam parse(final String str) throws ParseException {
         final var nodeSelectors = ImmutableList.<NodeSelector>builder();
 
         int idx = 0;
@@ -77,7 +77,7 @@ final class FieldsParameterParser {
 
             if (next == str.length()) {
                 // We have reached the end, we are done
-                return nodeSelectors.build();
+                return new FieldsParam(nodeSelectors.build());
             }
 
             final char ch = str.charAt(next);