@Override
  @RequiresEdt
  public char[] showPasswordDialog(@NotNull Component parentComponent, String message, String title, Icon icon, @Nullable InputValidator validator) {
    if (isApplicationInUnitTestOrHeadless()) {
      return TestDialogManager.getTestInputImplementation().show(message, validator).toCharArray();
    }

    PasswordInputDialog dialog = new PasswordInputDialog(parentComponent, message, title, icon, validator);
    dialog.show();
    return dialog.getExitCode() == 0 ? getTrimmedChars(dialog.getTextField()) : null;
  }
@Override
  @RequiresEdt
  public char[] showPasswordDialog(@NotNull Component parentComponent, String message, String title, Icon icon, @Nullable InputValidator validator)