Skip to content

Fix NPE in EqConstList fixture reused by the store reloader test#306

Merged
fh-ms merged 1 commit into
mainfrom
fix-eqconstlist-reloader-npe
Jul 20, 2026
Merged

Fix NPE in EqConstList fixture reused by the store reloader test#306
fh-ms merged 1 commit into
mainfrom
fix-eqconstlist-reloader-npe

Conversation

@fh-ms

@fh-ms fh-ms commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Problem

The EqConstListData fixture (added in #304) asserts that the deserialized lists equalator survived serialization:

Assertions.assertInstanceOf(IntegerEquality.class, copy.getValue().equality(), "EqConstList equalator");

This passes in the serializer round-trip test (BasicSerializerTest), where the deserialized copy is fully populated. But the same fixture is reused by the store repos ReloaderSmokeTest.reloadTypeTest, which:

  1. starts a storage with a freshly created (empty) fixture as root,
  2. calls fillSampleData() without storing it,
  3. reloadDeep(...) resets the root back to its stored empty state (value == null),
  4. calls proveResults(...).

In that flow getValue() returns null, so the unconditional copy.getValue().equality() throws a NullPointerException, breaking the store integration tests (e.g. eclipse-store/store#764 CI, which builds against serializer main-SNAPSHOT).

Fix

Guard the equalator assertion on a populated list. It still runs in the serializer round-trip test (where the list is filled), but is skipped when the reloader resets the root to its stored empty state — matching the null-tolerant convention already used by the sibling EqBulkListData fixture.

Verification

BasicSerializerTest still passes (70 tests, 0 failures) with the equalator assertion exercised for the populated EqConstList, and the null-dereference that failed the store reloader test is eliminated.

The equalator assertion added for the serializer round-trip test dereferenced getValue() unconditionally. The shared fixture is also driven by the store ReloaderSmokeTest, which reloads the root to its stored empty state, leaving value null and causing a NullPointerException. Guard the equalator check on a populated list so it still runs in the round-trip test but is skipped when the reloader resets to empty, matching the null-tolerant convention of the sibling EqBulkList fixture.
@fh-ms
fh-ms merged commit e5c5e1f into main Jul 20, 2026
19 checks passed
@fh-ms
fh-ms deleted the fix-eqconstlist-reloader-npe branch July 20, 2026 13:23
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.

2 participants