The Duration class toString() method returns "INDEFINITE", "UNKNOWN", or a number followed by " ms", to represent duration. Conversely, the Duration.valueOf(String) method expects a string in the form "[number][ms|s|m|h]" to parse into a Duration.
This results in two issues:
1) when a user wishes to make a duration INDEFINITE or UNKNOWN from FXML, as the FXMLLoader simply calls Duration.valueOf(...), and this can not currently accept these strings.
2) toString() includes a space between the number and the "ms" text, whereas valueOf(String) expects there to be no space. This means even valid output from toString() is not able to be parsed by valueOf().
This results in two issues:
1) when a user wishes to make a duration INDEFINITE or UNKNOWN from FXML, as the FXMLLoader simply calls Duration.valueOf(...), and this can not currently accept these strings.
2) toString() includes a space between the number and the "ms" text, whereas valueOf(String) expects there to be no space. This means even valid output from toString() is not able to be parsed by valueOf().