private void ensureUnsubscribedFromModel() {
    var modelListener = this.modelListener;
    if (modelListener == null) {
      return;
    }
    model.removeTreeModelListener(modelListener);
    this.modelListener = null;
  }
private void ensureUnsubscribedFromModel()