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/replication/plugin/PersistentServerState.java |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/opendj-server-legacy/src/main/java/org/opends/server/replication/plugin/PersistentServerState.java b/opendj-server-legacy/src/main/java/org/opends/server/replication/plugin/PersistentServerState.java
index a9d1f93..e48d0d3 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/replication/plugin/PersistentServerState.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/replication/plugin/PersistentServerState.java
@@ -215,14 +215,14 @@
   /**
    * Update this ServerState from the provided entry.
    *
-   * @param resultEntry The entry that should be used to update this
-   *                    ServerState.
+   * @param resultEntry
+   *          The entry that should be used to update this ServerState.
    */
   private void updateStateFromEntry(SearchResultEntry resultEntry)
   {
     AttributeType synchronizationStateType = DirectoryServer.getAttributeTypeOrNull(REPLICATION_STATE);
     List<Attribute> attrs = resultEntry.getAttribute(synchronizationStateType);
-    if (attrs != null)
+    if (!attrs.isEmpty())
     {
       for (ByteString value : attrs.get(0))
       {

--
Gitblit v1.10.0