Uploaded image for project: 'Seam 2'
  1. Seam 2
  2. JBSEAM-1355

ConverterChain.getAsString behaves incorrectly if the input is String already

    Details

      Description

      ConverterChain.getAsString(FacesContext context, UIComponent component, Object value) will return null if value is String already. It should cast the value to String and return that instead. Proposed fix: change

      String output = null;

      to

      String output = value instanceof String ? (String) value : null;

      This happens when UIComponent.value is bound to a String property. In this case no "final" converter will be added to the chain, so output will be null after the loop in getAsString.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                pmuir Pete Muir
                Reporter:
                sergeypk Sergey Koshcheyev
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: