Uploaded image for project: 'Commons JEXL'
  1. Commons JEXL
  2. JEXL-275

Allow safe navigation as option

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.1
    • 3.2
    • None

    Description

      WHAT:
      The 'safe navigation' operator (?.) - allowing a null property to stop and return null in a navigation expression - has been introduced. However, in many occasions, being able to let the '.' and '[...]' operators behave 'safely' without reverting to the 'lenient' mode would be very convenient.
      Moreover, it seems 3.1 already allow 'safe' / silent navigation when calling methods / functions; fixing this behaviour will break existing scripts. Explicitly introducing this 'safe' behaviour would mitigate the (3.2) migration cost greatly.
      HOW:
      Builder option to set the flag, inject checking the flag when node.isSafeLhs(...) is used.

      Attachments

        Issue Links

          Activity

            People

              henrib Henri Biestro
              henrib Henri Biestro
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: