arturobernalg commented on a change in pull request #247:
URL:
https://github.com/apache/httpcomponents-core/pull/247#discussion_r564222715
##########
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.
HI @ok2c
My idea was get more readability. As far as I know for
implementation/performance sake, they would be nearly equivalent. Maybe a bit
more faster the java implementations. But your right, no make no distinction
between greater and greater equal. I gonna remove that changes.
----------------------------------------------------------------
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]