Github user ok2c commented on a diff in the pull request:
https://github.com/apache/httpcomponents-core/pull/59#discussion_r168499443
--- Diff:
httpcore5/src/main/java/org/apache/hc/core5/http/impl/nio/ExpandableBuffer.java
---
@@ -123,6 +123,10 @@ protected void expand() {
// WARNING: This code assumes you are providing enough heap
room with -Xmx.
// source of inspiration:
https://bugs.openjdk.java.net/browse/JDK-8059914
newcapacity = Integer.MAX_VALUE - headRoom;
+ if (newcapacity == this.buffer.capacity()) {
--- End diff --
bq. There is no way for this.buffer.capacity() to exceed Integer.MAX_VALUE
- headRoom
@imoldovan-intacct Probably, but still looks a little safer
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]