small fixes here and there
[mir.git] / source / mir / util / ParameterExpander.java
index 75f92a7..769f6fb 100755 (executable)
@@ -115,7 +115,7 @@ public class ParameterExpander {
       throw new ParameterExpanderExc( "Can't set key {1}: not inside a Map", new Object[]{aKey} );
   }
 
-  public static String expandExpression(Map aMap, String anExpression) throws Exception {
+  public static String expandExpression(Object aContext, String anExpression) throws Exception {
     int previousPosition = 0;
     int position;
     int endOfExpressionPosition;
@@ -149,7 +149,7 @@ public class ParameterExpander {
             endOfExpressionPosition++;
           }
           if (endOfExpressionPosition<anExpression.length()) {
-            result.append(evaluateStringExpression(aMap, anExpression.substring(position+2, endOfExpressionPosition)));
+            result.append(evaluateStringExpression(aContext, anExpression.substring(position+2, endOfExpressionPosition)));
             previousPosition=endOfExpressionPosition+1;
           }
           else {
@@ -805,7 +805,7 @@ public class ParameterExpander {
       if (aValue instanceof String)
         return (String) aValue;
       if (aValue instanceof Integer)
-        return ((Integer) aValue).toString();
+        return aValue.toString();
 
       throw new RuntimeException("Not a string");
     }