@@ -89,6 +89,7 @@ public static CssTokens lex(String css) {
8989 }
9090
9191 /** A cursor into a list of tokens. */
92+ @ SuppressWarnings ("synthetic-access" )
9293 public final class TokenIterator implements Iterator <String > {
9394 private int tokenIndex = 0 ;
9495 private final int limit ;
@@ -152,8 +153,8 @@ public TokenType type() {
152153 return tokenTypes [tokenIndex ];
153154 }
154155
155- public void seek (int tokenIndex ) {
156- this .tokenIndex = tokenIndex ;
156+ public void seek (int newTokenIndex ) {
157+ this .tokenIndex = newTokenIndex ;
157158 }
158159
159160 public void advance () {
@@ -249,7 +250,7 @@ static final class Brackets {
249250 */
250251 private final int [] brackets ;
251252
252- private Brackets (int [] brackets ) {
253+ Brackets (int [] brackets ) {
253254 this .brackets = brackets ;
254255 }
255256
@@ -290,6 +291,7 @@ int bracketIndexForToken(int target) {
290291 /**
291292 * Tokenizes according to section 4 of http://dev.w3.org/csswg/css-syntax/
292293 */
294+ @ SuppressWarnings ("synthetic-access" )
293295 private static final class Lexer {
294296 private final String css ;
295297 private final StringBuilder sb ;
@@ -427,7 +429,9 @@ void lex() {
427429
428430 tokenTypes = new ArrayList <TokenType >();
429431
432+ @ SuppressWarnings ("hiding" ) // final
430433 String css = this .css ;
434+ @ SuppressWarnings ("hiding" ) // final
431435 int cssLimit = this .cssLimit ;
432436 while (pos < cssLimit ) {
433437 assert this .tokenBreaksLimit == this .tokenTypes .size ()
@@ -687,7 +691,9 @@ private void consumeDelim(char ch) {
687691 }
688692
689693 private boolean consumeIgnorable () {
694+ @ SuppressWarnings ("hiding" ) // final
690695 String css = this .css ;
696+ @ SuppressWarnings ("hiding" ) // final
691697 int cssLimit = this .cssLimit ;
692698 int posBefore = pos ;
693699 while (pos < cssLimit ) {
@@ -772,6 +778,7 @@ private void consumeMatch(char ch) {
772778 }
773779
774780 private void consumeIdent (boolean allowFirstDigit ) {
781+ @ SuppressWarnings ("hiding" ) // final
775782 int cssLimit = this .cssLimit ;
776783 int last = -1 , nCodepoints = 0 ;
777784 int sbAtStart = sb .length ();
@@ -824,7 +831,9 @@ private boolean consumeAtKeyword() {
824831
825832
826833 private int consumeAndDecodeEscapeSequence () {
834+ @ SuppressWarnings ("hiding" ) // final
827835 String css = this .css ;
836+ @ SuppressWarnings ("hiding" ) // final
828837 int cssLimit = this .cssLimit ;
829838 assert css .charAt (pos ) == '\\' ;
830839 if (pos + 1 >= cssLimit ) { return -1 ; }
@@ -907,7 +916,9 @@ private void encodeCharOntoOutput(int codepoint, int last) {
907916 }
908917
909918 private TokenType consumeNumberOrPercentageOrDimension () {
919+ @ SuppressWarnings ("hiding" ) // final
910920 String css = this .css ;
921+ @ SuppressWarnings ("hiding" ) // final
911922 int cssLimit = this .cssLimit ;
912923 boolean isZero = true ;
913924 int intStart = pos ;
@@ -1057,7 +1068,9 @@ private TokenType consumeNumberOrPercentageOrDimension() {
10571068 }
10581069
10591070 private TokenType consumeString () {
1071+ @ SuppressWarnings ("hiding" ) // final
10601072 String css = this .css ;
1073+ @ SuppressWarnings ("hiding" ) // final
10611074 int cssLimit = this .cssLimit ;
10621075
10631076 char delim = css .charAt (pos );
@@ -1129,7 +1142,9 @@ private TokenType consumeString() {
11291142 }
11301143
11311144 private boolean consumeUnicodeRange () {
1145+ @ SuppressWarnings ("hiding" ) // final
11321146 final String css = this .css ;
1147+ @ SuppressWarnings ("hiding" ) // final
11331148 final int cssLimit = this .cssLimit ;
11341149
11351150 assert pos < cssLimit && (css .charAt (pos ) | 32 ) == 'u' ;
@@ -1246,7 +1261,9 @@ private boolean consumeUnicodeRange() {
12461261 }
12471262
12481263 private boolean consumeUrlValue () {
1264+ @ SuppressWarnings ("hiding" ) // final
12491265 String css = this .css ;
1266+ @ SuppressWarnings ("hiding" ) // final
12501267 int cssLimit = this .cssLimit ;
12511268 if (pos == cssLimit || css .charAt (pos ) != '(' ) { return false ; }
12521269 ++pos ;
@@ -1355,6 +1372,7 @@ private boolean consumeUrlValue() {
13551372 * unit.
13561373 */
13571374 private int readCodepoint () {
1375+ @ SuppressWarnings ("hiding" ) // final
13581376 String css = this .css ;
13591377 char ch = css .charAt (pos );
13601378 if (Character .isHighSurrogate (ch ) && pos + 1 < cssLimit ) {
0 commit comments