Uploaded image for project: 'ModeShape'
  1. ModeShape
  2. MODE-1825

NullPointerException in CanonicalPlanner when creating QOM query

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 3.1.3.Final, 3.2.0.Final
    • None
    • Query
    • None
    • Hide

      Workaround would be to use

      factory.column("car", "*", "car"); (the alias is required if property name is given)

      Show
      Workaround would be to use factory.column("car", "*", "car"); (the alias is required if property name is given)

    Description

      Specifying all columns of a selector using the QueryObjectModelFactory such as factory.column("car", null, null) fails with a NullPointerException in CanonicalPlanner.

      The fix seems to be check whether column name is actually given. Note that it is valid to have both columnName and propertyName to be null as per the JCR spec. In fact, if the property name (2nd parameter) is null, the alias (3rd parameter) must be null. (We should also be checking this in ModeShape's QueryObjectModelFactory class.)

      Attachments

        Activity

          People

            rhauch Randall Hauch (Inactive)
            clementp_jira Clement Pang (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: