Skip to content

fix(artifacts): an unresolved receiver type is not a dispatch site, not a NullPointerException - #266

Merged
rahlk merged 1 commit into
mainfrom
fix/unresolved-receiver-npe
Sep 11, 2026
Merged

rahlk merged 1 commit into
mainfrom
fix/unresolved-receiver-npe

Conversation

@rahlk

@rahlk rahlk commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator

Closes #265.

ViewDispatches.siteOf looked a possibly-null receiver_type up in Set.of(...), which throws on contains(null). A receiver is null whenever it did not resolve — an unbuilt project with no target/ and no Maven, a missing jar — so 3.3.0–3.3.2 crashed every such run with a forward / include / sendRedirect call, at every level. Found by python-sdk's test_java_degradation.py when its pin moved to 3.3.2 (python-sdk#404).

Now a null receiver is simply not a site, which is the pre-3.3.0 behaviour (detection by declared receiver type; a degraded run reports no dispatches). ViewDispatchesTest.anUnresolvableReceiverIsNotADispatchAndDoesNotCrash reproduces the NPE on the old code and passes with the guard. Full suite: 604 tests, only the Docker-only integration test unrun.

…ot a NullPointerException (#265)

Set.of(...).contains(null) throws, and a call node's receiver_type is
null whenever the receiver did not resolve, so 3.3.0-3.3.2 crashed every
unbuilt project with a forward/include/sendRedirect call at every level.
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.

ViewDispatches throws NullPointerException on an unresolved receiver type (any unbuilt project, every level) in 3.3.0–3.3.2

1 participant