-
Task
-
Resolution: Fixed
-
P4
-
20
-
b10
The constructor of sun.net.httpserver.Request has the following do/while loop:
do {
startLine = readLine();
if (startLine == null) {
return;
}
/* skip blank lines */
} while (startLine == null ? false : startLine.equals (""));
There's a if condition within the loop which makes the while (startLine == null) check redundant. The loop condition can be simplified to make it much more simpler to read.
(A contributor has a PR open for this change https://github.com/openjdk/jdk/pull/9571 )
do {
startLine = readLine();
if (startLine == null) {
return;
}
/* skip blank lines */
} while (startLine == null ? false : startLine.equals (""));
There's a if condition within the loop which makes the while (startLine == null) check redundant. The loop condition can be simplified to make it much more simpler to read.
(A contributor has a PR open for this change https://github.com/openjdk/jdk/pull/9571 )