4040
4141import static org .owasp .html .CssTokens .TokenType .*;
4242
43+ @ SuppressWarnings ({ "javadoc" })
4344public class CssTokensTest extends TestCase {
4445
4546 private static CssTokens lex (String s ) {
@@ -81,15 +82,15 @@ public static final void testBracketIndices() {
8182 }
8283
8384 @ Test
84- public static final void testStringEscaping () throws Exception {
85+ public static final void testStringEscaping () {
8586 // input golden
8687 String [] tests = {
8788 "''" , "''" ,
8889 "\" \" " , "''" ,
8990 "\" \\ a\" " , "'\\ a'" ,
9091 "\" \\ 0d\\ 0a\" " , "'\\ d\\ a'" ,
9192 "'\\ 000000d'" , "'\\ 0 d'" , // too many hex digits
92- "'\\ 1fffff'" , "'\ufffd '" , // exceeeds max codepoint
93+ "'\\ 1fffff'" , "'\ufffd '" , // exceeds max codepoint
9394 "\" '\" " , "'\\ 27'" ,
9495 "\" \\ \" \" " , "'\\ 22'" ,
9596 "'\\ \\ '" , "'\\ \\ '" ,
@@ -128,7 +129,7 @@ public static final void testStringEscaping() throws Exception {
128129 }
129130
130131 @ Test
131- public static final void testComments () throws Exception {
132+ public static final void testComments () {
132133 assertEquals (
133134 "a b c d e f g h" ,
134135 lex (
@@ -137,12 +138,12 @@ public static final void testComments() throws Exception {
137138 }
138139
139140 @ Test
140- public static final void testNonCommentSlash () throws Exception {
141+ public static final void testNonCommentSlash () {
141142 assertEquals ("foo/ bar/" , lex ("foo/bar/" ).normalizedCss );
142143 }
143144
144145 @ Test
145- public static final void testCdoCdc () throws Exception {
146+ public static final void testCdoCdc () {
146147 assertEquals (
147148 "|| and are ignorable||" ,
148149 lex ("||<!-- and --> are ignorable||" ).normalizedCss );
@@ -152,7 +153,7 @@ public static final void testCdoCdc() throws Exception {
152153 }
153154
154155 @ Test
155- public static final void testIdentReencoding () throws Exception {
156+ public static final void testIdentReencoding () {
156157 // input golden
157158 String [] tests = {
158159 "\\ " , null ,
@@ -222,12 +223,12 @@ public static final void testIdentReencoding() throws Exception {
222223 }
223224
224225 @ Test
225- public static final void testOrphanedCloseBrackets () throws Exception {
226+ public static final void testOrphanedCloseBrackets () {
226227 assertEquals ("{foo bar}" , lex ("{foo]bar" ).normalizedCss );
227228 }
228229
229230 @ Test
230- public static final void testAtDirectives () throws Exception {
231+ public static final void testAtDirectives () {
231232 assertTokens (
232233 "@import \" foo/bar\" ; @ at, @34" ,
233234 "@import:AT" , " " , "'foo/bar':STRING" , ";:SEMICOLON" ,
@@ -236,7 +237,7 @@ public static final void testAtDirectives() throws Exception {
236237 }
237238
238239 @ Test
239- public static final void testHash () throws Exception {
240+ public static final void testHash () {
240241 assertTokens (
241242 "#fff #foo #-moz-foo #abcd #abcdef #012f34 #888 #42foo # #" ,
242243 "#fff:HASH_UNRESTRICTED" , " " ,
@@ -251,7 +252,7 @@ public static final void testHash() throws Exception {
251252 }
252253
253254 @ Test
254- public static final void testSignsAndDots () throws Exception {
255+ public static final void testSignsAndDots () {
255256 assertTokens (
256257 "- . + +1 + 1 (1 + 1)--> .5 -.5 +.5 ++.5 .foo -" ,
257258 "-:IDENT" , " " , ".:DELIM" , " " , "+:DELIM" , " " , "1:NUMBER" , " " ,
@@ -262,7 +263,7 @@ public static final void testSignsAndDots() throws Exception {
262263 // TODO: is a single "-" an IDENT or a DELIM? "--"? "---"?
263264 }
264265
265- public static final void testMultiCharPunctuation () throws Exception {
266+ public static final void testMultiCharPunctuation () {
266267 assertTokens (
267268 "|| ~= === |= =^= $= *= = : % & ~" ,
268269 "||:COLUMN" , " " , "~=:MATCH" , " " , "=:DELIM" , "=:DELIM" , "=:DELIM" , " " ,
@@ -272,13 +273,13 @@ public static final void testMultiCharPunctuation() throws Exception {
272273 }
273274
274275 @ Test
275- public static final void testNul () throws Exception {
276+ public static final void testNul () {
276277 assertTokens ("\u0000 " );
277278 assertTokens ("\u0000 x\u0000 " , "x:IDENT" );
278279 }
279280
280281 @ Test
281- public static final void testNumbers () throws Exception {
282+ public static final void testNumbers () {
282283 assertTokens (
283284 "0 -0 +0 0.0 -0.0 -.0 0e12 0e-12 0e+12" ,
284285 "0:NUMBER" , " " ,
@@ -314,7 +315,7 @@ public static final void testNumbers() throws Exception {
314315 }
315316
316317 @ Test
317- public static final void testUrls () throws Exception {
318+ public static final void testUrls () {
318319 assertTokens (
319320 "url() url('..')url( \" foo\" ) URL( f\" /(bar'\\ \\ baz ) url('foo \\ a b')"
320321 + "Url( \u0080 \u1234 \ud801 \udc02 \\ 110000)" ,
@@ -328,7 +329,7 @@ public static final void testUrls() throws Exception {
328329 }
329330
330331 @ Test
331- public static final void testFunctions () throws Exception {
332+ public static final void testFunctions () {
332333 assertTokens ("( rgb(0,0,0) rgba(0,50%,0,100%)" ,
333334 "(:LEFT_PAREN" ,
334335 " " ,
0 commit comments