API change request (RT-23413)

Richard Bair richard.bair at oracle.com
Fri Jul 20 10:04:42 PDT 2012

Right, so the place where somebody would get tripped up by this change is if they use the same FXMLLoader instance for loading multiple different FXML files, is that right?

One other thing I just thought of right this moment -- what if we auto-cleared the imports when calling load on a different URL than was used the last time?


On Jul 20, 2012, at 10:01 AM, Greg Brown wrote:

> This change would add a clearImports() method to FXMLLoader. See http://javafx-jira.kenai.com/browse/RT-23413.
> Justification (from JIRA):
> "If the FXMLLoader is used to load the same fxml-file mutliple times, it should be able to cache the collected information about classes and properties between the load() calls. This would massively improve the performance when using one fxml-file to describe an arbitrary number of objects."
> Implementation:
> FXMLLoader no longer clears the imports when load() is called; instead, any previous imports are preserved. Callers can explicitly clear the imports via a new method named clearImports(); however, in practice, this won't generally be necessary, since FXMLLoader instances are typically only used once and then disposed. 

More information about the openjfx-dev mailing list