Closed spring-projects-issues closed 17 years ago
["Jasper Blues":https://jira.spring.io/secure/ViewProfile.jspa?name=jasper.blues] said:
I'm not sure if this effects version 1.2. I stepped through with a debugger and couldn't reproduce. isChanged() still reports false changes when the argument is byte[], however collect modificationItems later does an .equals() on the BasicAttribute. . . . isChanged() should probably still be fixed.
["Mattias Hellborg Arthursson":https://jira.spring.io/secure/ViewProfile.jspa?name=marthursson] said:
Compare this to issue LDAP-46 (http://opensource.atlassian.com/projects/spring/browse/LDAP-46). This seems quite similar, and as in my comment to that issue I do think that it should be addressed, but that needs to be done in a generic and configurable way.
["Mattias Hellborg Arthursson":https://jira.spring.io/secure/ViewProfile.jspa?name=marthursson] said:
Removed the isChanged() method entirely, as it didn't do much good anyway (all the necessary comparisons are made in getModificationItems). Also improved value comparison by using Attribute.contains() (actuallt, Attribute.remove()) to determine Attribute value equality. This should allow for Attribute implementations to do syntactical comparisons on Attribute values. Nevertheless, the byte array problem is solved (as BasicAttributes.contains checks if a value is an array).
["Jasper Blues":https://jira.spring.io/secure/ViewProfile.jspa?name=jasper.blues](Migrated from ["LDAP-13":https://jira.spring.io/browse/LDAP-13?redirect=false]) said:
Hello,
This could be a problem say if:
Suggested Solution: Perhaps DirContextAdapter.isChanged() should use Arrays.equals(byte[], byte[]) for attributes of type byte[].
Best Regards, Jasper