Skip to content

Bounding Diameters 0.0.2: don't fail on an empty graph - #363

Merged
mbastian merged 1 commit into
master-forgefrom
fix/bounding-diameters-empty-graph
Nov 8, 2026
Merged

mbastian merged 1 commit into
master-forgefrom
fix/bounding-diameters-empty-graph

Conversation

@mbastian

@mbastian mbastian commented Nov 8, 2026

Copy link
Copy Markdown
Member

Found by the SPI contract tests of gephi-plugins-tests (StatisticsContractTest), run against Gephi 0.11.4.

Running the statistics on an empty graph looked for the giant connected component of a graph without any, giving ArrayIndexOutOfBoundsException: Index -1 out of bounds for length 0 from initializeStartValues(). The report then read eccentricities that were never allocated.

  • execute() now returns early on a graph with no nodes, with empty results (so getReport() works).
  • Version 0.0.1 → 0.0.2.

Verified: the empty-graph contract test (gephi-plugins-tests 1.1.1) now passes. The one remaining finding, "needs a StatisticsUI", is not a plugin bug: the UI lives in the sibling BoundingDiametersUI module, which the test harness does not put on the classpath yet.

Short-lived branch off master-forge: the plugin's own branch has unmerged commits, so this is just the 2 files.

The statistics looked for the giant component of a graph with no component, which threw an ArrayIndexOutOfBoundsException, and the report then read results that were never set. Return early with empty results. Version 0.0.2.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@mbastian
mbastian merged commit 80eef50 into master-forge Nov 8, 2026
0 of 2 checks passed
mbastian added a commit that referenced this pull request Nov 8, 2026
…367)

#363 bumped boundingdiameters to 0.0.2 but the UI module and the suite still depended on 0.0.1, so the reactor could not resolve it and the build failed. The suite is the plugin users install, so it gets 0.0.2 as well.

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
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.

1 participant