MyFaces Core
  1. MyFaces Core
  2. MYFACES-1420

Null Pointer Exception in SelectItemsIterator.next() if binding is null

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.1.4, 1.1.5-SNAPSHOT
    • Fix Version/s: 1.1.5
    • Component/s: None
    • Labels:
      None
    • Environment:
      Linux Fedora core 5

      Description

      NPE is thrown at line 183 of org.apache.myfaces.shared_impl.util.SelectItemsIterator.next() if value binding property of the current UISelectItems component is null. This is not relevant, as the exception expected at that place in the code is IllegalArgumentException. By constructing the IllegalArgumentException message, a check whether the binding is null should be made, like it's done at line 143 of the same class.

      1. _SelectItemsIterator.patch
        0.9 kB
        Steve Ziegler
      2. SelectItemsIterator_modified.java
        7 kB
        Horia Barca

        Activity

        Hide
        Manfred Geiler added a comment -

        patch applied

        Show
        Manfred Geiler added a comment - patch applied
        Hide
        Steve Ziegler added a comment -

        provided patch based on Horia's code sample and suggestion.

        Show
        Steve Ziegler added a comment - provided patch based on Horia's code sample and suggestion.
        Hide
        Mike Kienenberger added a comment -

        It's a standard format that programs generate for creating patches.

        Here's a pretty good explanation:

        http://cwiki.apache.org/confluence/display/CAY/Submit+Patch

        Show
        Mike Kienenberger added a comment - It's a standard format that programs generate for creating patches. Here's a pretty good explanation: http://cwiki.apache.org/confluence/display/CAY/Submit+Patch
        Hide
        Horia Barca added a comment -

        Ok, I'm attaching what in my opinion the SelectItemsIterator clas file should be. I hope that is what you wanted.

        Show
        Horia Barca added a comment - Ok, I'm attaching what in my opinion the SelectItemsIterator clas file should be. I hope that is what you wanted.
        Hide
        Horia Barca added a comment -

        Sorry, I'm new here. What is a "unified diff"?

        Show
        Horia Barca added a comment - Sorry, I'm new here. What is a "unified diff"?
        Hide
        Mike Kienenberger added a comment -

        Can you provide this in the form of a unified diff, uploaded as a file attachment to this issue? Thanks.

        Show
        Mike Kienenberger added a comment - Can you provide this in the form of a unified diff, uploaded as a file attachment to this issue? Thanks.

          People

          • Assignee:
            Manfred Geiler
            Reporter:
            Horia Barca
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development