Skip to content

Commit 76fa4ea

Browse files
committed
Change calling to String.isEmpty() for length() > 0 to make java 1.5 compatible
1 parent 218da2c commit 76fa4ea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/com/mashape/unirest/request/body/MultipartBody.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ public MultipartBody field(String name, Object value, boolean file, String conte
9999
parameters.put(name, list);
100100

101101
ContentType type = null;
102-
if (contentType != null && !contentType.isEmpty()) {
102+
if (contentType != null && contentType.length() > 0) {
103103
type = ContentType.parse(contentType);
104104
} else if (file) {
105105
type = ContentType.APPLICATION_OCTET_STREAM;

0 commit comments

Comments
 (0)