You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by gg...@apache.org on 2024/06/10 22:00:21 UTC
(httpcomponents-core) 01/03: Revert "Remove needless null comparisons"
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/httpcomponents-core.git
commit c1c09c8445b3f83cd1c941fc35b394635f815360
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Mon Jun 10 10:52:32 2024 -0400
Revert "Remove needless null comparisons"
This reverts commit e021da12474738fd1e4f18844cb8585188669bed.
---
.../main/java/org/apache/hc/core5/http/impl/io/IncomingHttpEntity.java | 2 +-
.../main/java/org/apache/hc/core5/http/io/entity/BasicHttpEntity.java | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/httpcore5/src/main/java/org/apache/hc/core5/http/impl/io/IncomingHttpEntity.java b/httpcore5/src/main/java/org/apache/hc/core5/http/impl/io/IncomingHttpEntity.java
index fe646e2f1..ee1228f89 100644
--- a/httpcore5/src/main/java/org/apache/hc/core5/http/impl/io/IncomingHttpEntity.java
+++ b/httpcore5/src/main/java/org/apache/hc/core5/http/impl/io/IncomingHttpEntity.java
@@ -89,7 +89,7 @@ class IncomingHttpEntity implements HttpEntity {
@Override
public boolean isStreaming() {
- return content != EmptyInputStream.INSTANCE;
+ return content != null && content != EmptyInputStream.INSTANCE;
}
@Override
diff --git a/httpcore5/src/main/java/org/apache/hc/core5/http/io/entity/BasicHttpEntity.java b/httpcore5/src/main/java/org/apache/hc/core5/http/io/entity/BasicHttpEntity.java
index 5c750064d..730ac911a 100644
--- a/httpcore5/src/main/java/org/apache/hc/core5/http/io/entity/BasicHttpEntity.java
+++ b/httpcore5/src/main/java/org/apache/hc/core5/http/io/entity/BasicHttpEntity.java
@@ -93,7 +93,7 @@ public class BasicHttpEntity extends AbstractHttpEntity {
@Override
public final boolean isStreaming() {
- return this.content != EmptyInputStream.INSTANCE;
+ return this.content != null && this.content != EmptyInputStream.INSTANCE;
}
@Override
Unit tests; Re: (httpcomponents-core) 01/03: Revert "Remove needless null comparisons"
Posted by Oleg Kalnichevski <ol...@apache.org>.
On Tue, 2024-06-11 at 07:34 -0400, Gary Gregory wrote:
> Hi Oleg,
>
> Understood. I will take time to add the missing unit tests that would
> have caught the initial mistake in the first place. Hopefully this
> week.
>
Do you want me to hold off 5.3 BETA1 for that or can those unit tests
integrated as a later point?
Oleg
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org
Unit tests; Re: (httpcomponents-core) 01/03: Revert "Remove needless null comparisons"
Posted by Oleg Kalnichevski <ol...@apache.org>.
On Tue, 2024-06-11 at 07:34 -0400, Gary Gregory wrote:
> Hi Oleg,
>
> Understood. I will take time to add the missing unit tests that would
> have caught the initial mistake in the first place. Hopefully this
> week.
>
Do you want me to hold off 5.3 BETA1 for that or can those unit tests
integrated as a later point?
Oleg
Re: (httpcomponents-core) 01/03: Revert "Remove needless null comparisons"
Posted by Gary Gregory <ga...@gmail.com>.
Hi Oleg,
Understood. I will take time to add the missing unit tests that would have
caught the initial mistake in the first place. Hopefully this week.
Gary
On Tue, Jun 11, 2024, 3:08 AM Oleg Kalnichevski <ol...@apache.org> wrote:
> Hi Gary
>
> Please kindly avoid pushing those micro-commits straight into release
> branches just to end up reverting them a few minutes later. Please
> commit your changes to a feature branch first, review and merge once
> reviewed. And permit others to review as well.
>
> Oleg
>
>
> On Mon, 2024-06-10 at 22:00 +0000, ggregory@apache.org wrote:
> > This is an automated email from the ASF dual-hosted git repository.
> >
> > ggregory pushed a commit to branch master
> > in repository
> > https://gitbox.apache.org/repos/asf/httpcomponents-core.git
> >
> > commit c1c09c8445b3f83cd1c941fc35b394635f815360
> > Author: Gary Gregory <ga...@gmail.com>
> > AuthorDate: Mon Jun 10 10:52:32 2024 -0400
> >
> > Revert "Remove needless null comparisons"
> >
> > This reverts commit e021da12474738fd1e4f18844cb8585188669bed.
> > ---
> > .../main/java/org/apache/hc/core5/http/impl/io/IncomingHttpEntity.ja
> > va | 2 +-
> > .../main/java/org/apache/hc/core5/http/io/entity/BasicHttpEntity.jav
> > a | 2 +-
> > 2 files changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git
> > a/httpcore5/src/main/java/org/apache/hc/core5/http/impl/io/IncomingHt
> > tpEntity.java
> > b/httpcore5/src/main/java/org/apache/hc/core5/http/impl/io/IncomingHt
> > tpEntity.java
> > index fe646e2f1..ee1228f89 100644
> > ---
> > a/httpcore5/src/main/java/org/apache/hc/core5/http/impl/io/IncomingHt
> > tpEntity.java
> > +++
> > b/httpcore5/src/main/java/org/apache/hc/core5/http/impl/io/IncomingHt
> > tpEntity.java
> > @@ -89,7 +89,7 @@ class IncomingHttpEntity implements HttpEntity {
> >
> > @Override
> > public boolean isStreaming() {
> > - return content != EmptyInputStream.INSTANCE;
> > + return content != null && content !=
> > EmptyInputStream.INSTANCE;
> > }
> >
> > @Override
> > diff --git
> > a/httpcore5/src/main/java/org/apache/hc/core5/http/io/entity/BasicHtt
> > pEntity.java
> > b/httpcore5/src/main/java/org/apache/hc/core5/http/io/entity/BasicHtt
> > pEntity.java
> > index 5c750064d..730ac911a 100644
> > ---
> > a/httpcore5/src/main/java/org/apache/hc/core5/http/io/entity/BasicHtt
> > pEntity.java
> > +++
> > b/httpcore5/src/main/java/org/apache/hc/core5/http/io/entity/BasicHtt
> > pEntity.java
> > @@ -93,7 +93,7 @@ public class BasicHttpEntity extends
> > AbstractHttpEntity {
> >
> > @Override
> > public final boolean isStreaming() {
> > - return this.content != EmptyInputStream.INSTANCE;
> > + return this.content != null && this.content !=
> > EmptyInputStream.INSTANCE;
> > }
> >
> > @Override
> >
>
>
Re: (httpcomponents-core) 01/03: Revert "Remove needless null comparisons"
Posted by Oleg Kalnichevski <ol...@apache.org>.
Hi Gary
Please kindly avoid pushing those micro-commits straight into release
branches just to end up reverting them a few minutes later. Please
commit your changes to a feature branch first, review and merge once
reviewed. And permit others to review as well.
Oleg
On Mon, 2024-06-10 at 22:00 +0000, ggregory@apache.org wrote:
> This is an automated email from the ASF dual-hosted git repository.
>
> ggregory pushed a commit to branch master
> in repository
> https://gitbox.apache.org/repos/asf/httpcomponents-core.git
>
> commit c1c09c8445b3f83cd1c941fc35b394635f815360
> Author: Gary Gregory <ga...@gmail.com>
> AuthorDate: Mon Jun 10 10:52:32 2024 -0400
>
> Revert "Remove needless null comparisons"
>
> This reverts commit e021da12474738fd1e4f18844cb8585188669bed.
> ---
> .../main/java/org/apache/hc/core5/http/impl/io/IncomingHttpEntity.ja
> va | 2 +-
> .../main/java/org/apache/hc/core5/http/io/entity/BasicHttpEntity.jav
> a | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git
> a/httpcore5/src/main/java/org/apache/hc/core5/http/impl/io/IncomingHt
> tpEntity.java
> b/httpcore5/src/main/java/org/apache/hc/core5/http/impl/io/IncomingHt
> tpEntity.java
> index fe646e2f1..ee1228f89 100644
> ---
> a/httpcore5/src/main/java/org/apache/hc/core5/http/impl/io/IncomingHt
> tpEntity.java
> +++
> b/httpcore5/src/main/java/org/apache/hc/core5/http/impl/io/IncomingHt
> tpEntity.java
> @@ -89,7 +89,7 @@ class IncomingHttpEntity implements HttpEntity {
>
> @Override
> public boolean isStreaming() {
> - return content != EmptyInputStream.INSTANCE;
> + return content != null && content !=
> EmptyInputStream.INSTANCE;
> }
>
> @Override
> diff --git
> a/httpcore5/src/main/java/org/apache/hc/core5/http/io/entity/BasicHtt
> pEntity.java
> b/httpcore5/src/main/java/org/apache/hc/core5/http/io/entity/BasicHtt
> pEntity.java
> index 5c750064d..730ac911a 100644
> ---
> a/httpcore5/src/main/java/org/apache/hc/core5/http/io/entity/BasicHtt
> pEntity.java
> +++
> b/httpcore5/src/main/java/org/apache/hc/core5/http/io/entity/BasicHtt
> pEntity.java
> @@ -93,7 +93,7 @@ public class BasicHttpEntity extends
> AbstractHttpEntity {
>
> @Override
> public final boolean isStreaming() {
> - return this.content != EmptyInputStream.INSTANCE;
> + return this.content != null && this.content !=
> EmptyInputStream.INSTANCE;
> }
>
> @Override
>
Re: (httpcomponents-core) 01/03: Revert "Remove needless null comparisons"
Posted by Oleg Kalnichevski <ol...@apache.org>.
Hi Gary
Please kindly avoid pushing those micro-commits straight into release
branches just to end up reverting them a few minutes later. Please
commit your changes to a feature branch first, review and merge once
reviewed. And permit others to review as well.
Oleg
On Mon, 2024-06-10 at 22:00 +0000, ggregory@apache.org wrote:
> This is an automated email from the ASF dual-hosted git repository.
>
> ggregory pushed a commit to branch master
> in repository
> https://gitbox.apache.org/repos/asf/httpcomponents-core.git
>
> commit c1c09c8445b3f83cd1c941fc35b394635f815360
> Author: Gary Gregory <ga...@gmail.com>
> AuthorDate: Mon Jun 10 10:52:32 2024 -0400
>
> Revert "Remove needless null comparisons"
>
> This reverts commit e021da12474738fd1e4f18844cb8585188669bed.
> ---
> .../main/java/org/apache/hc/core5/http/impl/io/IncomingHttpEntity.ja
> va | 2 +-
> .../main/java/org/apache/hc/core5/http/io/entity/BasicHttpEntity.jav
> a | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git
> a/httpcore5/src/main/java/org/apache/hc/core5/http/impl/io/IncomingHt
> tpEntity.java
> b/httpcore5/src/main/java/org/apache/hc/core5/http/impl/io/IncomingHt
> tpEntity.java
> index fe646e2f1..ee1228f89 100644
> ---
> a/httpcore5/src/main/java/org/apache/hc/core5/http/impl/io/IncomingHt
> tpEntity.java
> +++
> b/httpcore5/src/main/java/org/apache/hc/core5/http/impl/io/IncomingHt
> tpEntity.java
> @@ -89,7 +89,7 @@ class IncomingHttpEntity implements HttpEntity {
>
> @Override
> public boolean isStreaming() {
> - return content != EmptyInputStream.INSTANCE;
> + return content != null && content !=
> EmptyInputStream.INSTANCE;
> }
>
> @Override
> diff --git
> a/httpcore5/src/main/java/org/apache/hc/core5/http/io/entity/BasicHtt
> pEntity.java
> b/httpcore5/src/main/java/org/apache/hc/core5/http/io/entity/BasicHtt
> pEntity.java
> index 5c750064d..730ac911a 100644
> ---
> a/httpcore5/src/main/java/org/apache/hc/core5/http/io/entity/BasicHtt
> pEntity.java
> +++
> b/httpcore5/src/main/java/org/apache/hc/core5/http/io/entity/BasicHtt
> pEntity.java
> @@ -93,7 +93,7 @@ public class BasicHttpEntity extends
> AbstractHttpEntity {
>
> @Override
> public final boolean isStreaming() {
> - return this.content != EmptyInputStream.INSTANCE;
> + return this.content != null && this.content !=
> EmptyInputStream.INSTANCE;
> }
>
> @Override
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org