groovy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Miles <>
Subject Re: Groovy and Xstream
Date Fri, 12 Jun 2015 10:45:31 GMT
private void saveAsXML(String name, AST ast) {

        - XStream xstream = new XStream(new StaxDriver());

        - try {

        - xstream.toXML(ast, new FileWriter(name + ".antlr.xml"));

        - System.out.println("Written AST to " + name + ".antlr.xml");

        - }

        - catch (Exception e) {

        - System.out.println("Couldn't write to " + name + ".antlr.xml");

        - e.printStackTrace();

        - }

        + XStreamUtils.serialize(name, ast);
should that not be XstreamUtils.serialize(name +".antlr", ast);

On 12/06/15 05:36, Cédric Champeau wrote:

2015-06-12 6:10 GMT+02:00 Jochen Theodorou <<>>:
Why does this fix the problem?

That I still don't understand. Normally the class shouldn't be initialized since the code
in saveAsXml is not called. However, I verified that it does fix the problem.

And on a side-note: the change will no longer allow to write the .antlr.xml file together
with the other .xml

mmm good catch. It means that we miss a unit test.

Am 12.06.2015 01:27, schrieb Cédric Champeau:
This is fixed in master:

2015-06-06 11:21 GMT+02:00 Guillaume Laforge <<>

    I reported a similar problem to the Gradle developers recently as
    this was occurring for me in a Gradle build with a simple hello
    world groovy script, but they haven't been able yet to be helpful.
    It seems to be a problem with 2.5-SNAPSHOT and Gradle only.

    Le samedi 6 juin 2015, Russel Winder <<>
    <<>>> a écrit :

        Building GroovyFX with Groovy 2.5.0-SNAPSHOT I get a problem with:


        Is this maybe just a bad Groovy build on my part?

        Dr Russel Winder      t: +44 20 7585 2200<tel:%2B44%2020%207585%202200>
        <tel:%2B44%2020%207585%202200>   voip:<>
        41 Buckmaster Road    m: +44 7770 465 077<tel:%2B44%207770%20465%20077>
        <tel:%2B44%207770%20465%20077>   xmpp:<>
        London SW11 1EN, UK   w:<>
        <>  skype: russel_winder

    Guillaume Laforge
    Groovy Project Manager
    Product Ninja & Advocate at Restlet <>

    Social: @glaforge <> / Google+

Jochen "blackdrag" Theodorou

The information contained in this email, including any attachments, is intended solely for
use by the individual or entity named above and may be confidential. If you have received
this email in error please delete it and notify the sender immediately; you should not retain
the message or disclose its contents to anyone. Thank you. Yell is a brand of hibu (UK) Limited.
Registered Office: One Reading Central, Forbury Road, Reading, Berkshire, RG1 3YL. Registered
in England and Wales No. 4205228” VAT Number: GB 765 346 017 © hibu (UK) Limited 2014.
All rights reserved. Yell, Yellow Pages, hibu and other TM are trademarks of hibu.

View raw message