Re: Cleaning up Control codebase - How to deal with StyleableProperty cast

2014-05-02 Thread Tom Schindl
Hi, Yes if i turn on this unnecessary type cast warning in Eclipse I get that as well. Currently the only solution to get around with ANY warning suppression I found is to use an intermediate variable. Tom On 28.04.14 23:57, Jonathan Giles wrote: This seems to look fine - IntelliJ still

Re: Cleaning up Control codebase - How to deal with StyleableProperty cast

2014-05-01 Thread Tom Schindl
Hi Jonathan David, do you have any opinion on this? I would spend some time tomorrow to bring down the warning count. Maybe we should use the Styleable*Property cast when we control both the API implementation and reside to the more save (StyleablePropertyBoolean)(WritableValueBoolean) e.g. if

Re: Cleaning up Control codebase - How to deal with StyleableProperty cast

2014-05-01 Thread David Grieve
I don't have a strong opinion, other than a preference for having it done one way in all cases. So it seems (StyleablePropertyBoolean)(WritableValueBoolean) would be the way to go. On 5/1/14, 12:25 PM, Tom Schindl wrote: Hi Jonathan David, do you have any opinion on this? I would spend some

Re: Cleaning up Control codebase - How to deal with StyleableProperty cast

2014-05-01 Thread Jonathan Giles
I agree with David. Let's go that way and see where things end up. As always, thanks Tom for being relentless in pushing this forward. -- Jonathan On 2/05/2014 1:27 p.m., David Grieve wrote: I don't have a strong opinion, other than a preference for having it done one way in all cases. So it

Re: Cleaning up Control codebase - How to deal with StyleableProperty cast

2014-04-30 Thread Tom Schindl
Hi, According to Eclipse Compiler people we probably found a bug in javac. They cited the following paragraph from the spec: A cast from a type S to a parameterized type (ยง4.5) T is unchecked unless at least one of the following is true: * S : T * All of the type arguments

Re: Cleaning up Control codebase - How to deal with StyleableProperty cast

2014-04-30 Thread Tom Schindl
Hi, On 29.04.14 14:35, David Grieve wrote: I've found that this works: final StyleableBooleanProperty prop = (StyleableBooleanProperty)focusTraversableProperty(); Right i can confirm that. The problem is that we are then relying even more on the fact the upstream code does not