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

Jean-Noël Rouvignac
14.05.2015 4f6891a8bd4d017a41b5f75748398ff59787501c
opendj-server-legacy/src/main/java/org/opends/server/authorization/dseecompat/PatternRDN.java
@@ -172,16 +172,14 @@
      AttributeType thatType = rdn.getAttributeType(0);
      if (!typePatterns[0].equals("*"))
      {
        AttributeType thisType =
             DirectoryServer.getAttributeType(typePatterns[0].toLowerCase());
        AttributeType thisType = DirectoryServer.getAttributeTypeOrNull(typePatterns[0].toLowerCase());
        if (thisType == null || !thisType.equals(thatType))
        {
          return false;
        }
      }
      return matchValuePattern(valuePatterns.get(0), thatType,
                               rdn.getAttributeValue(0));
      return matchValuePattern(valuePatterns.get(0), thatType, rdn.getAttributeValue(0));
    }
    if (hasTypeWildcard)
@@ -207,7 +205,7 @@
    for (int i = 0; i < numValues; i++)
    {
      String lowerName = typePatterns[i].toLowerCase();
      AttributeType type = DirectoryServer.getAttributeType(lowerName);
      AttributeType type = DirectoryServer.getAttributeTypeOrNull(lowerName);
      if (type == null)
      {
        return false;
@@ -225,9 +223,8 @@
        return false;
      }
      if (!matchValuePattern(patternMap.get(rdnKey),
                             DirectoryServer.getAttributeType(rdnKey),
                             rdnMap.get(rdnKey)))
      AttributeType rdnAttrType = DirectoryServer.getAttributeTypeOrNull(rdnKey);
      if (!matchValuePattern(patternMap.get(rdnKey), rdnAttrType, rdnMap.get(rdnKey)))
      {
        return false;
      }