mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Nicolas Capponi
30.42.2013 aa3b2eb2cf86b567f08a58891cd70df9d3e8e4a7
refs
author Nicolas Capponi <nicolas.capponi@forgerock.com>
Monday, September 30, 2013 11:42 +0200
committer Nicolas Capponi <nicolas.capponi@forgerock.com>
Monday, September 30, 2013 11:42 +0200
commitaa3b2eb2cf86b567f08a58891cd70df9d3e8e4a7
tree 8bcb3a58113418245406d9a11c4a51eb4696082f tree | zip | gz
parent 68493d78c0886c86c4345d8174069824b5d9f6f1 view | diff
Fix OPENDJ-916 - MemoryBackend in SDK should support size limit
Review CR-2386

Change is limited to MemoryBackend class :
* added size limit support in handleSearch() method, throwing error with ResultCode.SIZE_LIMIT_EXCEEDED if limit is exceeded
* refactored handleSearch to avoid duplicate code for SearchScope.SINGLE_LEVEL and SearchScope.WHOLE_SUBTREE, adding new private method searchWithSubordinates()

Updated test class MemoryBackendTestCase
* added tests for size limit for both SearchScope.SINGLE_LEVEL and SearchScope.WHOLE_SUBTREE
* added test to ensure that we can get all entries from the memory backend.
2 files modified
221 ■■■■■ changed files
opendj-sdk/opendj3/opendj-ldap-sdk/src/main/java/org/forgerock/opendj/ldap/MemoryBackend.java 75 ●●●●● diff | view | raw | blame | history
opendj-sdk/opendj3/opendj-ldap-sdk/src/test/java/org/forgerock/opendj/ldap/MemoryBackendTestCase.java 146 ●●●●● diff | view | raw | blame | history