From 065edf026f075037c2f1f26da594742def064cb4 Mon Sep 17 00:00:00 2001
From: ludovicp <ludovicp@localhost>
Date: Thu, 27 May 2010 12:56:17 +0000
Subject: [PATCH] Fix an issue in External ChangeLog where an NPE is raised when include-attributes are configured and a modification doesn't contain those attributes.
---
opendj-sdk/opends/src/server/org/opends/server/replication/plugin/LDAPReplicationDomain.java | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/opendj-sdk/opends/src/server/org/opends/server/replication/plugin/LDAPReplicationDomain.java b/opendj-sdk/opends/src/server/org/opends/server/replication/plugin/LDAPReplicationDomain.java
index 2112b34..c0d20e4 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/replication/plugin/LDAPReplicationDomain.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/replication/plugin/LDAPReplicationDomain.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Copyright 2006-2009 Sun Microsystems, Inc.
+ * Copyright 2006-2010 Sun Microsystems, Inc.
*/
package org.opends.server.replication.plugin;
@@ -4861,8 +4861,9 @@
{
AttributeType atype = DirectoryServer.getAttributeType(name);
List<Attribute> attrs = entry.getAttribute(atype);
- for (Attribute a : attrs)
- newattrs.add(a);
+ if (attrs != null)
+ for (Attribute a : attrs)
+ newattrs.add(a);
}
((ModifyMsg)msg).setEclIncludes(newattrs);
}
@@ -4876,8 +4877,9 @@
{
AttributeType atype = DirectoryServer.getAttributeType(name);
List<Attribute> attrs = entry.getAttribute(atype);
- for (Attribute a : attrs)
- newattrs.add(a);
+ if (attrs != null)
+ for (Attribute a : attrs)
+ newattrs.add(a);
}
((ModifyDNMsg)msg).setEclIncludes(newattrs);
}
--
Gitblit v1.10.0