[GitHub] [tomcat] markt-asf commented on a diff in pull request #659: Unify constant delimiters and Refactoring for better readability

2023-09-06 Thread via GitHub


markt-asf commented on code in PR #659:
URL: https://github.com/apache/tomcat/pull/659#discussion_r1316887097


##
java/org/apache/coyote/http11/Constants.java:
##
@@ -106,7 +106,7 @@ public final class Constants {
 public static final String KEEP_ALIVE_HEADER_VALUE_TOKEN = "keep-alive";
 public static final String CHUNKED = "chunked";
 public static final byte[] ACK_BYTES = ByteChunk.convertToBytes("HTTP/1.1 
100 " + CRLF + CRLF);
-public static final String TRANSFERENCODING = "Transfer-Encoding";
+public static final String TRANSFER_ENCODING = "Transfer-Encoding";

Review Comment:
   This change still needs to be reverted. It is a public constant and my 
previous comments in this PR about not changing public constants apply equally 
to this one.



-- 
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



[GitHub] [tomcat] markt-asf commented on a diff in pull request #659: Unify constant delimiters and Refactoring for better readability

2023-09-05 Thread via GitHub


markt-asf commented on code in PR #659:
URL: https://github.com/apache/tomcat/pull/659#discussion_r1316303250


##
java/org/apache/catalina/manager/StatusTransformer.java:
##
@@ -375,33 +375,33 @@ protected static void writeProcessorState(PrintWriter 
writer,
 
 switch (stage) {
 
-case (1/*org.apache.coyote.Constants.STAGE_PARSE*/):
+case (Constants.STAGE_PARSE):

Review Comment:
   Why not use the existing constants (the ones in the comments)?



##
java/org/apache/coyote/Constants.java:
##
@@ -37,9 +37,9 @@ public final class Constants {
 public static final int STAGE_PARSE = 1;
 public static final int STAGE_PREPARE = 2;
 public static final int STAGE_SERVICE = 3;
-public static final int STAGE_ENDINPUT = 4;
-public static final int STAGE_ENDOUTPUT = 5;
-public static final int STAGE_KEEPALIVE = 6;
+public static final int STAGE_END_INPUT = 4;
+public static final int STAGE_END_OUTPUT = 5;
+public static final int STAGE_KEEP_ALIVE = 6;

Review Comment:
   We don't want to change the names of public constants unless we have a 
really good reason. The risk of breaking a third-party integration is too high.



-- 
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