Skip to content

Commit

Permalink
Revert "Improve getIcon method"
Browse files Browse the repository at this point in the history
This reverts commit 478ee05.
  • Loading branch information
btut committed May 12, 2020
1 parent 23b7e69 commit e3ae796
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/main/java/org/jabref/gui/util/BackgroundTask.java
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,11 @@ public BackgroundTask<V> withInitialMessage(String message) {
return this;
}

public static <T> Node getIcon(Task<T> task) {
return BackgroundTask.iconMap.getOrDefault(task).getTitle(), null);
public static Node getIcon(Object task) {
if (task instanceof Task) {
return BackgroundTask.iconMap.getOrDefault(((Task<?>) task).getTitle(), null);
}
return null;
}

static class BackgroundProgress {
Expand Down

0 comments on commit e3ae796

Please sign in to comment.