[Swift-devel] recent trunk changes swift parsing

Mihael Hategan hategan at mcs.anl.gov
Fri May 20 17:18:00 CDT 2011


Well, I'd like to commit the fix, but it seems that the SVN server is
not recognizing my password.

So here's the patch for somebody whose password works:
--- mapping/MappingParam.java   (revision 4473)
+++ mapping/MappingParam.java   (working copy)
@@ -3,6 +3,7 @@
 import java.util.Map;

 import org.griphyn.vdl.karajan.VDL2FutureException;
+import org.griphyn.vdl.type.Types;

 /** The MappingParam class provides helper methods to deal with
   * parameters to mappers. The basic usage pattern is to
@@ -44,7 +45,12 @@
                if (value instanceof DSHandle) {
                        DSHandle handle = (DSHandle) value;
                        checkHandle(handle);
-                       return handle.getValue().toString();
+                       if (handle.getType().equals(Types.INT)) {
+                           return Integer.valueOf(((Number)
handle.getValue()).intValue());
+                       }
+                       else {
+                           return handle.getValue().toString();
+                       }
                }
                else if (value == null) {
                        if (!defSet) {


On Fri, 2011-05-20 at 15:06 -0700, Mihael Hategan wrote:
> That's great info, but there are few things more specific and useful
> than a stack trace in this case.
> 
> Mihael
> 
> On Fri, 2011-05-20 at 17:02 -0500, ketan wrote:
> > Hi,
> > 
> > >>>>     file_dat dat_files[]<  simple_mapper;
> > >>>>                                 padding = 3,
> > >>>>                                 location = "output",
> > >>>>                     prefix  = @strcat( str_root, "_" ),
> > >>>>                     suffix  = ".dat">;
> > >>>>
> > 
> > The padding attribute in above simple_mapper seems to be failing. When I 
> > wrap 3 in double quotes (padding = "3"), it works. Mike tells me Sarah 
> > made recent modifications to simple_mapper code that might have caused it.
> > 
> > 
> > Ketan
> > 
> 
> 
> _______________________________________________
> Swift-devel mailing list
> Swift-devel at ci.uchicago.edu
> http://mail.ci.uchicago.edu/mailman/listinfo/swift-devel





More information about the Swift-devel mailing list