MyFaces Core
  1. MyFaces Core
  2. MYFACES-3081

javax.faces.Application addBehaviors() throws UnsupportedOperationException when it shouldn't

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.5-SNAPSHOT
    • Fix Version/s: 2.0.5
    • Component/s: General
    • Labels:
      None

      Description

      Line 140 of javax.faces.Application is currently:

      application.addBehavior(behaviorId, behaviorClass);

      when it should be:

      return application.addBehavior(behaviorId, behaviorClass);

      without the return we fall through and throw the UnsupportedOperationException when we shouldn't.

      1. MYFACES-3081.patch
        0.5 kB
        Michael Freedman

        Activity

        Hide
        Leonardo Uribe added a comment -

        Thanks to Michael Freedman for provide this patch.

        Show
        Leonardo Uribe added a comment - Thanks to Michael Freedman for provide this patch.
        Hide
        Michael Freedman added a comment -

        Oops – meant the fix is:
        application.addBehavior(behaviorId, behaviorClass);
        return;

        See patch file.

        Show
        Michael Freedman added a comment - Oops – meant the fix is: application.addBehavior(behaviorId, behaviorClass); return; See patch file.
        Hide
        Michael Freedman added a comment -

        Simple patch for the problem.

        Show
        Michael Freedman added a comment - Simple patch for the problem.
        Hide
        Leonardo Uribe added a comment -

        Ok, no problem. I saw the problem and I already did as expected.

        Show
        Leonardo Uribe added a comment - Ok, no problem. I saw the problem and I already did as expected.

          People

          • Assignee:
            Leonardo Uribe
            Reporter:
            Michael Freedman
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development