Hi,
I've noticed using DirContextAdapter in update mode that if you attempt to reset a value (which has previously been modified) to it's original value, then it will retain the previous value which was set. e.g. assuming I have an instance "ctx" which has an attribute "myattr" with values {a,b,c} initially:
will incorrectly result in a modification to remove the value "c" from the attribute.Code:ctx.setAttributeValues("myattr", new String[] {"a", "b"}); ctx.setAttributeValues("myattr", new String[] {"a", "b", "c"}); ctx.getModificationItems();
This seems to be because the comparison is only being made with "attrs". The value in "updatedAttrs" should probably be checked too to make sure it hasn't already been changed to a different value.
I've attached a test case for the problem..
cheers,
Luke.


Reply With Quote