Uploaded image for project: 'Dev - Nexus Repo'
  1. Dev - Nexus Repo
  2. NEXUS-18509

Make JEXL and CSEL behave the same for expressions without a leading slash




      NEXUS-16703 made CSEL and JEXL content selectors work the same for expressions with a leading slash. The book and support documentation all push users towards using a leading slash in their path expressions.

      However there is still a discrepancy if you create a content selector with a path expression that doesn't have a leading slash. It will match in CSEL because internally the asset path doesn't have a leading slash, but it won't match in JEXL because it prefixes the path with a slash when creating the JXEL model (this was done previously to get JEXL to work with expressions that have a leading slash). Note that this also happens on master before NEXUS-16703, so this is not a recent regression.

      Also note that expressions migrated over from NXRM 2 should have leading slashes because that was the only supported approach. So this story is specifically dealing with expressions created in NXRM 3 that go against the advice to use a leading slash.

      The workaround is simple: introduce a leading slash as shown in the book examples.


          Issue Links



              • Assignee:
                mpiggott Matthew Piggott
                mcculls Stuart McCulloch
                Last Updated By:
                Joe Tom
                NXRM - Tron
              • Votes:
                0 Vote for this issue
                2 Start watching this issue


                • Created:
                  Date of First Response: