Fix Issue OPENDJ-113.
Missing an if statement for permissive control. Updated the test case to work.
Issue #OPENDJ-113 - Permissive Modify Control fails when deleting non existing attribute
| | |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Copyright 2008-2009 Sun Microsystems, Inc. |
| | | * Copyright 2008-2011 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011 ForgeRock AS |
| | | */ |
| | | package org.opends.server.workflowelement.localbackend; |
| | |
| | | } |
| | | else |
| | | { |
| | | throw new DirectoryException(ResultCode.NO_SUCH_ATTRIBUTE, |
| | | if (! permissiveModify) |
| | | { |
| | | throw new DirectoryException(ResultCode.NO_SUCH_ATTRIBUTE, |
| | | ERR_MODIFY_DELETE_NO_SUCH_ATTR.get( |
| | | String.valueOf(entryDN), attr.getName())); |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Copyright 2006-2010 Sun Microsystems, Inc. |
| | | * Copyright 2006-2011 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.core; |
| | | |
| | |
| | | entry.getOperationalAttributes()); |
| | | assertEquals(addOperation.getResultCode(), ResultCode.SUCCESS); |
| | | |
| | | LDAPAttribute attr = new LDAPAttribute("displayName"); |
| | | LDAPAttribute attr = new LDAPAttribute("description"); |
| | | ArrayList<RawModification> mods = new ArrayList<RawModification>(); |
| | | mods.add(new LDAPModification(ModificationType.DELETE, attr)); |
| | | |