FileExtension { @Deprecated public static boolean isImage(@Nullable String fileExtension) { if (StringUtils.isEmpty(fileExtension)) { return false; } return IMAGE_FILE_EXTENSIONS.contains(fileExtension.toLowerCase()); } private  FileExtension(); @Deprecated static boolean isImage(@Nullable String fileExtension); @Deprecated static @NotNull Set<String> getImageFileExtensions(); @Deprecated static boolean isFlash(@Nullable String fileExtension); @Deprecated static @NotNull Set<String> getFlashFileExtensions(); static final String HTML; static final String HTML_UNCACHED; static final String JSON; static final String PLAINTEXT; static final String CSS; static final String JAVASCRIPT; static final String XML; static final String XHTML; static final String ZIP; static final String GIF; static final String JPEG; static final String PNG; static final String SWF; static final String CSV; static final String PDF; static final String SVG; static final String TIFF; static final String WEBP; }
@Test @SuppressWarnings("deprecation") void testIsImage() throws Exception { assertTrue(FileExtension.isImage("png")); assertFalse(FileExtension.isImage(null)); }