private void setBorderColor() {
        String outline = ObjectUtils.tryCast(getClientProperty("JComponent.outline"), String.class);

        if (outline != null) {
          if (outline.equals("error")) {
            setBorderColorFunc.accept(JBUI.CurrentTheme.Focus.errorColor(hasFocus()));
            return;
          }
          else if (outline.equals("warning")) {
            setBorderColorFunc.accept(JBUI.CurrentTheme.Focus.warningColor(hasFocus()));
            return;
          }
        }

        setBorderColorFunc.accept(hasFocus() ? null : getBackgroundColor());
      }
private void setBorderColor()