From 5919fad1f4969ef3faaa0e8fe60ed6e4e15e5cff Mon Sep 17 00:00:00 2001 From: Jonathan Gibbons Date: Wed, 5 Apr 2023 15:36:25 +0000 Subject: [PATCH] 8305591: Cleanup use of `newline` flag in DocCommentParser Reviewed-by: hannesw --- .../tools/javac/parser/DocCommentParser.java | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/DocCommentParser.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/DocCommentParser.java index d0f1e7436f7..2bd8617062b 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/DocCommentParser.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/DocCommentParser.java @@ -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;