Skip to content

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

Closed

Description

@rahlk

Problem

ViewDispatches.siteOf tests DISPATCHER_TYPES.contains(receiver) / RESPONSE_TYPES.contains(receiver) where both sets are Set.of(...), whose contains(null) throws. A call body node's receiver_type is null whenever the receiver did not resolve — an unbuilt project with no target/ and no Maven, a missing jar — so from 3.3.0 any such project with a forward / include / sendRedirect call crashes the whole run at every analysis level: java.lang.RuntimeException: java.lang.NullPointerException: Cannot invoke "Object.equals(Object)" because "<parameter1>" is null at CodeAnalyzer.analyze(CodeAnalyzer.java:261). Found by python-sdk's test_java_degradation.py (a copy of daytrader8 with no target/, -a 4) when the SDK moved its pin to 3.3.2 (python-sdk#404).

Scope boundary

The null guard and its test only. Detection by declared receiver type stays: an unresolved receiver is not a site, and the run degrades as it did before 3.3.0.

Goals

  • siteOf returns null for a null receiver type before any set lookup.
  • ViewDispatchesTest: a tree with import javax.servlet.http.* and no stubs — every receiver unresolved — yields no dispatches, no unresolved records, and no exception.

Caveats and known risks

  • None beyond the obvious: a degraded run reports no dispatches at all, which is the pre-existing condition config reads live with (detection needs the servlet types to resolve).

Definition of done

  • The new test fails with the NPE on 3.3.2's code and passes with the guard; the full suite is green; python-sdk's test_java_degradation.py passes against the released patch.

Activity

  1. rahlk commented on Sep 11, 2026

    @rahlk
    CollaboratorAuthor

    Shipped: merged as f86d454 (#266), released as v3.3.3 (GitHub Release + PyPI). Gate on the tagged commit: 604 tests green (Docker-only integration test excluded).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions