[forge-issues] [JBoss JIRA] (FORGE-1814) UISelectOne and UISelectMany's getValueChoices() should never return null

George Gastaldi (JIRA) issues at jboss.org
Tue May 13 12:50:56 EDT 2014


     [ https://issues.jboss.org/browse/FORGE-1814?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

George Gastaldi closed FORGE-1814.
----------------------------------

    Resolution: Done


> UISelectOne and UISelectMany's getValueChoices() should never return null
> -------------------------------------------------------------------------
>
>                 Key: FORGE-1814
>                 URL: https://issues.jboss.org/browse/FORGE-1814
>             Project: Forge
>          Issue Type: Enhancement
>          Components: UI - API
>    Affects Versions: 2.5.0.Final
>            Reporter: George Gastaldi
>            Assignee: George Gastaldi
>             Fix For: 2.5.1.Final
>
>
> {code}
> <aslak> gastaldi: speaking of NPE.. Forge doesn't handle null from setValueVoices().. or rather get i guess
> <aslak> Choices :)
> <gastaldi> aslak, let me create a test for that 
> <aslak> it basically goes into a for(T choice: input.getValueChoices())
> <gastaldi> hum, getValueChoices() should never be null afaik 
> <gastaldi> are you setting it to be null somewhere?
> <aslak> setVlaueChoices(->return null)
> <lincolnthree> gastaldi: yeah I think we need to fix the null situation on UISelectOne and UISelectMany, you shouldn't be able to get null, only an empty list IMO
> <gastaldi> right 
> <lincolnthree> sorry, not UISelectOne, that could be null
> <lincolnthree> just UISelectMany
> <lincolnthree> and UIInputMany
> <lincolnthree> shoudl return empty lists
> <lincolnthree> empty iterables
> <lincolnthree> or  whatever
> <gastaldi> we're talking about ValueChoices, so I think that applies to UISelectOne as well?
> <lincolnthree> gastaldi: ah, yeah ValueChoices does apply to that
> <lincolnthree> gastaldi: in regard to getValues() i think that should never be null either should it?
> <lincolnthree> for UIInputMany and UISelectMany
> <lincolnthree> just empty
> <gastaldi> hm, yeah, I think it shouldn't 
> <gastaldi> to avoid NPEs
> {code}



--
This message was sent by Atlassian JIRA
(v6.2.3#6260)


More information about the forge-issues mailing list