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

hategan at ci.uchicago.edu hategan at ci.uchicago.edu
Wed Jul 18 18:41:09 CDT 2012


Author: hategan
Date: 2012-07-18 18:41:09 -0500 (Wed, 18 Jul 2012)
New Revision: 5856

Modified:
   trunk/src/org/griphyn/vdl/karajan/lib/SetFieldValue.java
Log:
don't convert arrays key when copying arrays (it breaks typed array keys)

Modified: trunk/src/org/griphyn/vdl/karajan/lib/SetFieldValue.java
===================================================================
--- trunk/src/org/griphyn/vdl/karajan/lib/SetFieldValue.java	2012-07-18 23:19:56 UTC (rev 5855)
+++ trunk/src/org/griphyn/vdl/karajan/lib/SetFieldValue.java	2012-07-18 23:41:09 UTC (rev 5856)
@@ -254,15 +254,10 @@
         }
         while (it.hasNext()) {
             Pair pair = (Pair) it.next();
-            Object lhs = pair.get(0);
+            Comparable<?> lhs = (Comparable<?>) pair.get(0);
             DSHandle rhs = (DSHandle) pair.get(1);
-            Path memberPath;
-            if (lhs instanceof Double) {
-                memberPath = Path.EMPTY_PATH.addLast(String.valueOf(((Double) lhs).intValue()), true);
-            }
-            else {
-                memberPath = Path.EMPTY_PATH.addLast(String.valueOf(lhs), true);
-            }
+            Path memberPath = Path.EMPTY_PATH.addLast(lhs, true);
+            
             DSHandle field;
             try {
                 field = dest.getField(memberPath);




More information about the Swift-commit mailing list