Skip to content

Commit 8604b04

Browse files
antonisclaude
andcommitted
style(android): Satisfy PMD SimplifyBooleanReturns
Collapse the trailing if/return-false in isAllowedUri into a single boolean expression. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent b207edb commit 8604b04

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

packages/core/android/src/main/java/io/sentry/react/RNSentryModuleImpl.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1142,10 +1142,7 @@ static boolean isAllowedUri(@NotNull Uri uri, @Nullable Context ctx) {
11421142
if ("content".equals(lowerScheme)) {
11431143
return isAllowedContentAuthority(uri.getAuthority(), ctx);
11441144
}
1145-
if ("file".equals(lowerScheme)) {
1146-
return isPathUnderAppDirs(uri.getPath(), ctx);
1147-
}
1148-
return false;
1145+
return "file".equals(lowerScheme) && isPathUnderAppDirs(uri.getPath(), ctx);
11491146
}
11501147

11511148
@VisibleForTesting

0 commit comments

Comments
 (0)