From 14f94c13789b8ace4eae258b5f1d64494518f9c3 Mon Sep 17 00:00:00 2001
From: Jean-Noël Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Mon, 21 Dec 2015 14:04:12 +0000
Subject: [PATCH] Remove null checks on returned values of Entry.get*Attribute*() methods.

---
 opendj-server-legacy/src/main/java/org/opends/server/config/ConfigEntry.java |    9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/opendj-server-legacy/src/main/java/org/opends/server/config/ConfigEntry.java b/opendj-server-legacy/src/main/java/org/opends/server/config/ConfigEntry.java
index 2100e95..93cdd80 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/config/ConfigEntry.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/config/ConfigEntry.java
@@ -193,17 +193,12 @@
    *                           interpreted as the specified type of
    *                           configuration attribute.
    */
-  public ConfigAttribute getConfigAttribute(ConfigAttribute stub)
-         throws ConfigException
+  public ConfigAttribute getConfigAttribute(ConfigAttribute stub) throws ConfigException
   {
     String attrName = stub.getName();
     AttributeType attrType = DirectoryServer.getAttributeTypeOrDefault(attrName.toLowerCase(), attrName);
     List<Attribute> attrList = entry.getAttribute(attrType);
-    if (attrList != null && !attrList.isEmpty())
-    {
-      return stub.getConfigAttribute(attrList);
-    }
-    return null;
+    return !attrList.isEmpty() ? stub.getConfigAttribute(attrList) : null;
   }
 
 

--
Gitblit v1.10.0