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

Jean-Noel Rouvignac
15.07.2014 ec288def6fb618851a002d375384f24fa7a1ce7f
AbstractSubstringMatchingRuleImpl.java:
In DefaultSubstringAssertion.createIndexQuery(), slight improvement.
1 files modified
10 ■■■■ changed files
opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/AbstractSubstringMatchingRuleImpl.java 10 ●●●● patch | view | raw | blame | history
opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/AbstractSubstringMatchingRuleImpl.java
@@ -146,6 +146,11 @@
        /** {@inheritDoc} */
        @Override
        public <T> T createIndexQuery(IndexQueryFactory<T> factory) throws DecodeException {
            if (normInitial == null && (normAnys == null || normAnys.length == 0) && normFinal == null) {
                // Can happen with a filter like "cn:en.6:=*", just return an empty record
                return factory.createMatchAllQuery();
            }
            final Collection<T> subqueries = new LinkedList<T>();
            if (normInitial != null) {
                // relies on the fact that equality indexes are also ordered
@@ -164,11 +169,6 @@
                // (possible overlapping with the use of equality index at the start of this method)
                substringMatch(factory, normInitial, subqueries);
            }
            if (normInitial == null && (normAnys == null || normAnys.length == 0) && normFinal == null) {
                // Can happen with a filter like "cn:en.6:=*", just return an empty record
                return factory.createMatchAllQuery();
            }
            return factory.createIntersectionQuery(subqueries);
        }