Uploaded image for project: 'Tapestry'
  1. Tapestry
  2. TAPESTRY-732

LabeledPropertySelectionModel should support null String values

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 4.0
    • Fix Version/s: 4.1.1
    • Component/s: Framework
    • Labels:
      None

      Description

      Just for robustness, LabeledPropertySelectionModel (and similar implementations of IPropertySelectionModel), should support null values in translateField:

      public Object translateValue(String value)

      { return value.equals(_value) ? _option : _model.translateValue(value); }

      This is throwing NPEs when value is null. I think null could be a valid value in some cases, but in any case, it doesn't hurt to handle nulls in this method (or at least throw a more verbose NPE?).

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              lquijano Leonardo Quijano Vincenzi
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: