Skip to content

check-decode-android: exit 2 on a missing --schema - #178

Merged
trendvidia merged 2 commits into
mainfrom
check-decode-android/missing-schema
Nov 3, 2026
Merged

trendvidia merged 2 commits into
mainfrom
check-decode-android/missing-schema

Conversation

@bfrancojr

Copy link
Copy Markdown
Collaborator

Fixes #177

Without --schema, check-decode-android crashed with a NullPointerException and exited 1. Exit 1 is the harness's "rejected" code, so a reject row run without a schema would have passed. The lookup now skips a null schema, so the existing "need --format, --input and a known --schema" check catches it and exits 2.

Evidence, from the built harness:

  • Before: no arguments gave exit 1, with a stack trace ending in ImmutableCollections$MapN.probe.
  • After: no arguments gave check-decode-android: need --format, --input and a known --schema, got null, exit 2. --format sbe --input x gives the same.
  • ./gradlew :check-decode-android:build passes.

The fix is one line. #171 and #175 edit other parts of this file.

Map.of refuses a null key, so the lookup threw, and the uncaught NPE
exited 1, the harness's reject code (#177).
@bfrancojr

Copy link
Copy Markdown
Collaborator Author

CI passed on 36520da, the PR head read back from the remote: Build + Test, Conformance (Go reference), Analyze and CodeQL.

@trendvidia
trendvidia merged commit 337f33a into main Nov 3, 2026
4 checks passed
@trendvidia
trendvidia deleted the check-decode-android/missing-schema branch November 3, 2026 10:55
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.

check-decode-android: a missing --schema exits 1, the reject code, through an NPE

2 participants