commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r155982 - jakarta/commons/proper/jelly/trunk/jelly-tags/ant/src/java/org/apache/commons/jelly/tags/ant/JellyPropsHandler.java
Date Thu, 03 Mar 2005 00:32:21 GMT
Author: brett
Date: Wed Mar  2 16:32:20 2005
New Revision: 155982

URL: http://svn.apache.org/viewcvs?view=rev&rev=155982
Log:
backport changes from maven

Modified:
    jakarta/commons/proper/jelly/trunk/jelly-tags/ant/src/java/org/apache/commons/jelly/tags/ant/JellyPropsHandler.java

Modified: jakarta/commons/proper/jelly/trunk/jelly-tags/ant/src/java/org/apache/commons/jelly/tags/ant/JellyPropsHandler.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/jelly/trunk/jelly-tags/ant/src/java/org/apache/commons/jelly/tags/ant/JellyPropsHandler.java?view=diff&r1=155981&r2=155982
==============================================================================
--- jakarta/commons/proper/jelly/trunk/jelly-tags/ant/src/java/org/apache/commons/jelly/tags/ant/JellyPropsHandler.java
(original)
+++ jakarta/commons/proper/jelly/trunk/jelly-tags/ant/src/java/org/apache/commons/jelly/tags/ant/JellyPropsHandler.java
Wed Mar  2 16:32:20 2005
@@ -21,6 +21,7 @@
 
 import org.apache.commons.grant.DefaultPropsHandler;
 import org.apache.commons.jelly.JellyContext;
+import org.apache.commons.jelly.expression.Expression;
 
 /** Implementation of a Commons Grant <code>propsHandler</code>
  *  to resolve through Jelly's context.
@@ -65,7 +66,14 @@
             return null;
         }
         else {
-            return value.toString();
+            if ( value instanceof Expression )
+            {
+                return ( ( Expression ) value ).evaluateAsString( context );
+            }
+            else
+            {
+                return value.toString();
+            }
         }
     }
 
@@ -77,9 +85,9 @@
         Hashtable h = new Hashtable();
         for (Iterator i = this.context.getVariableNames(); i.hasNext(); ) {
             String name = (String) i.next();
-            Object value = this.context.getVariable(name);
-            if (name != null && value != null && value.toString() != null)
{
-                h.put(name, value.toString());
+            String value = getProperty( name );
+            if (value != null) {
+                h.put(name, value);
             }
         }
         return h;



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message