[Swift-commit] r5922 - trunk/src/org/griphyn/vdl/mapping/file

hategan at ci.uchicago.edu hategan at ci.uchicago.edu
Fri Sep 14 17:33:42 CDT 2012


Author: hategan
Date: 2012-09-14 17:33:41 -0500 (Fri, 14 Sep 2012)
New Revision: 5922

Modified:
   trunk/src/org/griphyn/vdl/mapping/file/ConcurrentMapper.java
Log:
generics helped me find bug in existing() for remapping

Modified: trunk/src/org/griphyn/vdl/mapping/file/ConcurrentMapper.java
===================================================================
--- trunk/src/org/griphyn/vdl/mapping/file/ConcurrentMapper.java	2012-09-14 20:33:20 UTC (rev 5921)
+++ trunk/src/org/griphyn/vdl/mapping/file/ConcurrentMapper.java	2012-09-14 22:33:41 UTC (rev 5922)
@@ -28,13 +28,14 @@
 
 import org.griphyn.vdl.mapping.Mapper;
 import org.griphyn.vdl.mapping.MappingParam;
+import org.griphyn.vdl.mapping.MappingParamSet;
 import org.griphyn.vdl.mapping.Path;
 import org.griphyn.vdl.mapping.PhysicalFormat;
 
 public class ConcurrentMapper extends AbstractFileMapper {
 	public static final MappingParam PARAM_THREAD_PREFIX = new MappingParam("thread_prefix", "");
 	
-	private Map remappedPaths;
+	private Map<Path, Path> remappedPaths;
 
 	public ConcurrentMapper() {
 		super(new ConcurrentElementMapper());
@@ -48,11 +49,11 @@
 		super.setParams(params);
 	}
 	
-    public synchronized Collection existing() {
-        Collection c = super.existing();
+    public synchronized Collection<Path> existing() {
+        Collection<Path> c = super.existing();
         if (remappedPaths != null) {
-            Set s = new HashSet(c);
-            s.add(remappedPaths.keySet());
+            Set<Path> s = new HashSet<Path>(c);
+            s.addAll(remappedPaths.keySet());
             return s;
         }
         else {




More information about the Swift-commit mailing list