[Swift-commit] r4524 - trunk/src/org/griphyn/vdl/mapping
hategan at ci.uchicago.edu
hategan at ci.uchicago.edu
Tue May 24 12:51:46 CDT 2011
Author: hategan
Date: 2011-05-24 12:51:45 -0500 (Tue, 24 May 2011)
New Revision: 4524
Modified:
trunk/src/org/griphyn/vdl/mapping/MappingParam.java
Log:
fix bug when passing int parameters to a mapper
Modified: trunk/src/org/griphyn/vdl/mapping/MappingParam.java
===================================================================
--- trunk/src/org/griphyn/vdl/mapping/MappingParam.java 2011-05-23 20:43:21 UTC (rev 4523)
+++ trunk/src/org/griphyn/vdl/mapping/MappingParam.java 2011-05-24 17:51:45 UTC (rev 4524)
@@ -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) {
More information about the Swift-commit
mailing list