From 4f6891a8bd4d017a41b5f75748398ff59787501c Mon Sep 17 00:00:00 2001
From: Jean-Noël Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Thu, 15 Oct 2015 19:38:35 +0000
Subject: [PATCH] Renamed DirectoryServer.getAttributeType() to DirectoryServer.getAttributeTypeOrNull().

---
 opendj-server-legacy/src/main/java/org/opends/server/authorization/dseecompat/PatternRDN.java |   13 +++++--------
 1 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/opendj-server-legacy/src/main/java/org/opends/server/authorization/dseecompat/PatternRDN.java b/opendj-server-legacy/src/main/java/org/opends/server/authorization/dseecompat/PatternRDN.java
index 526a89a..c7b9a71 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/authorization/dseecompat/PatternRDN.java
+++ b/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;
       }

--
Gitblit v1.10.0