Uploaded image for project: 'WildFly Core'
  1. WildFly Core
  2. WFCORE-5705

Formalize ExpressionResolver behavior regarding returning null

    XMLWordPrintable

Details

    Description

      The ExpressionResolver interface declares that the resolveExpression methods will not return null. But some impls intended to handle only certain kinds of expressions do return null, and doing so is useful for how they are used, as doing so indicates that they didn't recognize the input string as valid for the kind of expression they're meant to resolve. RuntimeExpressionResolver relies on this behavior as it uses plugged in resolvers.

      This should be clarified, perhaps by adding a different interface for these plugin resolvers that uses a different semantic, or perhaps by modifying ExpressionResolver to note that null can be returned, but also adding a boolean method that declares whether a particular impl object will do so. Callers that don't want null could reject use of impls that return null. The different interface approach sounds much better from a proper OO design point of view.

      Attachments

        Activity

          People

            bstansbe@redhat.com Brian Stansberry
            bstansbe@redhat.com Brian Stansberry
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: