Skip to content

Commit e3d0cf9

Browse files
buenaflorclaude
andcommitted
fix(extend-app-start): Guard setAppStartExtender against null
Match the NoOp-fallback convention used by other SentryOptions setters: accept a @nullable argument and coalesce to NoOpAppStartExtender so the @NotNull field and getter can never be nulled out. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent a571467 commit e3d0cf9

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

sentry/src/main/java/io/sentry/SentryOptions.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2667,8 +2667,9 @@ public void setFullyDisplayedReporter(
26672667
}
26682668

26692669
@ApiStatus.Internal
2670-
public void setAppStartExtender(final @NotNull IAppStartExtender appStartExtender) {
2671-
this.appStartExtender = appStartExtender;
2670+
public void setAppStartExtender(final @Nullable IAppStartExtender appStartExtender) {
2671+
this.appStartExtender =
2672+
appStartExtender != null ? appStartExtender : NoOpAppStartExtender.getInstance();
26722673
}
26732674

26742675
/**

0 commit comments

Comments
 (0)