You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ol...@apache.org on 2021/09/11 11:49:58 UTC
[httpcomponents-client] branch 4.5.x updated: HTTPCLIENT-2174:
URUBuilder to return a new empty list instead of unmodifiable
Collections#emptyList
This is an automated email from the ASF dual-hosted git repository.
olegk pushed a commit to branch 4.5.x
in repository https://gitbox.apache.org/repos/asf/httpcomponents-client.git
The following commit(s) were added to refs/heads/4.5.x by this push:
new a0b85d4 HTTPCLIENT-2174: URUBuilder to return a new empty list instead of unmodifiable Collections#emptyList
a0b85d4 is described below
commit a0b85d44c26430ff8354a0af5a1b7d58e2e5bce5
Author: Oleg Kalnichevski <ol...@apache.org>
AuthorDate: Sat Sep 11 13:45:48 2021 +0200
HTTPCLIENT-2174: URUBuilder to return a new empty list instead of unmodifiable Collections#emptyList
---
httpclient/src/main/java/org/apache/http/client/utils/URIBuilder.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/httpclient/src/main/java/org/apache/http/client/utils/URIBuilder.java b/httpclient/src/main/java/org/apache/http/client/utils/URIBuilder.java
index d7c9b0f..9a120a5 100644
--- a/httpclient/src/main/java/org/apache/http/client/utils/URIBuilder.java
+++ b/httpclient/src/main/java/org/apache/http/client/utils/URIBuilder.java
@@ -545,7 +545,7 @@ public class URIBuilder {
* @since 4.5.8
*/
public List<String> getPathSegments() {
- return this.pathSegments != null ? new ArrayList<String>(this.pathSegments) : Collections.<String>emptyList();
+ return this.pathSegments != null ? new ArrayList<String>(this.pathSegments) : new ArrayList<String>();
}
public String getPath() {
@@ -567,7 +567,7 @@ public class URIBuilder {
}
public List<NameValuePair> getQueryParams() {
- return this.queryParams != null ? new ArrayList<NameValuePair>(this.queryParams) : Collections.<NameValuePair>emptyList();
+ return this.queryParams != null ? new ArrayList<NameValuePair>(this.queryParams) : new ArrayList<NameValuePair>();
}
public String getFragment() {