Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-23852

DocumentModelComparator should ignore case for the orderBy

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Not A Bug
    • Affects Version/s: 9.10-SNAPSHOT
    • Fix Version/s: None
    • Component/s: Directory

      Description

      Method org.nuxeo.ecm.core.api.DocumentModelComparator.compare(DocumentModel, DocumentModel) should ignore the case when checking the orderBy asc / ASC.

      Indeed, if you query a Directory with an orderBy "ASC" in uppercase instead of "asc" in lowercase, it fails (see org.nuxeo.ecm.directory.AbstractDirectory.orderEntries(List<DocumentModel>, Map<String, String>)).

      So we should change final boolean asc = ORDER_ASC.equals(e.getValue()); into final boolean asc = ORDER_ASC.equalsIgnoreCase(e.getValue());

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: