Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8146220

KeyFrame at Duration.ZERO is never getting applied

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 8u66
    • javafx
    • JDK 8u66, Win 8.1, 64 Bit

    • x86
    • windows_8

      The attached test case proofs that a key frame at exactly Duration.ZERO _is not_ getting applied, but that a key frame at a slightly later time (e. g. Duration.millis(0.1)) _is_ getting applied.

      The JavaDocs of KeyFrame#getTime clearly say that it is definitively valid to have a key frame exactly at Duration.ZERO, so either this is a bug in the JavaDocs or in the implementation: <quote>The time of a KeyFrame has to be greater than OR EQUAL TO Duration.ZERO and it cannot be Duration.UNKNOWN.</quote>

      While clearly unexpected problems arise from skipping key frames (e. g. initial property change event not fired), there is a simple workaround: Using at key frame at a time of 0.1ms instead of exactly 0.0ms.

            kcr Kevin Rushforth
            mkarg Markus Karg
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: