Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-4658

Outer join: name(b) and localname(b) can throw a NPE

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.4.7, 1.5.8, 1.6.0
    • Component/s: query
    • Labels:
      None

      Description

      Outer join queries with a condition of "name(joinSelector) = 'x'" or "localname(joinSelector) = 'x'" can result in a NullPointerException. This is because the code doesn't take the "no-match" case into account (that the joined selector doesn't have a node). Example queries:

      select a.[jcr:path] from [nt:base] as a 
        left outer join [nt:base] as b on ischildnode(b, a)
        where name(b) = 'b'
      
      select a.[jcr:path] from [nt:base] as a 
        left outer join [nt:base] as b on ischildnode(b, a)
        where localname(b) = 'b'
      

        Attachments

          Activity

            People

            • Assignee:
              tmueller Thomas Mueller
              Reporter:
              tmueller Thomas Mueller
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: