You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by mi...@apache.org on 2020/08/18 10:20:03 UTC
[httpcomponents-core] 01/01: Use decimal numbers for
endpoint/execution IDs
This is an automated email from the ASF dual-hosted git repository.
michaelo pushed a commit to branch decimal-ids
in repository https://gitbox.apache.org/repos/asf/httpcomponents-core.git
commit 18baff0a8d69748224a2e74e5f4b07269ed85782
Author: Michael Osipov <mi...@apache.org>
AuthorDate: Tue Aug 18 12:19:02 2020 +0200
Use decimal numbers for endpoint/execution IDs
---
httpcore5/src/main/java/org/apache/hc/core5/reactor/IOSessionImpl.java | 2 +-
.../org/apache/hc/core5/http/examples/AsyncReverseProxyExample.java | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/httpcore5/src/main/java/org/apache/hc/core5/reactor/IOSessionImpl.java b/httpcore5/src/main/java/org/apache/hc/core5/reactor/IOSessionImpl.java
index 3cffb58..242dd77 100644
--- a/httpcore5/src/main/java/org/apache/hc/core5/reactor/IOSessionImpl.java
+++ b/httpcore5/src/main/java/org/apache/hc/core5/reactor/IOSessionImpl.java
@@ -71,7 +71,7 @@ class IOSessionImpl implements IOSession {
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());
this.handlerRef = new AtomicReference<>();
this.status = new AtomicReference<>(Status.ACTIVE);
final long currentTimeMillis = System.currentTimeMillis();
diff --git a/httpcore5/src/test/java/org/apache/hc/core5/http/examples/AsyncReverseProxyExample.java b/httpcore5/src/test/java/org/apache/hc/core5/http/examples/AsyncReverseProxyExample.java
index 8136cab..e1f98f9 100644
--- a/httpcore5/src/test/java/org/apache/hc/core5/http/examples/AsyncReverseProxyExample.java
+++ b/httpcore5/src/test/java/org/apache/hc/core5/http/examples/AsyncReverseProxyExample.java
@@ -251,7 +251,7 @@ public class AsyncReverseProxyExample {
AsyncClientEndpoint clientEndpoint;
ProxyExchangeState() {
- this.id = String.format("%08X", COUNT.getAndIncrement());
+ this.id = String.format("%08d", COUNT.getAndIncrement());
}
}