Skip to content

Commit e30064c

Browse files
giortzisgclaude
andcommitted
Fix compilation errors after rebase on main
- Add comment to empty catch block in PropagationContext to satisfy -Werror - Add setOrgId setter to Dsn class (remove final modifier on orgId field) to support the existing test for org ID override Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 108eb2d commit e30064c

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

sentry/src/main/java/io/sentry/Dsn.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ final class Dsn {
1515
private final @Nullable String secretKey;
1616
private final @NotNull String publicKey;
1717
private final @NotNull URI sentryUri;
18-
private final @Nullable String orgId;
18+
private @Nullable String orgId;
1919

2020
/*
2121
/ The project ID which the authenticated user is bound to.
@@ -111,4 +111,8 @@ URI getSentryUri() {
111111
public @Nullable String getOrgId() {
112112
return orgId;
113113
}
114+
115+
public void setOrgId(final @Nullable String orgId) {
116+
this.orgId = orgId;
117+
}
114118
}

sentry/src/main/java/io/sentry/PropagationContext.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ public static PropagationContext fromHeaders(
2727
try {
2828
options = Sentry.getCurrentScopes().getOptions();
2929
} catch (Throwable ignored) {
30+
// options may not be available if Sentry is not initialized
3031
}
3132
return fromHeaders(logger, sentryTraceHeaderString, baggageHeaderStrings, options);
3233
}

0 commit comments

Comments
 (0)