Removes the attribute with the specified AttributeTypes.
The removed attribute are returned by this method.
If there is no attribute with the specified AttributeTypes, the return value is null.
null
33463347334833493350335133523353335433553356
Attribute attrSN = new DefaultAttribute( atSN, "Test1", "Test2" ); Attribute attrPWD = new DefaultAttribute( atPwd, BYTES1, BYTES2 ); entry.put( attrOC, attrCN, attrSN, attrPWD ); entry.removeAttributes( atCN, atSN ); assertFalse( entry.containsAttribute( "cn", "sn" ) ); assertTrue( entry.containsAttribute( "objectclass", "userpassword" ) ); }
33683369337033713372337333743375337633773378
Attribute attrSN = new DefaultAttribute( atSN, "Test1", "Test2" ); Attribute attrPWD = new DefaultAttribute( atPwd, BYTES1, BYTES2 ); entry.put( attrOC, attrCN, attrSN, attrPWD ); entry.removeAttributes( "CN", "SN" ); assertFalse( entry.containsAttribute( "cn", "sn" ) ); assertTrue( entry.containsAttribute( "objectclass", "userpassword" ) ); entry.removeAttributes( "badId" );
33733374337533763377337833793380338133823383
entry.removeAttributes( "CN", "SN" ); assertFalse( entry.containsAttribute( "cn", "sn" ) ); assertTrue( entry.containsAttribute( "objectclass", "userpassword" ) ); entry.removeAttributes( "badId" ); entry.removeAttributes( "l" ); entry.removeAttributes( ( String ) null ); }
33743375337633773378337933803381338233833384
assertFalse( entry.containsAttribute( "cn", "sn" ) ); assertTrue( entry.containsAttribute( "objectclass", "userpassword" ) ); entry.removeAttributes( "badId" ); entry.removeAttributes( "l" ); entry.removeAttributes( ( String ) null ); } /**
33753376337733783379338033813382338333843385
assertFalse( entry.containsAttribute( "cn", "sn" ) ); assertTrue( entry.containsAttribute( "objectclass", "userpassword" ) ); entry.removeAttributes( "badId" ); entry.removeAttributes( "l" ); entry.removeAttributes( ( String ) null ); } /** * Test method for remove( String, byte[]... )
25292530253125322533253425352536253725382539
assertEquals( 1, entry.size() ); assertNotNull( entry.get( "domainComponent" ) ); assertEquals( 1, entry.get( "domainComponent" ).size() ); assertNotNull( entry.get( "domainComponent" ).get() ); assertNull( entry.get( "domainComponent" ).get().getValue() ); entry.removeAttributes( "dc" ); replaced = entry.put( "DC", strValue3 ); assertNull( replaced ); assertEquals( 1, entry.size() ); assertNotNull( entry.get( "dc" ) );
275276277278279280281282283284285
case REMOVE_ATTRIBUTE: Attribute toBeRemoved = mod.getAttribute(); if ( toBeRemoved.size() == 0 ) { targetEntry.removeAttributes( id ); } else { Attribute existing = targetEntry.get( id );
99100101102103104105106107108109
case REMOVE_ATTRIBUTE: Attribute toBeRemoved = mod.getAttribute(); if ( toBeRemoved.size() == 0 ) { targetEntry.removeAttributes( id ); } else { existing = targetEntry.get( id );
964965966967968969970971972973974
Attribute attrSN = new DefaultAttribute( "sn", "Test1", "Test2" ); Attribute attrPWD = new DefaultAttribute( "userPassword", BYTES1, BYTES2 ); entry.put( attrOC, attrCN, attrSN, attrPWD ); entry.removeAttributes( "CN", "SN" ); assertFalse( entry.containsAttribute( "cn", "sn" ) ); assertTrue( entry.containsAttribute( "objectclass", "userpassword" ) ); entry.removeAttributes( "badId" );
969970971972973974975976977978979
entry.removeAttributes( "CN", "SN" ); assertFalse( entry.containsAttribute( "cn", "sn" ) ); assertTrue( entry.containsAttribute( "objectclass", "userpassword" ) ); entry.removeAttributes( "badId" ); entry.removeAttributes( ( String ) null ); }