ok2c commented on a change in pull request #247:
URL: 
https://github.com/apache/httpcomponents-core/pull/247#discussion_r563993361



##########
File path: 
httpcore5/src/main/java/org/apache/hc/core5/http/impl/bootstrap/ServerBootstrap.java
##########
@@ -407,7 +407,7 @@ public HttpServer create() {
         }
 
         return new HttpServer(
-                this.listenerPort > 0 ? this.listenerPort : 0,
+                Math.max(this.listenerPort, 0),

Review comment:
       @arturobernalg What are benefits of using `Math#max` here? Is it more 
byte code efficient? I am kind of old and stupid. It makes it more difficult 
for me to understand the intent of the operation. I am also a bit worried that 
the proposed code appears to make no distinction between greater and greater 
equal (as well lesser and lesser equal) comparison operations.




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

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to