@@ -39,55 +39,55 @@ public abstract class AbstractCSSParser {
3939 private CSSErrorHandler errorHandler_ ;
4040 private InputSource source_ ;
4141
42- private static final HashMap <String , String > parserMessages_ = new HashMap <>();
42+ private static final HashMap <String , String > PARSER_MESSAGES_ = new HashMap <>();
4343
4444 static {
45- parserMessages_ .put ("invalidExpectingOne" , "Invalid token \" {0}\" . Was expecting: {1}." );
46- parserMessages_ .put ("invalidExpectingMore" , "Invalid token \" {0}\" . Was expecting one of: {1}." );
47- parserMessages_ .put ("invalidColor" , "Invalid color \" {0}\" ." );
48- parserMessages_ .put ("invalidStyleSheet" , "Error in style sheet." );
49- parserMessages_ .put ("invalidRule" , "Error in rule." );
50- parserMessages_ .put ("invalidUnknownRule" , "Error in unknown at-rule." );
51- parserMessages_ .put ("invalidCharsetRule" , "Error in @charset rule." );
52- parserMessages_ .put ("misplacedCharsetRule" , "The @charset must be the first element in the style sheet." );
53- parserMessages_ .put ("invalidImportRule" , "Error in @import rule." );
54- parserMessages_ .put ("invalidImportRuleIgnored" , "@import rule must occur before all other rules." );
55- parserMessages_ .put ("invalidImportRuleIgnored2" ,
45+ PARSER_MESSAGES_ .put ("invalidExpectingOne" , "Invalid token \" {0}\" . Was expecting: {1}." );
46+ PARSER_MESSAGES_ .put ("invalidExpectingMore" , "Invalid token \" {0}\" . Was expecting one of: {1}." );
47+ PARSER_MESSAGES_ .put ("invalidColor" , "Invalid color \" {0}\" ." );
48+ PARSER_MESSAGES_ .put ("invalidStyleSheet" , "Error in style sheet." );
49+ PARSER_MESSAGES_ .put ("invalidRule" , "Error in rule." );
50+ PARSER_MESSAGES_ .put ("invalidUnknownRule" , "Error in unknown at-rule." );
51+ PARSER_MESSAGES_ .put ("invalidCharsetRule" , "Error in @charset rule." );
52+ PARSER_MESSAGES_ .put ("misplacedCharsetRule" , "The @charset must be the first element in the style sheet." );
53+ PARSER_MESSAGES_ .put ("invalidImportRule" , "Error in @import rule." );
54+ PARSER_MESSAGES_ .put ("invalidImportRuleIgnored" , "@import rule must occur before all other rules." );
55+ PARSER_MESSAGES_ .put ("invalidImportRuleIgnored2" ,
5656 "@import rule must occur before all other rules, except the @charset rule." );
57- parserMessages_ .put ("invalidPageRule" , "Error in @page rule." );
58- parserMessages_ .put ("invalidFontFaceRule" , "Error in @font-face rule." );
59- parserMessages_ .put ("invalidMediaList" , "Error in media list." );
60- parserMessages_ .put ("invalidMediaRule" , "Error in @media rule." );
61- parserMessages_ .put ("invalidStyleRule" , "Error in style rule." );
62- parserMessages_ .put ("invalidStyleDeclaration" , "Error in style declaration." );
63- parserMessages_ .put ("invalidDeclaration" , "Error in declaration." );
64- parserMessages_ .put ("invalidDeclarationInvalidChar" , "Error in declaration; invalid character \" {0}\" found." );
65- parserMessages_ .put ("invalidDeclarationStarHack" ,
57+ PARSER_MESSAGES_ .put ("invalidPageRule" , "Error in @page rule." );
58+ PARSER_MESSAGES_ .put ("invalidFontFaceRule" , "Error in @font-face rule." );
59+ PARSER_MESSAGES_ .put ("invalidMediaList" , "Error in media list." );
60+ PARSER_MESSAGES_ .put ("invalidMediaRule" , "Error in @media rule." );
61+ PARSER_MESSAGES_ .put ("invalidStyleRule" , "Error in style rule." );
62+ PARSER_MESSAGES_ .put ("invalidStyleDeclaration" , "Error in style declaration." );
63+ PARSER_MESSAGES_ .put ("invalidDeclaration" , "Error in declaration." );
64+ PARSER_MESSAGES_ .put ("invalidDeclarationInvalidChar" , "Error in declaration; invalid character \" {0}\" found." );
65+ PARSER_MESSAGES_ .put ("invalidDeclarationStarHack" ,
6666 "Error in declaration. ''*'' is not allowed as first char of a property." );
67- parserMessages_ .put ("invalidSelectorList" , "Error in selector list." );
68- parserMessages_ .put ("invalidSelector" , "Error in selector." );
69- parserMessages_ .put ("invalidSimpleSelector" , "Error in simple selector." );
70- parserMessages_ .put ("invalidClassSelector" , "Error in class selector." );
71- parserMessages_ .put ("invalidElementName" , "Error in element name." );
72- parserMessages_ .put ("invalidAttrib" , "Error in attribute selector." );
73- parserMessages_ .put ("invalidPseudo" , "Error in pseudo class or element." );
74- parserMessages_ .put ("duplicatePseudo" , "Duplicate pseudo class \" :{0}\" or pseudo class \" :{0}\" not at end." );
75- parserMessages_ .put ("invalidHash" , "Error in hash." );
76- parserMessages_ .put ("invalidExpr" , "Error in expression." );
77- parserMessages_ .put ("invalidExprColon" , "Error in expression; '':'' found after identifier \" {0}\" ." );
78- parserMessages_ .put ("invalidPrio" , "Error in priority." );
79-
80- parserMessages_ .put ("invalidPagePseudoClass" ,
67+ PARSER_MESSAGES_ .put ("invalidSelectorList" , "Error in selector list." );
68+ PARSER_MESSAGES_ .put ("invalidSelector" , "Error in selector." );
69+ PARSER_MESSAGES_ .put ("invalidSimpleSelector" , "Error in simple selector." );
70+ PARSER_MESSAGES_ .put ("invalidClassSelector" , "Error in class selector." );
71+ PARSER_MESSAGES_ .put ("invalidElementName" , "Error in element name." );
72+ PARSER_MESSAGES_ .put ("invalidAttrib" , "Error in attribute selector." );
73+ PARSER_MESSAGES_ .put ("invalidPseudo" , "Error in pseudo class or element." );
74+ PARSER_MESSAGES_ .put ("duplicatePseudo" , "Duplicate pseudo class \" :{0}\" or pseudo class \" :{0}\" not at end." );
75+ PARSER_MESSAGES_ .put ("invalidHash" , "Error in hash." );
76+ PARSER_MESSAGES_ .put ("invalidExpr" , "Error in expression." );
77+ PARSER_MESSAGES_ .put ("invalidExprColon" , "Error in expression; '':'' found after identifier \" {0}\" ." );
78+ PARSER_MESSAGES_ .put ("invalidPrio" , "Error in priority." );
79+
80+ PARSER_MESSAGES_ .put ("invalidPagePseudoClass" ,
8181 "Invalid page pseudo class \" {0}\" ; valid values are \" blank\" , \" first\" , \" left\" , and \" right\" ." );
8282
83- parserMessages_ .put ("invalidCaseInSensitivelyIdentifier" ,
83+ PARSER_MESSAGES_ .put ("invalidCaseInSensitivelyIdentifier" ,
8484 "Invalid case-insensitively identifier \" {0}\" found; valid values are \" i\" , and \" s\" ." );
8585
86- parserMessages_ .put ("ignoringRule" , "Ignoring the whole rule." );
87- parserMessages_ .put ("ignoringFollowingDeclarations" , "Ignoring the following declarations in this rule." );
86+ PARSER_MESSAGES_ .put ("ignoringRule" , "Ignoring the whole rule." );
87+ PARSER_MESSAGES_ .put ("ignoringFollowingDeclarations" , "Ignoring the following declarations in this rule." );
8888
89- parserMessages_ .put ("tokenMgrError" , "Lexical error." );
90- parserMessages_ .put ("domException" , "DOM exception: ''{0}''" );
89+ PARSER_MESSAGES_ .put ("tokenMgrError" , "Lexical error." );
90+ PARSER_MESSAGES_ .put ("domException" , "DOM exception: ''{0}''" );
9191 }
9292
9393 private static final String NUM_CHARS = "0123456789." ;
@@ -169,7 +169,7 @@ protected InputSource getInputSource() {
169169 * @return the parser message
170170 */
171171 protected String getParserMessage (final String key ) {
172- final String msg = parserMessages_ .get (key );
172+ final String msg = PARSER_MESSAGES_ .get (key );
173173 if (msg == null ) {
174174 return "[[" + key + "]]" ;
175175 }
@@ -555,10 +555,10 @@ private static CharStream getCharStream(final InputSource source) throws IOExcep
555555
556556 /**
557557 * @return a string about which CSS language is supported by this
558- * parser. For CSS Level 1, it returns "http://www.w3.org/TR/REC-CSS1", for
559- * CSS Level 2, it returns "http://www.w3.org/TR/REC-CSS2". Note that a
560- * "CSSx" parser can return lexical unit other than those allowed by CSS
561- * Level x but this usage is not recommended.
558+ * parser. For CSS Level 1, it returns "http://www.w3.org/TR/REC-CSS1", for
559+ * CSS Level 2, it returns "http://www.w3.org/TR/REC-CSS2". Note that a
560+ * "CSSx" parser can return lexical unit other than those allowed by CSS
561+ * Level x but this usage is not recommended.
562562 */
563563 public abstract String getParserVersion ();
564564
0 commit comments