src/share/classes/javax/swing/text/html/parser/Parser.java
Print this page
*** 850,859 ****
--- 850,860 ----
case 'S': case 'T': case 'U': case 'V': case 'W': case 'X':
case 'Y': case 'Z':
if (lower) {
ch = 'a' + (ch - 'A');
}
+ break;
case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':
case 'g': case 'h': case 'i': case 'j': case 'k': case 'l':
case 'm': case 'n': case 'o': case 'p': case 'q': case 'r':
case 's': case 't': case 'u': case 'v': case 'w': case 'x':
*** 874,883 ****
--- 875,885 ----
case 'S': case 'T': case 'U': case 'V': case 'W': case 'X':
case 'Y': case 'Z':
if (lower) {
ch = 'a' + (ch - 'A');
}
+ break;
case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':
case 'g': case 'h': case 'i': case 'j': case 'k': case 'l':
case 'm': case 'n': case 'o': case 'p': case 'q': case 'r':
case 's': case 't': case 'u': case 'v': case 'w': case 'x':
*** 1212,1221 ****
--- 1214,1224 ----
}
/**
* Parse attribute value. [33] 331:1
*/
+ @SuppressWarnings("fallthrough")
String parseAttributeValue(boolean lower) throws IOException {
int delim = -1;
// Check for a delimiter
switch(ch) {
*** 1256,1265 ****
--- 1259,1269 ----
break;
case '\t':
if (delim < 0)
c = ' ';
+ // Fall through ?
case ' ':
ch = readCh();
if (delim < 0) {
return getString(0);
}
*** 1557,1566 ****
--- 1561,1571 ----
}
/**
* Parse a start or end tag.
*/
+ @SuppressWarnings("fallthrough")
void parseTag() throws IOException {
Element elem;
boolean net = false;
boolean warned = false;
boolean unknown = false;
*** 1600,1609 ****
--- 1605,1615 ----
switch (ch) {
case '-':
continue;
case '>':
ch = readCh();
+ // Fall through okay?
case -1:
return;
default:
ch = readCh();
if (!warned) {
*** 1624,1633 ****
--- 1630,1640 ----
return;
}
switch(ch) {
case '>':
ch = readCh();
+ // Fall through okay?
case -1:
error("invalid.markup");
return;
case '\n':
ln++;
*** 1655,1664 ****
--- 1662,1672 ----
case '/':
// parse end tag [19] 317:4
switch (ch = readCh()) {
case '>':
ch = readCh();
+ // Fall through okay?
case '<':
// empty end tag. either </> or </<
if (recent == null) {
error("invalid.shortend");
return;
*** 1673,1682 ****
--- 1681,1691 ----
}
skipSpace();
switch (ch) {
case '>':
ch = readCh();
+ // Fall through okay?
case '<':
break;
default:
error("expected", "'>'");
*** 1873,1882 ****
--- 1882,1892 ----
parseAttributeSpecificationList(elem);
switch (ch) {
case '/':
net = true;
+ // Fall through okay?
case '>':
ch = readCh();
if (ch == '>' && net) {
ch = readCh();
}