Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-12057

HQL queries in DBList need to be lowercase

    XMLWordPrintable

Details

    • Unknown
    • N/A
    • N/A

    Description

      In some conditions, an ArrayOutOfBound Exception is triggered by DBLIstClass if the Hibernate query of a DBList property is not in lowercase:
      https://github.com/xwiki/xwiki-platform/blob/df2e86d2a476a225dd525e23836c9edb011e73f7/xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/objects/classes/DBListClass.java#L450

      If the query contains "FROM" instead of "from", the indexOf will return -1.

      It has been revealed by a custom displayer (http://extensions.xwiki.org/xwiki/bin/view/Extension/Multiselect+custom+display) on a custom project, but we usually not hit this issue on XE.

      Attachments

        Activity

          People

            gdelhumeau Guillaume Delhumeau
            gdelhumeau Guillaume Delhumeau
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: