Skip to content

RUMM-2769 Fix NPE in ScreenRecorder when wrapping a null window.callback#1164

Merged
mariusc83 merged 1 commit into
feature/sdkv2from
mconstantin/rumm-2769/fix-npe-in-sr-screen-recorder
Nov 29, 2022
Merged

RUMM-2769 Fix NPE in ScreenRecorder when wrapping a null window.callback#1164
mariusc83 merged 1 commit into
feature/sdkv2from
mconstantin/rumm-2769/fix-npe-in-sr-screen-recorder

Conversation

@mariusc83

Copy link
Copy Markdown
Member

What does this PR do?

A brief description of the change being made with this pull request.

Motivation

What inspired you to submit this pull request?

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)

@mariusc83 mariusc83 self-assigned this Nov 29, 2022
@mariusc83
mariusc83 force-pushed the mconstantin/rumm-2769/fix-npe-in-sr-screen-recorder branch from 1df9a55 to bbd794f Compare November 29, 2022 13:14
@mariusc83
mariusc83 marked this pull request as ready for review November 29, 2022 13:16
@mariusc83
mariusc83 requested a review from a team as a code owner November 29, 2022 13:16
testedRecorder.startRecording(mockActivity)

// Then
val captor = argumentCaptor<Window.Callback>()

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.

minor: we can use lambda syntax with captor == this

argumentCaptor<Window.Callback>() {
   ...
}

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I find it a bit unreadable for me that way :). That's the reason I prefer to non-lambda way.

@xgouchet xgouchet added the size-small This PR is small sized label Nov 29, 2022
@codecov-commenter

codecov-commenter commented Nov 29, 2022

Copy link
Copy Markdown

Codecov Report

Merging #1164 (bbd794f) into feature/sdkv2 (7fdd524) will decrease coverage by 0.09%.
The diff coverage is 51.52%.

@@                Coverage Diff                @@
##           feature/sdkv2    #1164      +/-   ##
=================================================
- Coverage          82.33%   82.25%   -0.09%     
=================================================
  Files                352      353       +1     
  Lines              11813    11839      +26     
  Branches            2012     2015       +3     
=================================================
+ Hits                9726     9737      +11     
- Misses              1461     1481      +20     
+ Partials             626      621       -5     
Impacted Files Coverage Δ
...droid/sessionreplay/recorder/NoOpWindowCallback.kt 6.25% <6.25%> (ø)
...g/android/sessionreplay/recorder/ScreenRecorder.kt 94.12% <94.12%> (+2.45%) ⬆️
...android/log/internal/logger/TelemetryLogHandler.kt 85.71% <0.00%> (-14.29%) ⬇️
...src/main/kotlin/com/datadog/android/DatadogSite.kt 83.33% <0.00%> (-3.33%) ⬇️
...ndroid/telemetry/internal/TelemetryEventHandler.kt 69.17% <0.00%> (-2.50%) ⬇️
...ain/java/com/datadog/opentracing/PendingTrace.java 58.62% <0.00%> (-0.86%) ⬇️
...rc/main/java/com/datadog/opentracing/DDTracer.java 55.65% <0.00%> (-0.84%) ⬇️
...android/rum/internal/ndk/DatadogNdkCrashHandler.kt 87.19% <0.00%> (ø)
...android/v2/core/internal/DatadogContextProvider.kt 81.54% <0.00%> (ø)
...android/v2/core/internal/net/DataOkHttpUploader.kt 94.52% <0.00%> (ø)
... and 8 more

@mariusc83
mariusc83 merged commit 5227927 into feature/sdkv2 Nov 29, 2022
@mariusc83
mariusc83 deleted the mconstantin/rumm-2769/fix-npe-in-sr-screen-recorder branch November 29, 2022 13:40
@xgouchet xgouchet added this to the 1.17.0 milestone Dec 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size-small This PR is small sized

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants