Skip to content

Commit 1c4ed72

Browse files
committed
minor clean up
1 parent 496c15a commit 1c4ed72

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

client/src/main/java/org/asynchttpclient/request/body/multipart/FileLikePart.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,7 @@ public abstract class FileLikePart extends PartBase {
4141
private String fileName;
4242

4343
private static String computeContentType(String contentType, String fileName) {
44-
if (contentType == null) {
45-
// TODO use a ThreadLocal to get work around synchronized?
46-
contentType = MIME_TYPES_FILE_TYPE_MAP.getContentType(withDefault(fileName, ""));
47-
}
48-
49-
return contentType;
44+
return contentType != null ? contentType : MIME_TYPES_FILE_TYPE_MAP.getContentType(withDefault(fileName, ""));
5045
}
5146

5247
/**

0 commit comments

Comments
 (0)