Uploaded image for project: 'Forge'
  1. Forge
  2. FORGE-1814

UISelectOne and UISelectMany's getValueChoices() should never return null

    Details

    • Type: Enhancement
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 2.5.0.Final
    • Fix Version/s: 2.6.0.Final
    • Component/s: UI - API
    • Labels:
      None

      Description

      <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
      

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                gastaldi George Gastaldi
                Reporter:
                gastaldi George Gastaldi
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: