public synchronized void destroy() throws DestroyFailedException {
  isDestroyed=true;
  if (password != null) {
    Arrays.fill(password,'\u0000');
    password=null;
  }
}

public synchronized void destroy ( ) throws DestroyFailedException { isDestroyed = true ; if ( password != null ) { Arrays . fill ( password , '' ) ; password = null ; } }
destroys / invalidates the password .
