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

noreply at svn.ci.uchicago.edu noreply at svn.ci.uchicago.edu
Wed Jul 28 14:44:36 CDT 2010


Author: hategan
Date: 2010-07-28 14:44:36 -0500 (Wed, 28 Jul 2010)
New Revision: 3489

Modified:
   trunk/src/org/griphyn/vdl/mapping/RootDataNode.java
Log:
fixed mapper dependency bug for single values too, not just for arrays

Modified: trunk/src/org/griphyn/vdl/mapping/RootDataNode.java
===================================================================
--- trunk/src/org/griphyn/vdl/mapping/RootDataNode.java	2010-07-28 19:42:39 UTC (rev 3488)
+++ trunk/src/org/griphyn/vdl/mapping/RootDataNode.java	2010-07-28 19:44:36 UTC (rev 3489)
@@ -15,6 +15,7 @@
 	private boolean initialized=false;
 	private Mapper mapper;
 	private Map params;
+	private DSHandle waitingMapperParam;
 
 	public static DSHandle newNode(Type type, Object value) {
 		DSHandle handle = new RootDataNode(type);
@@ -40,14 +41,13 @@
 	/** must have this.params set to the appropriate parameters before
 	    being called. */
 	private synchronized void innerInit() {
-
 		Iterator i = params.entrySet().iterator();
 		while(i.hasNext()) {
 			Map.Entry entry = (Map.Entry) i.next();
 			Object v = entry.getValue();
 			if(v instanceof DSHandle && !( (DSHandle)v).isClosed()) {
-				DSHandle dh = (DSHandle)v;
-				dh.addListener(this);
+				waitingMapperParam = (DSHandle) v;
+                waitingMapperParam.addListener(this);
 				return;
 			}
 		}
@@ -205,7 +205,8 @@
 		if(initialized) {
 			return mapper;
 		} else {
-			throw new VDL2FutureException(this);
+			assert(waitingMapperParam != null);
+            throw new VDL2FutureException(waitingMapperParam);
 		}
 	}
 




More information about the Swift-commit mailing list