@@ -89,6 +89,7 @@ public static CssTokens lex(String css) {
89
89
}
90
90
91
91
/** A cursor into a list of tokens. */
92
+ @ SuppressWarnings ("synthetic-access" )
92
93
public final class TokenIterator implements Iterator <String > {
93
94
private int tokenIndex = 0 ;
94
95
private final int limit ;
@@ -152,8 +153,8 @@ public TokenType type() {
152
153
return tokenTypes [tokenIndex ];
153
154
}
154
155
155
- public void seek (int tokenIndex ) {
156
- this .tokenIndex = tokenIndex ;
156
+ public void seek (int newTokenIndex ) {
157
+ this .tokenIndex = newTokenIndex ;
157
158
}
158
159
159
160
public void advance () {
@@ -249,7 +250,7 @@ static final class Brackets {
249
250
*/
250
251
private final int [] brackets ;
251
252
252
- private Brackets (int [] brackets ) {
253
+ Brackets (int [] brackets ) {
253
254
this .brackets = brackets ;
254
255
}
255
256
@@ -290,6 +291,7 @@ int bracketIndexForToken(int target) {
290
291
/**
291
292
* Tokenizes according to section 4 of http://dev.w3.org/csswg/css-syntax/
292
293
*/
294
+ @ SuppressWarnings ("synthetic-access" )
293
295
private static final class Lexer {
294
296
private final String css ;
295
297
private final StringBuilder sb ;
@@ -427,7 +429,9 @@ void lex() {
427
429
428
430
tokenTypes = new ArrayList <TokenType >();
429
431
432
+ @ SuppressWarnings ("hiding" ) // final
430
433
String css = this .css ;
434
+ @ SuppressWarnings ("hiding" ) // final
431
435
int cssLimit = this .cssLimit ;
432
436
while (pos < cssLimit ) {
433
437
assert this .tokenBreaksLimit == this .tokenTypes .size ()
@@ -687,7 +691,9 @@ private void consumeDelim(char ch) {
687
691
}
688
692
689
693
private boolean consumeIgnorable () {
694
+ @ SuppressWarnings ("hiding" ) // final
690
695
String css = this .css ;
696
+ @ SuppressWarnings ("hiding" ) // final
691
697
int cssLimit = this .cssLimit ;
692
698
int posBefore = pos ;
693
699
while (pos < cssLimit ) {
@@ -772,6 +778,7 @@ private void consumeMatch(char ch) {
772
778
}
773
779
774
780
private void consumeIdent (boolean allowFirstDigit ) {
781
+ @ SuppressWarnings ("hiding" ) // final
775
782
int cssLimit = this .cssLimit ;
776
783
int last = -1 , nCodepoints = 0 ;
777
784
int sbAtStart = sb .length ();
@@ -824,7 +831,9 @@ private boolean consumeAtKeyword() {
824
831
825
832
826
833
private int consumeAndDecodeEscapeSequence () {
834
+ @ SuppressWarnings ("hiding" ) // final
827
835
String css = this .css ;
836
+ @ SuppressWarnings ("hiding" ) // final
828
837
int cssLimit = this .cssLimit ;
829
838
assert css .charAt (pos ) == '\\' ;
830
839
if (pos + 1 >= cssLimit ) { return -1 ; }
@@ -907,7 +916,9 @@ private void encodeCharOntoOutput(int codepoint, int last) {
907
916
}
908
917
909
918
private TokenType consumeNumberOrPercentageOrDimension () {
919
+ @ SuppressWarnings ("hiding" ) // final
910
920
String css = this .css ;
921
+ @ SuppressWarnings ("hiding" ) // final
911
922
int cssLimit = this .cssLimit ;
912
923
boolean isZero = true ;
913
924
int intStart = pos ;
@@ -1057,7 +1068,9 @@ private TokenType consumeNumberOrPercentageOrDimension() {
1057
1068
}
1058
1069
1059
1070
private TokenType consumeString () {
1071
+ @ SuppressWarnings ("hiding" ) // final
1060
1072
String css = this .css ;
1073
+ @ SuppressWarnings ("hiding" ) // final
1061
1074
int cssLimit = this .cssLimit ;
1062
1075
1063
1076
char delim = css .charAt (pos );
@@ -1129,7 +1142,9 @@ private TokenType consumeString() {
1129
1142
}
1130
1143
1131
1144
private boolean consumeUnicodeRange () {
1145
+ @ SuppressWarnings ("hiding" ) // final
1132
1146
final String css = this .css ;
1147
+ @ SuppressWarnings ("hiding" ) // final
1133
1148
final int cssLimit = this .cssLimit ;
1134
1149
1135
1150
assert pos < cssLimit && (css .charAt (pos ) | 32 ) == 'u' ;
@@ -1246,7 +1261,9 @@ private boolean consumeUnicodeRange() {
1246
1261
}
1247
1262
1248
1263
private boolean consumeUrlValue () {
1264
+ @ SuppressWarnings ("hiding" ) // final
1249
1265
String css = this .css ;
1266
+ @ SuppressWarnings ("hiding" ) // final
1250
1267
int cssLimit = this .cssLimit ;
1251
1268
if (pos == cssLimit || css .charAt (pos ) != '(' ) { return false ; }
1252
1269
++pos ;
@@ -1355,6 +1372,7 @@ private boolean consumeUrlValue() {
1355
1372
* unit.
1356
1373
*/
1357
1374
private int readCodepoint () {
1375
+ @ SuppressWarnings ("hiding" ) // final
1358
1376
String css = this .css ;
1359
1377
char ch = css .charAt (pos );
1360
1378
if (Character .isHighSurrogate (ch ) && pos + 1 < cssLimit ) {
0 commit comments