Skip to content

Commit f7473a5

Browse files
committed
clean up TombstoneParser.normalizeFunctionName()
1 parent 9025dfe commit f7473a5

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

sentry-android-core/src/main/java/io/sentry/android/core/internal/tombstone/TombstoneParser.java

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -209,14 +209,9 @@ private static String normalizeFunctionName(String fqFunctionName) {
209209
// reliably indicates the with_signature format.
210210
final int spaceIndex = normalized.indexOf(' ');
211211
if (spaceIndex >= 0) {
212-
// Strip return type prefix
213-
normalized = normalized.substring(spaceIndex + 1).trim();
214-
215-
// Strip parameter list suffix
216-
final int parenIndex = normalized.indexOf('(');
217-
if (parenIndex >= 0) {
218-
normalized = normalized.substring(0, parenIndex);
219-
}
212+
final int parenIndex = normalized.indexOf('(', spaceIndex);
213+
normalized =
214+
normalized.substring(spaceIndex + 1, parenIndex >= 0 ? parenIndex : normalized.length());
220215
}
221216

222217
return normalized;

0 commit comments

Comments
 (0)