Skip to content

Commit

Permalink
an extra null check, if the page needs to run the method on a null fi…
Browse files Browse the repository at this point in the history
…le (?) (#2202)
  • Loading branch information
landreev committed Jun 5, 2019
1 parent ef40804 commit 97155ab
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1131,10 +1131,12 @@ public String getFileThumbnailClass (DataFile file) {
return FileUtil.FILE_THUMBNAIL_CLASS_PACKAGE;
}

String fileTypeFacet = FileUtil.getFacetFileType(file);
if (file != null) {
String fileTypeFacet = FileUtil.getFacetFileType(file);

if (fileTypeFacet != null && FileUtil.FILE_THUMBNAIL_CLASSES.containsKey(fileTypeFacet)) {
return FileUtil.FILE_THUMBNAIL_CLASSES.get(fileTypeFacet);
if (fileTypeFacet != null && FileUtil.FILE_THUMBNAIL_CLASSES.containsKey(fileTypeFacet)) {
return FileUtil.FILE_THUMBNAIL_CLASSES.get(fileTypeFacet);
}
}

return FileUtil.FILE_THUMBNAIL_CLASS_OTHER;
Expand Down

0 comments on commit 97155ab

Please sign in to comment.