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/08/17 14:24:43 UTC
(httpcomponents-client) 02/02: Replace ternary with Objects.toString()
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-client.git
commit d05f4c5c8c861b03487e6e9275172bc9aff16397
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sat Aug 17 10:24:37 2024 -0400
Replace ternary with Objects.toString()
---
.../org/apache/hc/client5/http/entity/mime/MultipartFormEntity.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/entity/mime/MultipartFormEntity.java b/httpclient5/src/main/java/org/apache/hc/client5/http/entity/mime/MultipartFormEntity.java
index 73f91415b..4861f7336 100644
--- a/httpclient5/src/main/java/org/apache/hc/client5/http/entity/mime/MultipartFormEntity.java
+++ b/httpclient5/src/main/java/org/apache/hc/client5/http/entity/mime/MultipartFormEntity.java
@@ -33,6 +33,7 @@ import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.List;
+import java.util.Objects;
import java.util.Set;
import org.apache.hc.core5.function.Supplier;
@@ -83,7 +84,7 @@ class MultipartFormEntity implements HttpEntity {
@Override
public String getContentType() {
- return this.contentType != null ? this.contentType.toString() : null;
+ return Objects.toString(contentType, null);
}
@Override