[GRP-207] grouper-ws addMember replaceAllExisting will remove existing members Created: 23/Jan/09  Updated: 29/Jan/09  Resolved: 29/Jan/09

Status: Resolved
Project: Grouper
Component/s: WS
Affects Version/s: 1.4.0
Fix Version/s: 1.4.1

Type: Bug Priority: Major
Reporter: Chris Hyzer (upenn.edu) Assignee: Chris Hyzer (upenn.edu)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Greetings,

My question is about this short grouper session, where I set replaceAllExisting to 'T', and it removes members from my list that were already in the group, even though they are in the PUT xml.

Please let me know if that is expected behavior. Please see my attached session, where I hope the problem is made clear.

Colin Hudler



 Comments   
Comment by mchyzer [ 23/Jan/09 ]

This is fixed.

(my email repsonse to the problem)
My unit tests were checking the return code, but didn't take the extra step of seeing that the members were still members. I changed the unit test so it now fails, and I see what the issue is... it seems if you add a Subject object to a Set, and then see if the subject is in Set, it will always return false since this Subject doesn't override the equals()/hashcode() methods. So I will change it so it doesn't use a set... will be fixed in 1.4.1 which will come out soon.

Comment by mchyzer [ 23/Jan/09 ]

Lets test with replacing but with a delete and an add, and check the resulting list completely instead of hasMember... just to make sure all bases are covered...

Generated at Wed Apr 24 10:57:45 UTC 2024 using Jira 9.4.18#940018-sha1:32a59db0b032756f9bbd6a22c656d21edb3fb41f.