Skip to content

Commit 994c382

Browse files
committed
StrictConnPool / LaxConnPool #lease method optimization
1 parent d29c076 commit 994c382

3 files changed

Lines changed: 6 additions & 3 deletions

File tree

httpcore5/src/main/java/org/apache/hc/core5/concurrent/BasicFuture.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,10 @@ public boolean isDone() {
7979
return this.completed;
8080
}
8181

82-
private T getResult() throws ExecutionException {
82+
/**
83+
* @since 5.5
84+
*/
85+
protected T getResult() throws ExecutionException {
8386
if (this.ex != null) {
8487
throw new ExecutionException(this.ex);
8588
}

httpcore5/src/main/java/org/apache/hc/core5/pool/LaxConnPool.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ public PoolEntry<T, C> get(
469469
if (cancel()) {
470470
throw ex;
471471
}
472-
return super.get();
472+
return super.getResult();
473473
}
474474
}
475475

httpcore5/src/main/java/org/apache/hc/core5/pool/StrictConnPool.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ public PoolEntry<T, C> get(
180180
if (cancel()) {
181181
throw ex;
182182
}
183-
return super.get();
183+
return super.getResult();
184184
}
185185
}
186186

0 commit comments

Comments
 (0)