@@ -52,21 +52,23 @@ public class WstxInputData
52
52
*/
53
53
public final static int MAX_UNICODE_CHAR = 0x10FFFF ;
54
54
55
- private static final boolean [] asciiNameStartChars = new boolean [128 ];
55
+ // @since 7.1.1
56
+ private static final boolean [] ASCII_NAME_START_CHARS = new boolean [128 ];
56
57
static {
57
- IntStream .rangeClosed ('a' , 'z' ).forEach (i -> asciiNameStartChars [i ] = true );
58
- IntStream .rangeClosed ('A' , 'Z' ).forEach (i -> asciiNameStartChars [i ] = true );
59
- asciiNameStartChars ['_' ] = true ;
58
+ IntStream .rangeClosed ('a' , 'z' ).forEach (i -> ASCII_NAME_START_CHARS [i ] = true );
59
+ IntStream .rangeClosed ('A' , 'Z' ).forEach (i -> ASCII_NAME_START_CHARS [i ] = true );
60
+ ASCII_NAME_START_CHARS ['_' ] = true ;
60
61
}
61
62
62
- private static final boolean [] asciiNameChars = new boolean [128 ];
63
+ // @since 7.1.1
64
+ private static final boolean [] ASCII_NAME_CHARS = new boolean [128 ];
63
65
static {
64
- IntStream .rangeClosed ('a' , 'z' ).forEach (i -> asciiNameChars [i ] = true );
65
- IntStream .rangeClosed ('A' , 'Z' ).forEach (i -> asciiNameChars [i ] = true );
66
- IntStream .rangeClosed ('0' , '9' ).forEach (i -> asciiNameChars [i ] = true );
67
- asciiNameChars ['.' ] = true ;
68
- asciiNameChars ['-' ] = true ;
69
- asciiNameChars ['_' ] = true ;
66
+ IntStream .rangeClosed ('a' , 'z' ).forEach (i -> ASCII_NAME_CHARS [i ] = true );
67
+ IntStream .rangeClosed ('A' , 'Z' ).forEach (i -> ASCII_NAME_CHARS [i ] = true );
68
+ IntStream .rangeClosed ('0' , '9' ).forEach (i -> ASCII_NAME_CHARS [i ] = true );
69
+ ASCII_NAME_CHARS ['.' ] = true ;
70
+ ASCII_NAME_CHARS ['-' ] = true ;
71
+ ASCII_NAME_CHARS ['_' ] = true ;
70
72
}
71
73
72
74
/*
@@ -174,7 +176,7 @@ protected final boolean isNameStartChar(char c)
174
176
*/
175
177
if (c < 128 ) {
176
178
// this is performance critical, so we use a lookup table instead of if-branches
177
- return asciiNameStartChars [c ];
179
+ return ASCII_NAME_START_CHARS [c ];
178
180
}
179
181
/* Ok, otherwise need to use a big honking bit sets... which
180
182
* differ between 1.0 and 1.1
@@ -194,7 +196,7 @@ protected final boolean isNameChar(char c)
194
196
// First, let's handle 7-bit ascii range
195
197
if (c < 128 ) {
196
198
// this is performance critical, so we use a lookup table instead of if-branches
197
- return asciiNameChars [c ];
199
+ return ASCII_NAME_CHARS [c ];
198
200
}
199
201
return mXml11 ? XmlChars .is11NameChar (c ) : XmlChars .is10NameChar (c );
200
202
}
0 commit comments