[ 
https://issues.apache.org/jira/browse/PIVOT-887?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13543295#comment-13543295
 ] 

Roger Whitcomb commented on PIVOT-887:
--------------------------------------

So, here is a possible solution (a combination of b) and c) above, but which is 
pretty safe, I think):
1) In the default constructor for Spinner, wrap the empty ArrayList in an 
ImmutableList (which throws an exception if you try to "add" something to it).
2) In BXMLSerializer, when trying to do a "sequence.add(element.value)" trap 
the UnsupportedOperationException and just do the 
"beanAdapter.put(element.value)" instead if the exception is thrown.

I think this is pretty safe because this should be the only time the exception 
would be thrown.  

Thoughts?  Comments?  Thanks.
                
> Tutorial example code for NumericSpinnerData doesn't work as shown
> ------------------------------------------------------------------
>
>                 Key: PIVOT-887
>                 URL: https://issues.apache.org/jira/browse/PIVOT-887
>             Project: Pivot
>          Issue Type: Bug
>          Components: tutorials
>    Affects Versions: 2.0.2, 2.0.3
>         Environment: All
>            Reporter: Roger Whitcomb
>            Assignee: Roger Whitcomb
>            Priority: Minor
>              Labels: spinner
>             Fix For: 2.0.3
>
>
> See mailing list archive for complete explanation:
> http://apache-pivot-users.399431.n3.nabble.com/Problem-using-wtk-content-NumericSpinnerData-td4022316.html

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to