If the input is a null result, you will get an NPE where you did not before this change. A safer bet would be Boolean.FALSE.equals(result).
Gary On Sun, Jul 5, 2020, 16:58 <[email protected]> wrote: > This is an automated email from the ASF dual-hosted git repository. > > olegk pushed a commit to branch master > in repository > https://gitbox.apache.org/repos/asf/httpcomponents-client.git > > > The following commit(s) were added to refs/heads/master by this push: > new 1572f55 HTTPCLIENT-2097: Fix PoolingAsyncClientConnectionManager > boxed primitive reference equality > 1572f55 is described below > > commit 1572f5568730362aa4f5bdf052503db52c643bab > Author: Carter Kozak <[email protected]> > AuthorDate: Sun Jul 5 13:10:25 2020 -0400 > > HTTPCLIENT-2097: Fix PoolingAsyncClientConnectionManager boxed > primitive reference equality > --- > .../hc/client5/http/impl/nio/PoolingAsyncClientConnectionManager.java | > 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git > a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/nio/PoolingAsyncClientConnectionManager.java > b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/nio/PoolingAsyncClientConnectionManager.java > index cd0e6b0..80d05c2 100644 > --- > a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/nio/PoolingAsyncClientConnectionManager.java > +++ > b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/nio/PoolingAsyncClientConnectionManager.java > @@ -252,7 +252,7 @@ public class PoolingAsyncClientConnectionManager > implements AsyncClientConnectio > > @Override > public void execute(final Boolean > result) { > - if (result == Boolean.FALSE) { > + if (!result) { > if (log.isDebugEnabled()) { > log.debug("{}: connection > {} is stale", id, ConnPoolSupport.getId(connection)); > } > >
