You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by GitBox <gi...@apache.org> on 2020/08/18 11:41:04 UTC

[GitHub] [httpcomponents-core] carterkozak commented on a change in pull request #219: Use decimal numbers for endpoint/execution IDs

carterkozak commented on a change in pull request #219:
URL: https://github.com/apache/httpcomponents-core/pull/219#discussion_r472113524



##########
File path: httpcore5/src/main/java/org/apache/hc/core5/reactor/IOSessionImpl.java
##########
@@ -71,7 +71,7 @@ public IOSessionImpl(final String type, final SelectionKey key, final SocketChan
         this.commandQueue = new ConcurrentLinkedDeque<>();
         this.lock = new ReentrantLock();
         this.socketTimeout = Timeout.DISABLED;
-        this.id = String.format(type + "-%08X", COUNT.getAndIncrement());
+        this.id = String.format(type + "-%08d", COUNT.getAndIncrement());

Review comment:
       If the padding isn't important and we're okay with ambiguous substring matches, it could be worth considering simple concatenation to avoid poor String.format performance until we get something like [jep-348](https://openjdk.java.net/jeps/348).
   ```suggestion
           this.id = type + "-" + COUNT.getAndIncrement();
   ```




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org