An exception was being thrown in some cases because an iterator's underlying Set...
authorwassa <wassa@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Thu, 23 Jan 2003 18:05:38 +0000 (18:05 +0000)
committerwassa <wassa@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Thu, 23 Jan 2003 18:05:38 +0000 (18:05 +0000)
git-svn-id: https://subversion.switch.ch/svn/shibboleth/java-idp/trunk@412 ab3bd59b-922f-494d-bb5f-6f0a3c29deca

src/edu/internet2/middleware/shibboleth/aa/arp/Rule.java

index 4266a7d..b2a2592 100755 (executable)
@@ -532,12 +532,14 @@ public class Rule {
                                anyValue = true;
                                anyValueRelease = "permit";
                                Iterator iterator = values.iterator();
+                               HashSet permittedValues = new HashSet();
                                while (iterator.hasNext()) {
                                        AttributeValue value = (AttributeValue) iterator.next();
                                        if (value.getRelease().equals("permit")) {
-                                               values.remove(value);
+                                               permittedValues.add(value);
                                        }
                                }
+                               values.removeAll(permittedValues);
                        } else {
                                if (anyValueRelease.equals("permit") && anyValue) {
                                        anyValue = false;