Heads up: fix for RT-24272 (reference to create() in builders is ambiguous)

Eva Krejcirova eva.krejcirova at oracle.com
Mon Dec 3 06:40:25 PST 2012


Hi all,

I plan to push a fix for RT-24272 (TableView reference to create is 
ambiguous) soon.
This is a source incompatible change and might will change of the source 
code which uses affected builders (hence the heads-up).

What's the fix for: due to some changes in Java 7 compiler, builders for 
generic classes (e.g. TableViewBuilder) are currently unusable - there 
is no way to call their create() method.

The fix will add another create method to parametrized builders which 
will take the type as an argument e.g.
     public static <S> javafx.scene.control.TableViewBuilder<S, ?> 
create(final Class<S> type1) {
         return new javafx.scene.control.TableViewBuilder();
     }
and make the create() without arguments non-generic, so it hides the 
create in Region:
     public static javafx.scene.control.TableViewBuilder<?, ?> create() {
         return new javafx.scene.control.TableViewBuilder();
     }

This way, the user can create the builder like this:
TableViewBuilder.create(Job.class);

Regards,
Eva


More information about the openjfx-dev mailing list