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 239ac2a commit 27ad1d5Copy full SHA for 27ad1d5
src/java.base/unix/classes/sun/nio/fs/MimeTypesFileTypeDetector.java
@@ -187,11 +187,8 @@ private void parseMimeEntry(String entry) {
187
}
188
189
private void putIfAbsent(String key, String value) {
190
- if (key != null && !key.isEmpty() &&
191
- value != null && !value.isEmpty() &&
192
- !mimeTypeMap.containsKey(key))
193
- {
194
- mimeTypeMap.put(key, value);
+ if (!key.isEmpty() && !value.isEmpty()) {
+ mimeTypeMap.putIfAbsent(key, value);
195
196
197
0 commit comments