You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Stephen Haberman <st...@chase3000.com> on 2002/08/28 19:53:23 UTC
[jelly] [patch] ant wants properties as strings
Hi,
In the JellyPropsHandler, Ant treats all of it's variables as strings,
so the getProperties method has to make a copy of the current hash table
that is string to string, not string to object as Jelly's context is and
how getProperties currently operates.
The simple patch is attached below.
Thanks,
Stephen
Index: src/java/org/apache/commons/jelly/tags/ant/JellyPropsHandler.java
===================================================================
RCS file:
/home/cvs/jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jell
y/tags/ant/JellyPropsHandler.java,v
retrieving revision 1.2
diff -u -r1.2 JellyPropsHandler.java
--- src/java/org/apache/commons/jelly/tags/ant/JellyPropsHandler.java
28 Aug 2002 09:29:32 -0000 1.2
+++ src/java/org/apache/commons/jelly/tags/ant/JellyPropsHandler.java
28 Aug 2002 17:51:34 -0000
@@ -119,7 +119,7 @@
String name = (String) i.next();
Object value = this.context.getVariable(name);
if (value != null) {
- h.put(name, value);
+ h.put(name, value.toString());
}
}
return h;
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: [jelly] [patch] ant wants properties as strings
Posted by James Strachan <ja...@yahoo.co.uk>.
I think bob hit this issue today inside Maven also. Patch applied, thanks!
James
-------
http://radio.weblogs.com/0112098/
----- Original Message -----
From: "Stephen Haberman" <st...@chase3000.com>
To: <co...@jakarta.apache.org>
Sent: Wednesday, August 28, 2002 6:53 PM
Subject: [jelly] [patch] ant wants properties as strings
> Hi,
>
> In the JellyPropsHandler, Ant treats all of it's variables as strings,
> so the getProperties method has to make a copy of the current hash table
> that is string to string, not string to object as Jelly's context is and
> how getProperties currently operates.
>
> The simple patch is attached below.
>
> Thanks,
> Stephen
>
> Index: src/java/org/apache/commons/jelly/tags/ant/JellyPropsHandler.java
> ===================================================================
> RCS file:
> /home/cvs/jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jell
> y/tags/ant/JellyPropsHandler.java,v
> retrieving revision 1.2
> diff -u -r1.2 JellyPropsHandler.java
> --- src/java/org/apache/commons/jelly/tags/ant/JellyPropsHandler.java
> 28 Aug 2002 09:29:32 -0000 1.2
> +++ src/java/org/apache/commons/jelly/tags/ant/JellyPropsHandler.java
> 28 Aug 2002 17:51:34 -0000
> @@ -119,7 +119,7 @@
> String name = (String) i.next();
> Object value = this.context.getVariable(name);
> if (value != null) {
> - h.put(name, value);
> + h.put(name, value.toString());
> }
> }
> return h;
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>