Skip to content

Commit

Permalink
Fix compiler warning in TimedEventWatchdog
Browse files Browse the repository at this point in the history
info is always null as it's explicitly set that way 2 lines above
  • Loading branch information
akurtakov committed Sep 27, 2023
1 parent ed3972f commit 253dd20
Showing 1 changed file with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -219,15 +219,11 @@ public void endEvent() {
StackNode s = depth < stack.length ? stack[depth] : null;
if (s != null) {
int duration = (int) (getTimestamp() - s.startTime);
LongEventInfo info = null;

if (duration >= threshold_ms) {
if (info == null) {
info = new LongEventInfo(s.startingSequenceNumber,
dispatchSequenceNumber, s.startTime, duration, depth,
maxRecursiveDepth);
}

LongEventInfo info = new LongEventInfo(s.startingSequenceNumber,
dispatchSequenceNumber, s.startTime, duration, depth,
maxRecursiveDepth);
onLongEvent(info);
}
}
Expand Down

0 comments on commit 253dd20

Please sign in to comment.