jastrachan | 17 May 09:52 2004
Picon

Re: [groovy-dev] NodePrinter bug

Thanks Robert - patch applied!

On 17 May 2004, at 08:02, robert kuzelj wrote:
> i had a look into NodePrinter. i guess printAttributes
> should be this
>
> protected void printAttributes(Map attributes) {
>     out.print("(");
>     boolean first = true;
>     for (Iterator iter = attributes.entrySet().iterator();
>          iter.hasNext();) {
>         Map.Entry entry = (Map.Entry) iter.next();
>         if (first) {
>             first = false;
>         }
>         else {
>             out.print(", ");
>         }
>         out.print(entry.getKey().toString());
>         out.print(":");
>         if (entry.getValue() instanceof String)
>         {
>             out.print("'" + entry.getValue() + "'");
>         }
>         else
>         {
>             out.print(InvokerHelper.toString(entry.getValue()));
>         }
>     }
>     out.print(")");
> }
>
> ciao robertj
> ps: sorry but i am rather unknown to the cvs patch syntax.
>
>> seems as NodePrinter does not remember stringtypes
>> it does transform this one
>> target (name: "wipe"){
>> into
>> target(name:wipe){
>> it would be nice if quotes would be part of the output again.
>> ciao robertj
>
>

James
-------
http://radio.weblogs.com/0112098/

Gmane