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);
from: 
https://github.com/apache/incubator-groovy/commit/058dd40f04096bb4e9aa0a5cb8ece73991a34eed

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


2015-06-12 6:10 GMT+02:00 Jochen Theodorou 
<[email protected]<mailto:[email protected]>>:
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:
https://github.com/apache/incubator-groovy/commit/058dd40f04096bb4e9aa0a5cb8ece73991a34eed

2015-06-06 11:21 GMT+02:00 Guillaume Laforge 
<[email protected]<mailto:[email protected]>
<mailto:[email protected]<mailto:[email protected]>>>:

    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 
<[email protected]<mailto:[email protected]>
    <mailto:[email protected]<mailto:[email protected]>>> a écrit :

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

        com/thoughtworks/xstream/io/HierarchicalStreamDriver

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

        --
        Russel.
        
=============================================================================
        Dr Russel Winder      t: +44 20 7585 2200<tel:%2B44%2020%207585%202200>
        <tel:%2B44%2020%207585%202200>   voip: 
sip:[email protected]<mailto:sip%[email protected]>
        41 Buckmaster Road    m: +44 7770 465 077<tel:%2B44%207770%20465%20077>
        <tel:%2B44%207770%20465%20077>   xmpp: 
[email protected]<mailto:[email protected]>
        London SW11 1EN, UK   w: www.russel.org.uk<http://www.russel.org.uk>
        <http://www.russel.org.uk>  skype: russel_winder



    --
    Guillaume Laforge
    Groovy Project Manager
    Product Ninja & Advocate at Restlet <http://restlet.com>

    Blog: http://glaforge.appspot.com/
    Social: @glaforge <http://twitter.com/glaforge> / Google+
    <https://plus.google.com/u/0/114130972232398734985/posts>




--
Jochen "blackdrag" Theodorou
blog: http://blackdragsview.blogspot.com/



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.

Reply via email to