From: Seth P. <se...@us...> - 2004-05-14 18:46:39
|
Update of /cvsroot/sunxacml/sunxacml/com/sun/xacml/finder In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3314/com/sun/xacml/finder Modified Files: PolicyFinder.java ResourceFinderResult.java Log Message: updated to make all incoming/outgoing collections copied and immutable Index: PolicyFinder.java =================================================================== RCS file: /cvsroot/sunxacml/sunxacml/com/sun/xacml/finder/PolicyFinder.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PolicyFinder.java 17 Mar 2004 18:03:39 -0000 1.2 --- PolicyFinder.java 14 May 2004 18:46:23 -0000 1.3 *************** *** 95,99 **** */ public Set getModules() { ! return allModules; } --- 95,99 ---- */ public Set getModules() { ! return new HashSet(allModules); } Index: ResourceFinderResult.java =================================================================== RCS file: /cvsroot/sunxacml/sunxacml/com/sun/xacml/finder/ResourceFinderResult.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ResourceFinderResult.java 17 Mar 2004 18:03:39 -0000 1.2 --- ResourceFinderResult.java 14 May 2004 18:46:24 -0000 1.3 *************** *** 37,40 **** --- 37,41 ---- package com.sun.xacml.finder; + import java.util.Collections; import java.util.HashMap; import java.util.HashSet; *************** *** 69,74 **** */ public ResourceFinderResult() { ! resources = new HashSet(); ! failures = new HashMap(); empty = true; } --- 70,75 ---- */ public ResourceFinderResult() { ! resources = Collections.unmodifiableSet(new HashSet()); ! failures = Collections.unmodifiableMap(new HashMap()); empty = true; } *************** *** 115,120 **** */ public ResourceFinderResult(Set resources, Map failures) { ! this.resources = resources; ! this.failures = failures; empty = false; } --- 116,121 ---- */ public ResourceFinderResult(Set resources, Map failures) { ! this.resources = Collections.unmodifiableSet(new HashSet(resources)); ! this.failures = Collections.unmodifiableMap(new HashMap(failures)); empty = false; } |