question: public static Set combineOCs ( Set one , Set two ) { if ( one == null || one . isEmpty ( ) ) { return two ; } if ( two == null || two . isEmpty ( ) ) { return one ; } Set resultSet = new HashSet ( ) ; Iterator itr1 = one . iterator ( ) ; while ( itr1 . hasNext ( ) ) { String value1 = ( String ) itr1 . next ( ) ; resultSet . add ( value1 . toLowerCase ( ) ) ; } Iterator itr2 = two . iterator ( ) ; while ( itr2 . hasNext ( ) ) { String value2 = ( String ) itr2 . next ( ) ; resultSet . add ( value2 . toLowerCase ( ) ) ; } return resultSet ; }
target:  Combines two sets which contains objectclass values of an entry in a case insensitive manner. OC values are sometimes returned by LDAP in mixed case and when duplicate values for Objectclass exists in a mixed case, there is a Object class violation Note: there is a possibility that this method will return null