Skip to content

Commit 71e9529

Browse files
committed
improve
1 parent 04c2e16 commit 71e9529

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

sentry/src/main/java/io/sentry/SentryTracer.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
package io.sentry;
22

3-
import static io.sentry.util.CollectionUtils.reverseListIterator;
4-
53
import io.sentry.protocol.Contexts;
64
import io.sentry.protocol.SentryId;
75
import io.sentry.protocol.SentryTransaction;
86
import io.sentry.protocol.TransactionNameSource;
97
import io.sentry.util.AutoClosableReentrantLock;
8+
import io.sentry.util.CollectionUtils;
109
import io.sentry.util.Objects;
1110
import io.sentry.util.SpanUtils;
1211
import java.util.List;
@@ -158,7 +157,7 @@ private void onDeadlineTimeoutReached() {
158157
// iterate in reverse order to ensure leaf spans are processed before their parents
159158
@NotNull
160159
final ListIterator<Span> iterator =
161-
reverseListIterator((CopyOnWriteArrayList<Span>) this.children);
160+
CollectionUtils.reverseListIterator((CopyOnWriteArrayList<Span>) this.children);
162161
while (iterator.hasPrevious()) {
163162
@NotNull final Span span = iterator.previous();
164163
span.setSpanFinishedCallback(null);
@@ -913,7 +912,7 @@ public void setName(@NotNull String name, @NotNull TransactionNameSource transac
913912
public @Nullable ISpan getLatestActiveSpan() {
914913
@NotNull
915914
final ListIterator<Span> iterator =
916-
reverseListIterator((CopyOnWriteArrayList<Span>) this.children);
915+
CollectionUtils.reverseListIterator((CopyOnWriteArrayList<Span>) this.children);
917916
while (iterator.hasPrevious()) {
918917
@NotNull final Span span = iterator.previous();
919918
if (!span.isFinished()) {

0 commit comments

Comments
 (0)