8305591: Cleanup use of newline flag in DocCommentParser

Reviewed-by: hannesw
This commit is contained in:
Jonathan Gibbons 2023-04-05 15:36:25 +00:00
parent 022290bdbd
commit 5919fad1f4

View File

@ -174,9 +174,6 @@ public class DocCommentParser {
while (bp < buflen) {
switch (ch) {
case '\n': case '\r': case '\f':
newline = true;
// fallthrough
case ' ': case '\t':
nextChar();
break;
@ -417,9 +414,6 @@ public class DocCommentParser {
while (bp < buflen) {
switch (ch) {
case '\n': case '\r': case '\f':
newline = true;
break;
case ' ': case '\t':
break;
@ -464,9 +458,6 @@ public class DocCommentParser {
while (bp < buflen) {
switch (ch) {
case '\n': case '\r': case '\f':
newline = true;
// fallthrough
case ' ': case '\t':
if (depth == 0)
break loop;
@ -544,9 +535,6 @@ public class DocCommentParser {
while (bp < buflen) {
switch (ch) {
case '\n': case '\r': case '\f':
newline = true;
break;
case ' ': case '\t':
break;
@ -569,7 +557,6 @@ public class DocCommentParser {
* Reads a term (that is, one word).
* It is an error if the beginning of the next tag is detected.
*/
@SuppressWarnings("fallthrough")
protected DCText inlineWord() {
int pos = bp;
int depth = 0;
@ -577,9 +564,6 @@ public class DocCommentParser {
while (bp < buflen) {
switch (ch) {
case '\n':
newline = true;
// fallthrough
case '\r': case '\f': case ' ': case '\t':
return m.at(pos).newTextTree(newString(pos, bp));
@ -623,9 +607,6 @@ public class DocCommentParser {
switch (ch) {
case '\n': case '\r': case '\f':
newline = true;
// fall through
case ' ': case '\t':
nextChar();
break;