Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
refactor tombstone java frame name normalization
Applied via @cursor push command
  • Loading branch information
cursoragent committed Mar 26, 2026
commit dee5f92a2b1926aa1e2ea018d26b8f3bf025823a
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,9 @@ private SentryStackTrace createStackTrace(@NonNull final TombstoneThread thread)
final SentryStackFrame stackFrame = new SentryStackFrame();
if (isJavaFrame(frame)) {
stackFrame.setPlatform("java");
final String module = extractJavaModuleName(frame.functionName);
stackFrame.setFunction(extractJavaFunctionName(frame.functionName));
final String normalizedFunctionName = normalizeFunctionName(frame.functionName);
final String module = extractJavaModuleName(normalizedFunctionName);
stackFrame.setFunction(extractJavaFunctionName(normalizedFunctionName));
stackFrame.setModule(module);

// For Java frames, check in-app against the module (package name), which is what
Expand Down Expand Up @@ -217,21 +218,19 @@ private static String normalizeFunctionName(String fqFunctionName) {
return normalized;
}

private static @Nullable String extractJavaModuleName(String fqFunctionName) {
final String normalized = normalizeFunctionName(fqFunctionName);
if (normalized.contains(".")) {
return normalized.substring(0, normalized.lastIndexOf("."));
private static @Nullable String extractJavaModuleName(String normalizedFunctionName) {
if (normalizedFunctionName.contains(".")) {
return normalizedFunctionName.substring(0, normalizedFunctionName.lastIndexOf("."));
} else {
return null;
}
}
Comment thread
cursor[bot] marked this conversation as resolved.

private static @Nullable String extractJavaFunctionName(String fqFunctionName) {
final String normalized = normalizeFunctionName(fqFunctionName);
if (normalized.contains(".")) {
return normalized.substring(normalized.lastIndexOf(".") + 1);
private static @Nullable String extractJavaFunctionName(String normalizedFunctionName) {
if (normalizedFunctionName.contains(".")) {
return normalizedFunctionName.substring(normalizedFunctionName.lastIndexOf(".") + 1);
} else {
return normalized;
return normalizedFunctionName;
}
}
Comment thread
cursor[bot] marked this conversation as resolved.

Expand Down
Loading