Skip to content

Fix: bug in JXTreeTable.getEditingRow#285

Open
tonygermano wants to merge 1 commit intoOpenIntegrationEngine:mainfrom
tonygermano:fix/jxtreetable-bug
Open

Fix: bug in JXTreeTable.getEditingRow#285
tonygermano wants to merge 1 commit intoOpenIntegrationEngine:mainfrom
tonygermano:fix/jxtreetable-bug

Conversation

@tonygermano
Copy link
Copy Markdown
Member

org.jdesktop.swingx.JXTreeTable contains the following (decompiled) methods

public boolean isHierarchical(int column) {
   if (column >= 0 && column < this.getColumnCount()) {
      return this.getHierarchicalColumn() == column;
   } else {
      throw new IllegalArgumentException("column must be valid, was" + column);
   }
}

public int getEditingRow() {
   if (this.editingRow == -1) {
      return -1;
   } else {
      return this.isHierarchical(this.editingColumn) ? -1 : this.editingRow;
   }
}

Exceptions are thrown, especially on macOS clients, when getEditingRow is called while not editing, causing isHeirarchical to be called when editingColumn is -1.

This commit overrides getEditingRow to protect against that condition.

Fixes #272

Several issues with similar stack traces have been logged against Mirth and Bridgelink over the past few years.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 4, 2026

Test Results

  111 files  ±0    214 suites  ±0   7m 1s ⏱️ + 1m 9s
  654 tests ±0    654 ✅ ±0  0 💤 ±0  0 ❌ ±0 
1 308 runs  ±0  1 308 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit be058f6. ± Comparison against base commit be1072d.

♻️ This comment has been updated with latest results.

org.jdesktop.swingx.JXTreeTable contains the following (decompiled) methods

    public boolean isHierarchical(int column) {
       if (column >= 0 && column < this.getColumnCount()) {
          return this.getHierarchicalColumn() == column;
       } else {
          throw new IllegalArgumentException("column must be valid, was" + column);
       }
    }

    public int getEditingRow() {
       if (this.editingRow == -1) {
          return -1;
       } else {
          return this.isHierarchical(this.editingColumn) ? -1 : this.editingRow;
       }
    }

Exceptions are thrown, especially on macOS clients, when getEditingRow
is called while not editing, causing isHeirarchical to be called when
editingColumn is -1.

This commit overrides getEditingRow to protect against that condition.

Issue: OpenIntegrationEngine#272
Signed-off-by: Tony Germano <tony@germano.name>
@tonygermano tonygermano force-pushed the fix/jxtreetable-bug branch from 27521dd to be058f6 Compare April 4, 2026 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Mystery failure on Mac OS X when adding a transformer in 4.4.0

2 participants