Details

    • Type: Task
    • Status: Deployed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.0.0.106
    • Fix Version/s: 5.1.0.11
    • Labels:
      None

      Description

      Copied from https://issues.jboss.org/browse/RAILO-2580

      See http://cfmlblog.adamcameron.me/2013/08/thinking-about-operators-in-cfml.html
      This is best demonstrated with an example:

      a = {
      	b = {
      		c = {
      			d = 1
      		}
      	}
      };
      writeOutput(a?.b?.c?.d); // 1
      writeOutput(a?.e?.c?.d); // null
      writeOutput(a.e.c.d); // ERROR
      

      So rather than erroring because a.e doesn't exist, it gracefully returns null. Nice. This saves a lot of sequential structKeyExists() calls, or (grim) an isDefined() call.

        Attachments

          Activity

            People

            • Assignee:
              michaeloffner Michael Offner
              Reporter:
              da_cameron Adam Cameron
            • Votes:
              5 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: