src/share/classes/javax/swing/text/html/parser/Parser.java
Print this page
@@ -850,10 +850,11 @@
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,10 +875,11 @@
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,10 +1214,11 @@
}
/**
* Parse attribute value. [33] 331:1
*/
+ @SuppressWarnings("fallthrough")
String parseAttributeValue(boolean lower) throws IOException {
int delim = -1;
// Check for a delimiter
switch(ch) {
@@ -1256,10 +1259,11 @@
break;
case '\t':
if (delim < 0)
c = ' ';
+ // Fall through ?
case ' ':
ch = readCh();
if (delim < 0) {
return getString(0);
}
@@ -1557,10 +1561,11 @@
}
/**
* Parse a start or end tag.
*/
+ @SuppressWarnings("fallthrough")
void parseTag() throws IOException {
Element elem;
boolean net = false;
boolean warned = false;
boolean unknown = false;
@@ -1600,10 +1605,11 @@
switch (ch) {
case '-':
continue;
case '>':
ch = readCh();
+ // Fall through okay?
case -1:
return;
default:
ch = readCh();
if (!warned) {
@@ -1624,10 +1630,11 @@
return;
}
switch(ch) {
case '>':
ch = readCh();
+ // Fall through okay?
case -1:
error("invalid.markup");
return;
case '\n':
ln++;
@@ -1655,10 +1662,11 @@
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,10 +1681,11 @@
}
skipSpace();
switch (ch) {
case '>':
ch = readCh();
+ // Fall through okay?
case '<':
break;
default:
error("expected", "'>'");
@@ -1873,10 +1882,11 @@
parseAttributeSpecificationList(elem);
switch (ch) {
case '/':
net = true;
+ // Fall through okay?
case '>':
ch = readCh();
if (ch == '>' && net) {
ch = readCh();
}