From dda88e393164284e7f89c1076a742843d8cbbd36 Mon Sep 17 00:00:00 2001 From: Luke Taylor Date: Mon, 27 Aug 2007 17:21:16 +0000 Subject: [PATCH] SEC-502: Fix. Use a Map instead of HashMap in the API. Also some minor tidying of test class. --- .../java/org/acegisecurity/vote/LabelBasedAclVoter.java | 6 +++--- .../org/acegisecurity/vote/LabelBasedAclVoterTests.java | 7 +------ 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/core/src/main/java/org/acegisecurity/vote/LabelBasedAclVoter.java b/core/src/main/java/org/acegisecurity/vote/LabelBasedAclVoter.java index 3340c79888..3181cb3884 100644 --- a/core/src/main/java/org/acegisecurity/vote/LabelBasedAclVoter.java +++ b/core/src/main/java/org/acegisecurity/vote/LabelBasedAclVoter.java @@ -25,10 +25,10 @@ import org.apache.commons.logging.LogFactory; import org.springframework.util.Assert; -import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Vector; +import java.util.Map; /** @@ -57,7 +57,7 @@ public class LabelBasedAclVoter extends AbstractAclVoter { //~ Instance fields ================================================================================================ - private HashMap labelMap = null; + private Map labelMap = null; private String attributeIndicatingLabeledOperation = null; private boolean allowAccessIfNoAttributesAreLabeled = true; @@ -136,7 +136,7 @@ public class LabelBasedAclVoter extends AbstractAclVoter { * @param labelMap a map structured as in the above example. * */ - public void setLabelMap(HashMap labelMap) { + public void setLabelMap(Map labelMap) { this.labelMap = labelMap; } diff --git a/core/src/test/java/org/acegisecurity/vote/LabelBasedAclVoterTests.java b/core/src/test/java/org/acegisecurity/vote/LabelBasedAclVoterTests.java index 8be9cb7d2a..1f3663062a 100644 --- a/core/src/test/java/org/acegisecurity/vote/LabelBasedAclVoterTests.java +++ b/core/src/test/java/org/acegisecurity/vote/LabelBasedAclVoterTests.java @@ -28,8 +28,7 @@ import java.util.List; /** - * -DOCUMENT ME! + * * * @author Greg Turnquist * @version $Id$ @@ -49,10 +48,6 @@ public class LabelBasedAclVoterTests extends AbstractDependencyInjectionSpringCo return sampleService; } - public static void main(String[] args) { - junit.textui.TestRunner.run(LabelBasedAclVoterTests.class); - } - public void setSampleService(SampleService sampleService) { this.sampleService = sampleService; }