Public constructor for AbsoluteDate


Is there a reason why the following AbsoluteDate’s constructor is package private?

    AbsoluteDate(final long epoch, final double offset) {
        this.epoch  = epoch;
        this.offset = offset;

It could be very useful for serialization but we need it to be public

Thank you,

Yes, there is a reason : the split between epoch and offset is an implementation detail and we need to have the offset between 0 and 1


Do you think a check could be added in constructor ? It could throw exception in case offset is wrong? It should be a good behavior anyway.

Best regards,


I fear performance issues due to adding an if statement in such a low level method which we call millions of time each time we run anything significant, but I may be overreacting.

[edit] well, I am clearly overreacting as this specific constructor is called only by FieldAbsoluteDate.toAbsoluteDate()!


I understand that is finally ok for you?

We can contribute this in the coming weeks : we have time to think of it in the while.

Best regards

Yes it is OK for me.