From 9a9b85697f4a0b9f03fdc10ffddd53a77d75cca8 Mon Sep 17 00:00:00 2001
From: neil_a_wilson <neil_a_wilson@localhost>
Date: Sat, 07 Oct 2006 01:34:59 +0000
Subject: [PATCH] Update the modify operation so that it will reject any request that does not contain any modifications.

---
 opends/src/server/org/opends/server/core/ModifyOperation.java |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/opends/src/server/org/opends/server/core/ModifyOperation.java b/opends/src/server/org/opends/server/core/ModifyOperation.java
index 5cb7369..40141c1 100644
--- a/opends/src/server/org/opends/server/core/ModifyOperation.java
+++ b/opends/src/server/org/opends/server/core/ModifyOperation.java
@@ -807,6 +807,14 @@
         }
       }
 
+      if (modifications.isEmpty())
+      {
+        setResultCode(ResultCode.CONSTRAINT_VIOLATION);
+        appendErrorMessage(getMessage(MSGID_MODIFY_NO_MODIFICATIONS,
+                                      String.valueOf(entryDN)));
+        break modifyProcessing;
+      }
+
 
       // Check for and handle a request to cancel this operation.
       if (cancelRequest != null)

--
Gitblit v1.10.0