final Task<Image> newGetThumbnailTask = ImageUtils.newGetThumbnailTask(file.getAbstractFile(), MAX_THUMBNAIL_SIZE);
newGetThumbnailTask.stateProperty().addListener((Observable observable) -> {
switch (newGetThumbnailTask.getState()) {
case SUCCEEDED:
try {
<BUG>cache.put(Long.MIN_VALUE, Optional.of(newGetThumbnailTask.get()));
} catch (InterruptedException | ExecutionException ex) {</BUG>
Exceptions.printStackTrace(ex);
}
}

final Task<Image> newGetThumbnailTask = ImageUtils.newGetThumbnailTask(file.getAbstractFile(), MAX_THUMBNAIL_SIZE);
newGetThumbnailTask.stateProperty().addListener((Observable observable) -> {
switch (newGetThumbnailTask.getState()) {
case SUCCEEDED:
try {
cache.put(Long.MIN_VALUE, newGetThumbnailTask.get());
} catch (InterruptedException | ExecutionException ex) {
Exceptions.printStackTrace(ex);
}
}
