What the Duration of negative Infinity mean?
Werner Lehmann
lehmann at media-interactive.de
Thu Jan 31 05:50:50 PST 2013
Makes sense to me as well. Unless a negative duration is common usecase
in existing code. BTW, the ticket is private (apparently).
On 31.01.2013 09:12, Martin Sladecek wrote:
> Is there a reason why we support negative values in Duration at all?
> Maybe we should throw IllegalArgumentException when some negative value
> is set in one of the factory methods.
>
> -Martin
>
> On 01/31/2013 12:22 AM, Richard Bair wrote:
>> 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