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

Validators.validate() fails with NPE when expressionString is null

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Optional
    • Resolution: Done
    • Affects Version/s: 1.1.6.GA
    • Fix Version/s: 1.3.0.ALPHA
    • Component/s: Core
    • Labels:
      None
    • Environment:

      Any

      Description

      public InvalidValue[] validate(FacesContext context, String propertyExpression, Object value)

      The propertyExpression, which is extracted from a ValueBinding, by ModelValidator, may be null in some circumstances. I use custom ValueExpression implementations in a couple of places which are not derived from an EL string so return null from getExpressionString().

      validate() should probably check for null and quietly 'return new InvalidValue[ 0 ]' like it does when it cannot parse the expression string properly.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                pmuir Pete Muir
                Reporter:
                quilleashm Mike Quilleash
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: