Skip to content

Accept null-free immutable lists in box charts - #1033

Merged
timmolter merged 2 commits into
knowm:developfrom
PHJ2000:fix-box-immutable-lists
Oct 7, 2026
Merged

timmolter merged 2 commits into
knowm:developfrom
PHJ2000:fix-box-immutable-lists

Conversation

@PHJ2000

@PHJ2000 PHJ2000 commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

Check the data elements for null instead of calling contains(null), which throws for Java immutable lists. Applies to series creation and replacement while preserving rejection of actual null elements. Tests cover add/replace/update; TestForIssue1032.getChart() provides the required standalone demo and was exercised headlessly.

Validation: mvn clean verify; mvn verify after formatting — 171 tests, no failures/errors, 0 skipped (JDK 11).

The repository config skips mvn fmt:check; the four changed Java files pass a direct check with the same google-java-format 1.23.0 used by its formatter plugin.

Fixes #1032.

PHJ2000 and others added 2 commits October 6, 2026 00:45
Histogram.sanityCheck had the same contains(null) call as BoxChart, which
throws NullPointerException for List.of(...) data. Check elements directly
instead, matching the box chart fix in this PR.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@timmolter
timmolter merged commit 072b0ad into knowm:develop Oct 7, 2026
1 check passed
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.

BoxChart rejects valid List.of data with NullPointerException

2 participants