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/test/java/org/opends/server/TestCaseUtils.java |   10 +++-------
 1 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/opendj-server-legacy/src/test/java/org/opends/server/TestCaseUtils.java b/opendj-server-legacy/src/test/java/org/opends/server/TestCaseUtils.java
index 8b2f89f..17dcce4 100644
--- a/opendj-server-legacy/src/test/java/org/opends/server/TestCaseUtils.java
+++ b/opendj-server-legacy/src/test/java/org/opends/server/TestCaseUtils.java
@@ -1845,15 +1845,11 @@
   public static HashSet<PluginType> getPluginTypes(Entry e)
   {
     HashSet<PluginType> pluginTypes = new HashSet<>();
-    List<Attribute> attrList = e.getAttribute("ds-cfg-plugin-type");
-    if (attrList != null)
+    for (Attribute a : e.getAttribute("ds-cfg-plugin-type"))
     {
-      for (Attribute a : attrList)
+      for (ByteString v : a)
       {
-        for (ByteString v : a)
-        {
-          pluginTypes.add(PluginType.forName(v.toString().toLowerCase()));
-        }
+        pluginTypes.add(PluginType.forName(v.toString().toLowerCase()));
       }
     }
     return pluginTypes;

--
Gitblit v1.10.0