We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 496c15a commit 1c4ed72Copy full SHA for 1c4ed72
client/src/main/java/org/asynchttpclient/request/body/multipart/FileLikePart.java
@@ -41,12 +41,7 @@ public abstract class FileLikePart extends PartBase {
41
private String fileName;
42
43
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;
+ return contentType != null ? contentType : MIME_TYPES_FILE_TYPE_MAP.getContentType(withDefault(fileName, ""));
50
}
51
52
/**
0 commit comments