public static void removeFileOpener ( ServletContext servletContext , String ... extensions ) { synchronized ( fileOpenersLock ) { @ SuppressWarnings ( "unchecked" ) Map < String , FileOpener > fileOpeners = ( Map < String , FileOpener > ) servletContext . getAttribute ( FILE_OPENERS_REQUEST_ATTRIBUTE_NAME ) ; if ( fileOpeners != null ) { for ( String extension : extensions ) { fileOpeners . remove ( extension ) ; } if ( fileOpeners . isEmpty ( ) ) { servletContext . removeAttribute ( FILE_OPENERS_REQUEST_ATTRIBUTE_NAME ) ; } } } }
Removes file openers .