ekaterinadimitrova2 commented on code in PR #1754:
URL: https://github.com/apache/cassandra/pull/1754#discussion_r932575764
##########
src/java/org/apache/cassandra/config/DataRateSpec.java:
##########
@@ -212,7 +213,7 @@ public boolean equals(Object obj)
@Override
public String toString()
{
- return Math.round(quantity) + unit.symbol;
+ return DoubleMath.isMathematicalInteger(quantity) ? ((long)quantity +
unit.symbol) : (quantity + unit.symbol);
Review Comment:
Haha yes, definitely, sorry not my day :-( in that sense, both will work
truncate and round but it doesn’t make sense to do round when w know already it
is a round number…
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]