docs: public static void delete(final File f) {
          if (f != null && f.exists()) {
              // Why do we have to specify a return type for the run method and paramatize
              // PrivilegedExceptionAction to it, this method should have a void return type ideally.
              AccessController.doPrivileged(new PrivilegedAction<Object>() {
                  @Override
                  public Object run() {
                      if (!f.delete()) {
                          logger.log(Level.INFO, Messages.INSTALL_KERNEL_MESSAGES.getLogMessage("LOG_CANNOT_DELETE_FILE",
                                                                                                f.getAbsolutePath()));
                          f.deleteOnExit();
                      }
  
                      return null;
                  }
              });
          }
      }