The compareTo method has a bug in IEEE1516eHLAfloat64Time under OHLA 0.6, if the rhs time exceeds the maximum integer value, the result can overflow to negative values giving the opposite return value as expected.
Recommended change from:
return (int) Math.round(time - rhs.getValue());
to:
return new Double(time - rhs.getValue()).intValue();
to safely cast the integer result.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks! Would it be helpful to use the bug tracker in the future? I would have posted it there but didn't seem to have been updated in a while (and didn't seem to have the correct version in the drop-down).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
There is not a lot of bug traffic, so, posting here is just fine. I'll try to update it so that if someone does try to use it, at least it will be up-to-date.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The compareTo method has a bug in IEEE1516eHLAfloat64Time under OHLA 0.6, if the rhs time exceeds the maximum integer value, the result can overflow to negative values giving the opposite return value as expected.
Recommended change from:
return (int) Math.round(time - rhs.getValue());
to:
return new Double(time - rhs.getValue()).intValue();
to safely cast the integer result.
Thanks for the bug report.
I updated all the compareTo() methods to use Long.compare() and Double.compare().
Thanks! Would it be helpful to use the bug tracker in the future? I would have posted it there but didn't seem to have been updated in a while (and didn't seem to have the correct version in the drop-down).
There is not a lot of bug traffic, so, posting here is just fine. I'll try to update it so that if someone does try to use it, at least it will be up-to-date.