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



##########
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:
       Another option is to exclude padding in favor of a trailing separator 
for concise identifiers that cannot be ambiguous:
   
   ```java
   this.id = type + "[" + COUNT.getAndIncrement() + "]";
   ```
   
   This solves the problem grepping between `ex-1` and `ex-10` by producing 
values `ex[1]` and `ex[10]`, and in my opinion is easier for humans to quickly 
parse without N leading zero characters. What do you think?




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