File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed
sentry-android-core/src/main/java/io/sentry/android/core Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -45,17 +45,19 @@ public class SpanFrameMetricsCollector
4545 private final @ NotNull SortedSet <ISpan > runningSpans =
4646 new TreeSet <>(
4747 (o1 , o2 ) -> {
48+ if (o1 == o2 ) {
49+ return 0 ;
50+ }
4851 int timeDiff = o1 .getStartDate ().compareTo (o2 .getStartDate ());
4952 if (timeDiff != 0 ) {
5053 return timeDiff ;
51- } else {
52- // TreeSet uses compareTo to check for duplicates, so ensure that
53- // two non-equal spans with the same start date are not considered equal
54- return o1 .getSpanContext ()
55- .getSpanId ()
56- .toString ()
57- .compareTo (o2 .getSpanContext ().getSpanId ().toString ());
5854 }
55+ // TreeSet uses compareTo to check for duplicates, so ensure that
56+ // two non-equal spans with the same start date are not considered equal
57+ return o1 .getSpanContext ()
58+ .getSpanId ()
59+ .toString ()
60+ .compareTo (o2 .getSpanContext ().getSpanId ().toString ());
5961 });
6062
6163 // all collected frames, sorted by frame end time
You can’t perform that action at this time.
0 commit comments