mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged HEAD-BUG-FIX (4.3/Cloud) to HEAD (4.3/Cloud)
60935: Merged V4.2-BUG-FIX (4.2.2) to HEAD-BUG-FIX (Cloud/4.3) 60808: Merged V4.2.1 (4.2.1) to V4.2-BUG-FIX (4.2.2) 60776: MNT-10529: NPE when requesting Number of Items for current Page 'orderBy' statement analyzing has been fixed in 'AlfrescoCmisServiceImpl.getChildren()'. Leading spaces are causing additional empty string part on splitting 'orderBy' element if query-able names are separated by a comma and a space. Test case for 'orderBy' parameter has been added git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@62370 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2013 Alfresco Software Limited.
|
||||
* Copyright (C) 2005-2014 Alfresco Software Limited.
|
||||
*
|
||||
* This file is part of Alfresco
|
||||
*
|
||||
@@ -443,8 +443,12 @@ public class AlfrescoCmisServiceImpl extends AbstractCmisService implements Alfr
|
||||
|
||||
if (sort.length > 0)
|
||||
{
|
||||
Pair<QName, Boolean> sortProp = connector.getSortProperty(sort[0], sort.length > 1 ? sort[1] : null);
|
||||
sortProps.add(sortProp);
|
||||
// MNT-10529: Leading spaces result in an empty string value after the split operation. Leading spaces may occur in the 'orderBy' statement when the
|
||||
// elements of statement separated by a comma and a space(s)
|
||||
int index = (sort[0].isEmpty()) ? (1) : (0);
|
||||
|
||||
Pair<QName, Boolean> sortProp = connector.getSortProperty(sort[index], sort.length > (index + 1) ? sort[index + 1] : null);
|
||||
sortProps.add(sortProp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user