Proposal on getting warning free (controls) packages

Jonathan Giles jonathan.giles at
Thu Mar 20 20:03:27 UTC 2014

I'll leave it to David to comment on the specifics of these warnings,
but in general I'm very supportive of improving the quality of the
controls code. It would be best to file a new jira issue and start
putting patches up there (although for that to happen you'll need to
email the patch to me so that I may attach it on your behalf).


-- Jonathan

On 21/03/2014 8:57 a.m., Tom Schindl wrote:
> Hi,
> I've just started looking into getting the controls package warning free
> and/or suppress them in case not fixable.
> Most of the generic warnings I've come accross in a first pass involve
> StyleableProperty cast like this:
> ((StyleableProperty)graphicProperty()).applyStyle(origin, null);
> In fact above code has 2 warnings:
> a) unchecked type cast
> b) usage of raw-type
> the raw type in this case can be fixed with:
> ((StyleableProperty<Node>)graphicProperty()).applyStyle(origin, null);
> leaving us with the unchecked cast so we could add:
> @SuppressWarnings({ "unchecked" })
> e.g. on the method but I'm uncertain this is a good idea because it
> might hide unchecked warnings we have a possibility to fix.
> So what are other options:
> a) Create a static helper in Util to make the cast and for us (we could
>    even add it as a static method in the StyleableProperty-interface)
> b) provide a private/package-scoped method the public one delegates
> Both of them work but have different problems where I think b) has the
> bigger ones like blowing up class-file, modification of the field to be
> of type StyleableObjectProperty.
> I'd really like to get the source warning free.
> Thoughts?
> Tom

More information about the openjfx-dev mailing list