Remove RestCodec's identityref handling
[netconf.git] / restconf / restconf-nb-rfc8040 / src / main / java / org / opendaylight / restconf / nb / rfc8040 / FieldsParameterParser.java
index 1f98e429bec0150fdc77c235b2863420c4b3d5d2..56e74666756cee2557eeaaea648585017f13c62d 100644 (file)
@@ -8,7 +8,6 @@
 package org.opendaylight.restconf.nb.rfc8040;
 
 import com.google.common.collect.ImmutableList;
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 import java.text.ParseException;
 import java.util.ArrayDeque;
 import java.util.ArrayList;
@@ -16,12 +15,12 @@ import java.util.Deque;
 import java.util.List;
 import org.eclipse.jdt.annotation.NonNull;
 import org.opendaylight.restconf.nb.rfc8040.ApiPath.ApiIdentifier;
-import org.opendaylight.restconf.nb.rfc8040.FieldsParameter.NodeSelector;
+import org.opendaylight.restconf.nb.rfc8040.FieldsParam.NodeSelector;
 import org.opendaylight.yangtools.yang.common.YangNames;
 
 /**
- * Stateful parser for {@link FieldsParameter}. This is not as hard as IETF's ABNF would lead you to believe. The
- * original definition is:
+ * Stateful parser for {@link FieldsParam}. This is not as hard as IETF's ABNF would lead you to believe. The original
+ *  definition is:
  * <pre>
  *    fields-expr = path "(" fields-expr ")" / path ";" fields-expr / path
  *    path = api-identifier [ "/" path ]
@@ -55,7 +54,7 @@ import org.opendaylight.yangtools.yang.common.YangNames;
  * </pre>
  *
  * <p>
- * That ANTLR4 grammar dictates the layout of {@link FieldsParameter}. It also shows the parsing is recursive on
+ * That ANTLR4 grammar dictates the layout of {@link FieldsParam}. It also shows the parsing is recursive on
  * {@code node-selectors}, which is what {@link #parse(String)} and
  * {@link NodeSelectorParser#parseSubSelectors(String, int)} deal with.
  */
@@ -66,7 +65,7 @@ final class FieldsParameterParser {
     // parsers instead of ten.
     private Deque<NodeSelectorParser> parsers;
 
-    @NonNull FieldsParameter parse(final String str) throws ParseException {
+    @NonNull FieldsParam parse(final String str) throws ParseException {
         final var nodeSelectors = ImmutableList.<NodeSelector>builder();
 
         int idx = 0;
@@ -77,7 +76,7 @@ final class FieldsParameterParser {
 
             if (next == str.length()) {
                 // We have reached the end, we are done
-                return new FieldsParameter(nodeSelectors.build());
+                return new FieldsParam(nodeSelectors.build());
             }
 
             final char ch = str.charAt(next);
@@ -88,8 +87,6 @@ final class FieldsParameterParser {
         }
     }
 
-    @SuppressFBWarnings(value = "UPM_UNCALLED_PRIVATE_METHOD",
-        justification = "https://github.com/spotbugs/spotbugs/issues/811")
     private @NonNull NodeSelectorParser getParser() {
         final var local = parsers;
         if (local != null) {
@@ -101,8 +98,6 @@ final class FieldsParameterParser {
         return new NodeSelectorParser();
     }
 
-    @SuppressFBWarnings(value = "UPM_UNCALLED_PRIVATE_METHOD",
-        justification = "https://github.com/spotbugs/spotbugs/issues/811")
     private void putParser(final NodeSelectorParser parser) {
         var local = parsers;
         if (local == null) {
@@ -112,8 +107,6 @@ final class FieldsParameterParser {
         local.push(parser);
     }
 
-    @SuppressFBWarnings(value = "UPM_UNCALLED_PRIVATE_METHOD",
-        justification = "https://github.com/spotbugs/spotbugs/issues/811")
     private static void expectIdentifierStart(final String str, final int offset) throws ParseException {
         final char ch = charAt(str, offset);
         if (!YangNames.IDENTIFIER_START.matches(ch)) {
@@ -121,8 +114,6 @@ final class FieldsParameterParser {
         }
     }
 
-    @SuppressFBWarnings(value = "UPM_UNCALLED_PRIVATE_METHOD",
-        justification = "https://github.com/spotbugs/spotbugs/issues/811")
     private static char charAt(final String str, final int offset) throws ParseException {
         if (str.length() == offset) {
             throw new ParseException("Unexpected end of input", offset);