Skip to content

Commit 9440204

Browse files
committed
Simplified
1 parent 5ea5592 commit 9440204

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

library/src/com/loopj/android/http/SimpleMultipartEntity.java

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -148,22 +148,12 @@ private byte[] createContentType(String type) {
148148
}
149149

150150
private byte[] createContentDisposition(final String key) {
151-
return new StringBuilder()
152-
.append("Content-Disposition: form-data; name=\"")
153-
.append(key)
154-
.append("\"\r\n")
155-
.toString()
151+
return ("Content-Disposition: form-data; name=\"" + key + "\"\r\n")
156152
.getBytes();
157153
}
158154

159155
private byte[] createContentDisposition(final String key, final String fileName) {
160-
return new StringBuilder()
161-
.append("Content-Disposition: form-data; name=\"")
162-
.append(key)
163-
.append("\"; filename=\"")
164-
.append(fileName)
165-
.append("\"\r\n")
166-
.toString()
156+
return ("Content-Disposition: form-data; name=\"" + key + "\"; filename=\"" + fileName + "\"\r\n")
167157
.getBytes();
168158
}
169159

0 commit comments

Comments
 (0)