diff --git a/src/main/java/org/jabref/gui/util/BackgroundTask.java b/src/main/java/org/jabref/gui/util/BackgroundTask.java index 2b9e7b65d2a..a6db2797cf1 100644 --- a/src/main/java/org/jabref/gui/util/BackgroundTask.java +++ b/src/main/java/org/jabref/gui/util/BackgroundTask.java @@ -257,11 +257,8 @@ public BackgroundTask withInitialMessage(String message) { return this; } - public static Node getIcon(Object task) { - if (task instanceof Task) { - return BackgroundTask.iconMap.getOrDefault(((Task) task).getTitle(), null); - } - return null; + public static Node getIcon(Task task) { + return BackgroundTask.iconMap.getOrDefault(task).getTitle(), null); } static class BackgroundProgress {