Skip to content

RUM-10958: Fix WindowCallbackWrapper NPE#2800

Merged
ambushwork merged 1 commit into
developfrom
yl/fix-window-callback-npe
Jul 28, 2025
Merged

RUM-10958: Fix WindowCallbackWrapper NPE#2800
ambushwork merged 1 commit into
developfrom
yl/fix-window-callback-npe

Conversation

@ambushwork

Copy link
Copy Markdown
Member

What does this PR do?

Due to a system issue: https://issuetracker.google.com/issues/188568911

A null menu argument can be passed into a @NonNull java function of Window.Callback,
and since our WindowCallbackWrapper delegates from this interface, kotlin function will check nullability then causes the crash.

The fix is to tweak the @NonNull declaration to @Nullable to get away with Kotlin nullable check.

Motivation

RUM-10958

Additional Notes

Anything else we should know when reviewing?

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Make sure you discussed the feature or bugfix with the maintaining team in an Issue
  • Make sure each commit and the PR mention the Issue number (cf the CONTRIBUTING doc)

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 89.28571% with 3 lines in your changes missing coverage. Please review.

Project coverage is 69.88%. Comparing base (fc39b65) to head (43a6780).

Files with missing lines Patch % Lines
.../instrumentation/gestures/FixedWindowCallback.java 88.89% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2800      +/-   ##
===========================================
- Coverage    69.90%   69.88%   -0.03%     
===========================================
  Files          831      832       +1     
  Lines        31138    31165      +27     
  Branches      5234     5234              
===========================================
+ Hits         21766    21777      +11     
- Misses        7896     7922      +26     
+ Partials      1476     1466      -10     
Files with missing lines Coverage Δ
.../instrumentation/gestures/WindowCallbackWrapper.kt 84.34% <100.00%> (-1.20%) ⬇️
.../instrumentation/gestures/FixedWindowCallback.java 88.89% <88.89%> (ø)

... and 36 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ambushwork
ambushwork marked this pull request as ready for review July 28, 2025 08:01
@ambushwork
ambushwork requested review from a team as code owners July 28, 2025 08:01

@mariusc83 mariusc83 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ambushwork
ambushwork merged commit 1a2833c into develop Jul 28, 2025
26 of 27 checks passed
@ambushwork
ambushwork deleted the yl/fix-window-callback-npe branch July 28, 2025 08:31
nguyexua added a commit that referenced this pull request Mar 9, 2026
Extend FixedWindowCallback instead of using try-catch overrides, matching
the pattern established in PR #2800. Add compileOnly dependency on
dd-sdk-android-rum to access FixedWindowCallback.
nguyexua added a commit that referenced this pull request Mar 9, 2026
Extend FixedWindowCallback instead of using try-catch overrides, matching
the pattern established in PR #2800. Add compileOnly dependency on
dd-sdk-android-rum to access FixedWindowCallback.
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.

4 participants