X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=restconf%2Frestconf-nb-rfc8040%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Frestconf%2Fnb%2Frfc8040%2FFieldsParameterParser.java;h=56e74666756cee2557eeaaea648585017f13c62d;hb=06cf350c94b3b35605be4cdd125fb66a5cae2af7;hp=1f98e429bec0150fdc77c235b2863420c4b3d5d2;hpb=d7dd4861ce51eebae8423eda4197bd66a34254c3;p=netconf.git diff --git a/restconf/restconf-nb-rfc8040/src/main/java/org/opendaylight/restconf/nb/rfc8040/FieldsParameterParser.java b/restconf/restconf-nb-rfc8040/src/main/java/org/opendaylight/restconf/nb/rfc8040/FieldsParameterParser.java index 1f98e429be..56e7466675 100644 --- a/restconf/restconf-nb-rfc8040/src/main/java/org/opendaylight/restconf/nb/rfc8040/FieldsParameterParser.java +++ b/restconf/restconf-nb-rfc8040/src/main/java/org/opendaylight/restconf/nb/rfc8040/FieldsParameterParser.java @@ -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: *
  *    fields-expr = path "(" fields-expr ")" / path ";" fields-expr / path
  *    path = api-identifier [ "/" path ]
@@ -55,7 +54,7 @@ import org.opendaylight.yangtools.yang.common.YangNames;
  * 
* *

- * 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 parsers; - @NonNull FieldsParameter parse(final String str) throws ParseException { + @NonNull FieldsParam parse(final String str) throws ParseException { final var nodeSelectors = ImmutableList.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);