Skip to content

Commit

Permalink
Check that the RDN exists
Browse files Browse the repository at this point in the history
  • Loading branch information
elecharny committed Jan 17, 2025
1 parent 984ced6 commit 308f83c
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -242,8 +242,11 @@ public void testRemoveTwoNotRequiredAttributes() throws Exception
Attributes tn = new BasicAttributes( "telephoneNumber", "12345678", true );
ctx.modifyAttributes( RDN, DirContext.ADD_ATTRIBUTE, tn );

// Verify that attributes are deleted
Attributes attrs = ctx.getAttributes( RDN );

// Remove description and telephoneNumber to Attribute
Attributes attrs = new BasicAttributes( true );
attrs = new BasicAttributes( true );
attrs.put( new BasicAttribute( "description" ) );
attrs.put( new BasicAttribute( "telephoneNumber" ) );
ctx.modifyAttributes( RDN, DirContext.REMOVE_ATTRIBUTE, attrs );
Expand Down

0 comments on commit 308f83c

Please # to comment.