markt-asf commented on code in PR #661: URL: https://github.com/apache/tomcat/pull/661#discussion_r1316875467
########## java/org/apache/coyote/http11/filters/ChunkedInputFilter.java: ########## @@ -574,7 +574,7 @@ private boolean parseHeader() throws IOException { } chr = readChunk.get(readChunk.position()); - if ((chr != Constants.SP) && (chr != Constants.HT)) { + if (!(chr == Constants.SP || chr == Constants.HT)) { Review Comment: As above - remove application of De Morgan's law. ########## java/org/apache/coyote/http11/Http11InputBuffer.java: ########## @@ -998,7 +998,7 @@ private HeaderParseStatus parseHeader() throws IOException { byte peek = byteBuffer.get(byteBuffer.position()); if (headerParsePos == HeaderParsePosition.HEADER_MULTI_LINE) { - if ((peek != Constants.SP) && (peek != Constants.HT)) { + if (!(peek == Constants.SP || peek == Constants.HT)) { Review Comment: Removing the unnecessary brackets is fine. Applying De Morgan's law is not. Yes, the result is the same but the intention is less obvious than with the original form so please keep it. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org