SEC-502: Fix. Use a Map instead of HashMap in the API. Also some minor tidying of test class.
This commit is contained in:
parent
57f3d268a1
commit
dda88e3931
|
@ -25,10 +25,10 @@ import org.apache.commons.logging.LogFactory;
|
||||||
|
|
||||||
import org.springframework.util.Assert;
|
import org.springframework.util.Assert;
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Vector;
|
import java.util.Vector;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -57,7 +57,7 @@ public class LabelBasedAclVoter extends AbstractAclVoter {
|
||||||
|
|
||||||
//~ Instance fields ================================================================================================
|
//~ Instance fields ================================================================================================
|
||||||
|
|
||||||
private HashMap labelMap = null;
|
private Map labelMap = null;
|
||||||
private String attributeIndicatingLabeledOperation = null;
|
private String attributeIndicatingLabeledOperation = null;
|
||||||
private boolean allowAccessIfNoAttributesAreLabeled = true;
|
private boolean allowAccessIfNoAttributesAreLabeled = true;
|
||||||
|
|
||||||
|
@ -136,7 +136,7 @@ public class LabelBasedAclVoter extends AbstractAclVoter {
|
||||||
* @param labelMap a map structured as in the above example.
|
* @param labelMap a map structured as in the above example.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public void setLabelMap(HashMap labelMap) {
|
public void setLabelMap(Map labelMap) {
|
||||||
this.labelMap = labelMap;
|
this.labelMap = labelMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -28,8 +28,7 @@ import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
DOCUMENT ME!
|
|
||||||
*
|
*
|
||||||
* @author Greg Turnquist
|
* @author Greg Turnquist
|
||||||
* @version $Id$
|
* @version $Id$
|
||||||
|
@ -49,10 +48,6 @@ public class LabelBasedAclVoterTests extends AbstractDependencyInjectionSpringCo
|
||||||
return sampleService;
|
return sampleService;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args) {
|
|
||||||
junit.textui.TestRunner.run(LabelBasedAclVoterTests.class);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSampleService(SampleService sampleService) {
|
public void setSampleService(SampleService sampleService) {
|
||||||
this.sampleService = sampleService;
|
this.sampleService = sampleService;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue