What the Duration of negative Infinity mean?

Richard Bair richard.bair at oracle.com
Wed Jan 30 15:22:06 PST 2013


http://javafx-jira.kenai.com/browse/RT-23951

I recently added to ScheduledService, and it supported all the boundary conditions (isIndefinite, isUnknown) of a Duration. Right now NEGATIVE_INFINITY is not handled at all in Duration. POSITIVE_INFINITY maps to isIndefinite and NaN maps to isUnknown.

It seems like NEGATIVE_INFINITY should also cause isIndefinite to return true. Some code (including mine) was assuming isIndefinite was positive, but that would not now necessarily be the case.

Thoughts?

Richard


More information about the openjfx-dev mailing list