From 66f4d2de8922623e2d3bd90be9f0bab5f5ea16e2 Mon Sep 17 00:00:00 2001
From: neil_a_wilson <neil_a_wilson@localhost>
Date: Mon, 26 Mar 2007 21:52:19 +0000
Subject: [PATCH] Fix a problem in the modify operation processing that could cause a null pointer exception in the event that the modify operation targeted the root DSE.
---
opends/src/server/org/opends/server/core/ModifyOperation.java | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/opends/src/server/org/opends/server/core/ModifyOperation.java b/opends/src/server/org/opends/server/core/ModifyOperation.java
index ea571a1..34d09d9 100644
--- a/opends/src/server/org/opends/server/core/ModifyOperation.java
+++ b/opends/src/server/org/opends/server/core/ModifyOperation.java
@@ -1889,7 +1889,7 @@
if (missingValues.isEmpty())
{
RDN rdn = modifiedEntry.getDN().getRDN();
- if (rdn.hasAttributeType(t) &&
+ if ((rdn != null) && rdn.hasAttributeType(t) &&
(! modifiedEntry.hasValue(t, a.getOptions(),
rdn.getAttributeValue(t))))
{
@@ -1964,7 +1964,7 @@
{
modifiedEntry.removeAttribute(t, a.getOptions());
RDN rdn = modifiedEntry.getDN().getRDN();
- if (rdn.hasAttributeType(t) &&
+ if ((rdn != null) && rdn.hasAttributeType(t) &&
(! modifiedEntry.hasValue(t, a.getOptions(),
rdn.getAttributeValue(t))))
{
@@ -2042,7 +2042,7 @@
modifiedEntry.putAttribute(t, attrList);
RDN rdn = modifiedEntry.getDN().getRDN();
- if (rdn.hasAttributeType(t) &&
+ if ((rdn != null) && rdn.hasAttributeType(t) &&
(! modifiedEntry.hasValue(t, a.getOptions(),
rdn.getAttributeValue(t))))
{
@@ -2067,7 +2067,7 @@
modifiedEntry.putAttribute(t, attrList);
RDN rdn = modifiedEntry.getDN().getRDN();
- if (rdn.hasAttributeType(t) &&
+ if ((rdn != null) && rdn.hasAttributeType(t) &&
(! modifiedEntry.hasValue(t, a.getOptions(),
rdn.getAttributeValue(t))))
{
@@ -2102,7 +2102,7 @@
}
RDN rdn = modifiedEntry.getDN().getRDN();
- if (rdn.hasAttributeType(t) &&
+ if ((rdn != null) && rdn.hasAttributeType(t) &&
(! modifiedEntry.hasValue(t, a.getOptions(),
rdn.getAttributeValue(t))))
{
@@ -2119,7 +2119,7 @@
case INCREMENT:
// The specified attribute type must not be an RDN attribute.
rdn = modifiedEntry.getDN().getRDN();
- if (rdn.hasAttributeType(t))
+ if ((rdn != null) && rdn.hasAttributeType(t))
{
setResultCode(ResultCode.NOT_ALLOWED_ON_RDN);
appendErrorMessage(getMessage(MSGID_MODIFY_INCREMENT_RDN,
--
Gitblit v1.10.0