Cleaning up Control codebase - How to deal with StyleableProperty cast
Tom Schindl
tom.schindl at bestsolution.at
Mon Apr 28 21:57:34 UTC 2014
Hi,
Interesting is that only the Eclipse Java Compiler shows a warning.
javac is fine with original code.
Let me see what the Eclipse compiler guys have to say about that!
Tom
On 28.04.14 23:33, Tom Schindl wrote:
> Hi,
>
> I've been cleaning up the warnings inside the controls code base and one
> of the warnings left (beside many generic problems in the *View-classes)
> is the casting from *Property to *StyleableProperty.
>
>> final StyleableProperty<Boolean> prop = (StyleableProperty<Boolean>)focusTraversableProperty();
>
> now I think I found a way to get away with out an unchecked cast warning
> by writing
>
>> final StyleableProperty<Boolean> prop = (StyleableProperty<Boolean>)(WritableValue<Boolean>)focusTraversableProperty();
>
> Anyone having a better idea?
>
> Tom
>
More information about the openjfx-dev
mailing list