Attributes entry = nexus.lookup( name ); NamingEnumeration attrIds = attrs.getIDs(); while ( attrIds.hasMore() ) { String attrId = ( String ) attrIds.next(); Attribute modAttr = attrs.get( attrId ); Attribute entryAttr = entry.get( attrId );  if ( modOp == DirContext.ADD_ATTRIBUTE ) { if ( entryAttr != null ) { for ( int ii = 0; ii < modAttr.size(); ii++ ) { if ( entryAttr.contains( modAttr.get( ii ) ) ) { throw new LdapAttributeInUseException( "Trying to add existing value '" + modAttr.get( ii ) + "' to attribute " + attrId ); } } } } }
    public void modify( NextInterceptor nextInterceptor, Name name, int modOp, Attributes attrs ) throws NamingException    {        // check if entry to modify exists        String msg = "Attempt to modify non-existant entry: ";        assertHasEntry( nextInterceptor, msg, name );        nextInterceptor.modify( name, modOp, attrs );    }