mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

neil_a_wilson
07.34.2006 efb0065f620775a1da3a65c17ffa4f3083fcab63
Update the modify operation so that it will reject any request that does not
contain any modifications.

OpenDS Issue Number: 760
2 files modified
20 ■■■■■ changed files
opendj-sdk/opends/src/server/org/opends/server/core/ModifyOperation.java 8 ●●●●● patch | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/messages/CoreMessages.java 12 ●●●●● patch | view | raw | blame | history
opendj-sdk/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)
opendj-sdk/opends/src/server/org/opends/server/messages/CoreMessages.java
@@ -5927,6 +5927,15 @@
  /**
   * The message ID for the message that will be used if a modify operation does
   * not contain any modifications.  This does not take any arguments.
   */
  public static final int MSGID_MODIFY_NO_MODIFICATIONS =
       CATEGORY_MASK_CORE | SEVERITY_MASK_SEVERE_ERROR | 566;
  /**
   * Associates a set of generic messages with the message IDs defined
   * in this class.
   */
@@ -7008,6 +7017,9 @@
                    "persistent search has been terminated.");
    registerMessage(MSGID_MODIFY_NO_MODIFICATIONS,
                    "Entry %s cannot be updated because the request did not " +
                    "contain any modifications.");
    registerMessage(MSGID_MODIFY_CANNOT_LOCK_ENTRY,
                    "Entry %s cannot be modified because the server failed " +
                    "to obtain a write lock for this entry after multiple " +