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

javax.faces.context.ResponseWriterWrapper implementation is overdone

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.0.6, 2.1.0
    • None
    • None

    Description

      When using IceFaces an NPE is encountered when one of the lower-level Writer calls is made against its DomResponseWriter (specifically this was a result of HtmlRendererUtils.renderSelectOptions() calling writer.write(TABULATOR)). This is because java.io.Writer delegates all forms of #write() back to the abstract write(char[], int, int) variant. MyFaces' version of ResponseWriterWrapper implements write(int) directly, whereas the spec actually not does declare this method as being implemented here and thus allows the default implementation from Writer to delegate to the char[], int, int version. Since the MyFaces version calls getWrapped().write(int), an NPE is thrown that would be avoided if IceFaces were permitted to proceed through the call sequence as implicitly promised by the spec. True implementation of the spec requires deleting each of:

      • append(char)
      • append(CharSequence)
      • append(CharSequence, int, int)
      • write(char[])
      • write(int)
      • write(String)
      • write(String, int, int)

      Attachments

        1. MYFACES-3132-1.patch
          5 kB
          Leonardo Uribe

        Activity

          People

            lu4242 Leonardo Uribe
            mbenson Matthew Jason Benson
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: