Skip to content

Commit 3d1d119

Browse files
adinauerclaude
andcommitted
ref: Remove redundant trim of already-trimmed effective org ID
getEffectiveOrgId() already guarantees it returns either null or a trimmed, non-empty string. The defensive trim and empty check in shouldContinueTrace was dead code that could never change the result. Co-Authored-By: Claude <noreply@anthropic.com>
1 parent a3c86e7 commit 3d1d119

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

sentry/src/main/java/io/sentry/util/TracingUtils.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,9 +199,7 @@ public static boolean isIgnored(
199199
@ApiStatus.Internal
200200
public static boolean shouldContinueTrace(
201201
final @NotNull SentryOptions options, final @Nullable Baggage baggage) {
202-
final @Nullable String rawSdkOrgId = options.getEffectiveOrgId();
203-
final @Nullable String sdkOrgId =
204-
(rawSdkOrgId != null && !rawSdkOrgId.trim().isEmpty()) ? rawSdkOrgId.trim() : null;
202+
final @Nullable String sdkOrgId = options.getEffectiveOrgId();
205203
final @Nullable String rawBaggageOrgId = baggage != null ? baggage.getOrgId() : null;
206204
final @Nullable String baggageOrgId =
207205
(rawBaggageOrgId != null && !rawBaggageOrgId.trim().isEmpty())

0 commit comments

Comments
 (0)