Uploaded image for project: 'MyFaces Core'
  1. MyFaces Core
  2. MYFACES-2144

<render-kit> parsing problem

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.2.7-SNAPSHOT
    • 1.2.7
    • None
    • None

    Description

      There is a small error in DigesterFacesConfigDispenserImpl.feed() method.

      In the for-loop responsible for storing the render kits, when no render kit id was specified in the file being parsed (i.e. renderKit.getId() is null), we default the render kit id to "HTML_BASIC". Later we store the render kit in a map (renderKits), with key being the render kit id. However, the code erroneously uses null as the key, instead of "HTML_BASIC". This, of course, breaks FacesConfigurator.configureRenderKits() once it tries to add a render kit with a 'null' id.

      I suspect that the reason for this bug going unnoticed until now is that the 'null' key will only be used if the FIRST <render-kit> found on the class path does not specify an explicit id. All subsequent <render-kit> declarations are merged into the element with the correct key (HTML_BASIC), which is why it works as long as the first <render-kit> has an id.

      I'm uploading a patch with a fix for this bug.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            bommel Bernd Bohmann
            vace117 Val Blant
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment