Skip to content

Commit

Permalink
PeerMonitor: Simplify a switch-case.
Browse files Browse the repository at this point in the history
  • Loading branch information
Andreas Schildbach authored and ripcurlx committed Aug 17, 2021
1 parent 94e3376 commit 2db21d9
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,9 @@ public Object getValueAt(int row, int col) {
case CHAIN_HEIGHT:
return peer.getBestHeight();
case PING_TIME:
return peer.getPingTime();
case LAST_PING_TIME:
return col == PING_TIME ? peer.getPingTime() : peer.getLastPingTime();
return peer.getLastPingTime();

default: throw new RuntimeException();
}
Expand Down

0 comments on commit 2db21d9

Please sign in to comment.