Skip to content

Commit fe0d340

Browse files
committed
Fix bug in MIME DB initialization logic
1 parent 637a42b commit fe0d340

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/main/java/org/scijava/desktop/DefaultDesktopService.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,6 @@ private synchronized void initFileTypes() {
185185

186186
/** Initializes {@link #mimeDB} from the built-in {@code mime-types.txt} resource. */
187187
private void initMimeDB() {
188-
final Map<String, String> db = new HashMap<>();
189188
final String resource = "mime-types.txt";
190189
try (
191190
final InputStream is = getClass().getResourceAsStream(resource);
@@ -213,7 +212,7 @@ private void initMimeDB() {
213212
mime = rest.substring(0, pipe2).trim();
214213
description = rest.substring(pipe2 + 1).trim();
215214
}
216-
db.putIfAbsent(ext, mime);
215+
mimeDB.putIfAbsent(ext, mime);
217216
if (description != null && !description.isEmpty()) {
218217
descriptions.put(ext, description);
219218
}

0 commit comments

Comments
 (0)