Abhishek Pal created RATIS-2456:
-----------------------------------
Summary: TimeDuration min and max calculation can avoid stream
usage
Key: RATIS-2456
URL: https://issues.apache.org/jira/browse/RATIS-2456
Project: Ratis
Issue Type: Improvement
Components: util
Reporter: Abhishek Pal
Assignee: Abhishek Pal
Currently `TimeDuration.min()` and `TimeDuration.max()` streams the durations
and then compares them with `orElseThrow()`.
However orElseThrow seems to be dead code since we already assert that "left"
and "right" are non-null and a stream of two non-null elements will not be
empty.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)