[Swift-commit] r3628 - trunk/src/org/griphyn/vdl/karajan/lib

noreply at svn.ci.uchicago.edu noreply at svn.ci.uchicago.edu
Thu Sep 16 15:30:37 CDT 2010


Author: hategan
Date: 2010-09-16 15:30:37 -0500 (Thu, 16 Sep 2010)
New Revision: 3628

Modified:
   trunk/src/org/griphyn/vdl/karajan/lib/VDLFunction.java
Log:
get the mapper before doing potentially expensive operations

Modified: trunk/src/org/griphyn/vdl/karajan/lib/VDLFunction.java
===================================================================
--- trunk/src/org/griphyn/vdl/karajan/lib/VDLFunction.java	2010-09-16 20:26:47 UTC (rev 3627)
+++ trunk/src/org/griphyn/vdl/karajan/lib/VDLFunction.java	2010-09-16 20:30:37 UTC (rev 3628)
@@ -210,6 +210,10 @@
 	}
 
 	private static String[] leavesFileNames(DSHandle var) throws ExecutionException, HandleOpenException {
+	    Mapper mapper;
+        synchronized (var.getRoot()) {
+            mapper = var.getMapper();
+        }
 		List l = new ArrayList();
 		Iterator i;
 		try {
@@ -223,10 +227,6 @@
 			}
 			Collections.sort(src, new PathComparator());
 			i = src.iterator();
-			Mapper mapper;
-            synchronized (var.getRoot()) {
-                mapper = var.getMapper();
-            }
 			while (i.hasNext()) {
 				Path p = (Path) i.next();
 				l.add(leafFileName(var.getField(p), mapper));




More information about the Swift-commit mailing list