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

Matthew Swift
21.14.2013 e7b3515b687c082229fc3106ea7badbc2dc61d4a
opendj3/opendj-ldap-sdk/src/main/java/org/forgerock/opendj/ldap/Matcher.java
@@ -22,7 +22,7 @@
 *
 *
 *      Copyright 2009 Sun Microsystems, Inc.
 *      Portions copyright 2012 ForgeRock AS.
 *      Portions copyright 2012-2013 ForgeRock AS.
 */
package org.forgerock.opendj.ldap;
@@ -350,6 +350,14 @@
                } else {
                    try {
                        ruleUse = schema.getMatchingRuleUse(rule);
                        if (!ruleUse.hasAttribute(ad.getAttributeType())) {
                            if (DEBUG_LOG.isLoggable(Level.WARNING)) {
                                DEBUG_LOG.warning("The matching rule " + matchingRule
                                        + " is not valid for attribute type "
                                        + attributeDescription);
                            }
                            return UNDEFINED;
                        }
                    } catch (final UnknownSchemaElementException e) {
                        if (DEBUG_LOG.isLoggable(Level.WARNING)) {
                            DEBUG_LOG.warning("No matching rule use is defined for "
@@ -357,13 +365,6 @@
                            return UNDEFINED;
                        }
                    }
                    if (!ruleUse.hasAttribute(ad.getAttributeType())) {
                        if (DEBUG_LOG.isLoggable(Level.WARNING)) {
                            DEBUG_LOG.warning("The matching rule " + matchingRule
                                    + " is not valid for attribute type " + attributeDescription);
                        }
                        return UNDEFINED;
                    }
                }
            } else {
                try {