+ else
+ // clear callbacks are when cancelling
+ for (Callback callback : callbacks)
+ if (callback instanceof PasswordCallback)
+ ((PasswordCallback) callback).setPassword(null);
+ else if (callback instanceof NameCallback)
+ ((NameCallback) callback).setName(null);