private static void checkAllowsInsecure ( Path path , RecursiveDeleteOption [ ] options ) throws InsecureRecursiveDeleteException { if ( ! Arrays . asList ( options ) . contains ( RecursiveDeleteOption . ALLOW_INSECURE ) ) { throw new InsecureRecursiveDeleteException ( path . toString ( ) ) ; } }
Checks that the given options allow an insecure delete throwing an exception if not .