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/backends/pluggable/AttributeIndex.java |   14 ++------------
 1 files changed, 2 insertions(+), 12 deletions(-)

diff --git a/opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/AttributeIndex.java b/opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/AttributeIndex.java
index 740a4ca..e90309d 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/AttributeIndex.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/AttributeIndex.java
@@ -119,12 +119,6 @@
       this.indexer = indexer;
     }
 
-    void indexEntry(Entry entry, Set<ByteString> keys)
-    {
-      List<Attribute> attributes = entry.getAttribute(attributeType, true);
-      indexAttribute(attributes, keys);
-    }
-
     Set<ByteString> indexEntry(Entry entry)
     {
       final Set<ByteString> keys = new HashSet<>();
@@ -155,13 +149,9 @@
       }
     }
 
-    private void indexAttribute(List<Attribute> attributes, Set<ByteString> keys)
+    void indexEntry(Entry entry, Set<ByteString> keys)
     {
-      if (attributes == null)
-      {
-        return;
-      }
-      for (Attribute attr : attributes)
+      for (Attribute attr : entry.getAttribute(attributeType))
       {
         if (!attr.isVirtual())
         {

--
Gitblit v1.10.0