<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://blog.gmane.org/gmane.comp.lang.groovy.user">
    <title>gmane.comp.lang.groovy.user</title>
    <link>http://blog.gmane.org/gmane.comp.lang.groovy.user</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.groovy.user/61958"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.groovy.user/61955"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.groovy.user/61954"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.groovy.user/61951"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.groovy.user/61947"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.groovy.user/61946"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.groovy.user/61945"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.groovy.user/61944"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.groovy.user/61938"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.groovy.user/61936"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.groovy.user/61931"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.groovy.user/61925"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.groovy.user/61922"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.groovy.user/61921"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.groovy.user/61918"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.groovy.user/61916"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.groovy.user/61914"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.groovy.user/61903"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.groovy.user/61902"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.groovy.user/61899"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.groovy.user/61958">
    <title>[groovy-user] Groovy Classes and ObjectInputStream</title>
    <link>http://comments.gmane.org/gmane.comp.lang.groovy.user/61958</link>
    <description>&lt;pre&gt;Im currently trying to expand the Groovy I/O tutorial to cover object
streams. Makes for some interesting research.

 

Ive got this Groovy class definition 

 

package sample

 

class Container implements Serializable {

 

    List list

    Map map

    

    boolean equals(Container other) {

        this.list == other.list &amp;amp;&amp;amp; this.map == other.map

    }

}

 

Im having trouble reading the data after ANY recompilation. It only work if
I compile to sample/Container.class once and leave it alone.

 

Otherwise the code that reads in the data

 

import sample.Container

 

def objects = []

def fis = new FileInputStream("object.bin")

fis.newObjectInputStream(Container.classLoader).eachObject { obj -&amp;gt;

    objects &amp;lt;&amp;lt; obj

}

 

keeps on throwing exceptions like this one:

 

java.io.InvalidClassException: sample.Container; local class incompatible:

stream classdesc serialVersionUID = -3698705106567121233, local class
serialVersionUID = 6309088008650198638

 

I dont even want to be forced to supply Container in complied form. Id
rather put Container.groovy into a subdirectory sample of the other
scripts and let the Groovy compiler pick it up during script execeution. It
does pick it up alright, but it is a recompilation with the above result.

 

Any ideas?

 

Jochen (eddel+)

&lt;/pre&gt;</description>
    <dc:creator>Jochen Eddelbüttel</dc:creator>
    <dc:date>2013-05-25T10:53:05</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.groovy.user/61955">
    <title>[groovy-user] LinkageError issue when loading external Java APIs</title>
    <link>http://comments.gmane.org/gmane.comp.lang.groovy.user/61955</link>
    <description>&lt;pre&gt;Hi,

I am a seasoned Perl programmer new to Groovy and not too experienced with
Java.  But I am attempting to integrate a Java APIs for Cleo VLTrader using
Groovy based on several code examples in Java.

I am receiving the following exception:

Caught: java.lang.LinkageError: loader constraint violation: loader
(instance of &amp;lt;bootloader&amp;gt;) previously initiated loading for a different
type with name "org/w3c/dom/Document"

java.lang.LinkageError: loader constraint violation: loader (instance of
&amp;lt;bootloader&amp;gt;) previously initiated loading for a different type with name
"org/w3c/dom/Document"

        at com.cleo.lexicom.beans.Options.&amp;lt;init&amp;gt;(Options.java:275)

        at com.cleo.lexicom.XMLBeaner.instantiate(XMLBeaner.java:608)

        at com.cleo.lexicom.XMLBeaner.getBean(XMLBeaner.java:281)

        at com.cleo.lexicom.LexiCom.readOptions(LexiCom.java:2398)

        at com.cleo.lexicom.LexiCom.getOptions(LexiCom.java:2322)

        at com.cleo.lexicom.LexiCom.initb(LexiCom.java:466)

        at com.cleo.lexicom.LexiCom.init(LexiCom.java:558)

        at com.cleo.lexicom.LexiCom.&amp;lt;init&amp;gt;(LexiCom.java:237)

        at
com.cleo.lexicom.external.LexiComFactory.getILexiCom(LexiComFactory.java:206)

        at
com.cleo.lexicom.external.LexiComFactory.getVersaLex(LexiComFactory.java:144)

        at
com.cleo.lexicom.external.LexiComFactory$getVersaLex.call(Unknown Source)

        at
run_groovy_test_api_connect2.run(run_groovy_test_api_connect2.groovy:35)

 which I am perceiving to be caused by the order in which libraries are
being loaded.  In the documentation that I have there is a mention of  it
mentions:

set the JVM parameter -Xbootclasspath/p:"*VersaLexHome*\lib\serializer.jar;*
VersaLexHome*\lib\xalan.jar;*VersaLexHome*\lib\xml-apis.jar". This is
because the JRE itself includes a version of XALAN which is not compatible
with VersaLex ebMS.

In Perl, loading external libraries is really easy.

use lib ‘/path/to/lib’;

Simply put use lib at the top of the script.  This call will push the lib
directory on the front of the lib path so that the loading order is started
with the new libraries.  This way the libraries you want to use are loaded
first and override libraries further down the hierarchy.

Is this my issue?  Any pointers would be greatly appreciated.

Thank you!

Chris

The run_groovy.cmd file contains:

&amp;lt; at &amp;gt;ECHO OFF

set
JAVA_OPTS=-Djava.ext.dirs="C:\VLTrader\lib;C:\VLTrader\lib\help;C:\VLTrader\lib\ext
-Djava.library.path=C:\VLTrader
-Xbootclasspath/p:C:\VLTrader\lib\serializer.jar;C:\VLTrader\lib\xalan.jar;C:\VLTrader\lib\xml-apis.jar"

groovy run_groovy_test_api_connect.groovy

My groovy file run_groovy_test_api_connect.groovy contains the following:

D:\VersaLexAPI\src\examples&amp;gt;run_groovy.cmd

LOADING JARS:[C:\VLTrader\lib]

LOADING JARS:[C:\VLTrader\webserver]

CLASS NAME:[com.cleo.lexicom.external.LexiComFactory]

Caught: java.lang.LinkageError: loader constraint violation: loader
(instance of &amp;lt;bootloader&amp;gt;) previously initiated loading for a different
type with name "org/w3c/dom/Document"

java.lang.LinkageError: loader constraint violation: loader (instance of
&amp;lt;bootloader&amp;gt;) previously initiated loading for a different type with name
"org/w3c/dom/Document"

        at com.cleo.lexicom.beans.Options.&amp;lt;init&amp;gt;(Options.java:275)

        at com.cleo.lexicom.XMLBeaner.instantiate(XMLBeaner.java:608)

        at com.cleo.lexicom.XMLBeaner.getBean(XMLBeaner.java:281)

        at com.cleo.lexicom.LexiCom.readOptions(LexiCom.java:2398)

        at com.cleo.lexicom.LexiCom.getOptions(LexiCom.java:2322)

        at com.cleo.lexicom.LexiCom.initb(LexiCom.java:466)

        at com.cleo.lexicom.LexiCom.init(LexiCom.java:558)

        at com.cleo.lexicom.LexiCom.&amp;lt;init&amp;gt;(LexiCom.java:237)

        at
com.cleo.lexicom.external.LexiComFactory.getILexiCom(LexiComFactory.java:206)

        at
com.cleo.lexicom.external.LexiComFactory.getVersaLex(LexiComFactory.java:144)

        at
com.cleo.lexicom.external.LexiComFactory$getVersaLex.call(Unknown Source)

        at
run_groovy_test_api_connect3.run(run_groovy_test_api_connect3.groovy:11)
&lt;/pre&gt;</description>
    <dc:creator>Christopher Taranto</dc:creator>
    <dc:date>2013-05-24T19:40:11</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.groovy.user/61954">
    <title>[groovy-user] Git vs Perforce Comparison</title>
    <link>http://comments.gmane.org/gmane.comp.lang.groovy.user/61954</link>
    <description>&lt;pre&gt;Hello Groovers,

I'm sure that everyone here is pretty well sold on the idea that Git is
nearly always a better SCM choice than Perforce, etc.  I recently had to do
a comparison at work highlighting the differences between the two systems
as we try to move from a legacy home-grown SCM solution to a more modern
approach.  The result is posted at the link below in case you find it
useful in making a similar argument.  Enjoy!

http://cooljure.blogspot.com/2013/05/hello-all-this-is-my-very-first-post-on.html

Alan Thompson
&lt;/pre&gt;</description>
    <dc:creator>Alan Thompson</dc:creator>
    <dc:date>2013-05-24T18:17:56</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.groovy.user/61951">
    <title>[groovy-user] Do we have ruby's symbols analogue?</title>
    <link>http://comments.gmane.org/gmane.comp.lang.groovy.user/61951</link>
    <description>&lt;pre&gt;Hello

While developing Grails application I spend a lot of time working with 
strings - comparing them, using them as keys in maps and so on. 
Sometimes I feel that it should be enums (like language "en", "ru") but 
it adds complexity - add one more class, sometimes use it, sometimes 
strings...
May be we should have something similar to Ruby's symbols - enums that 
super simple/fast convert to/from string

I don't know how Groovy/Java works with strings. The goal of symbols:

1. Less memory consumption
2. Fastest object comparison

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



&lt;/pre&gt;</description>
    <dc:creator>Fedor Belov</dc:creator>
    <dc:date>2013-05-24T11:46:43</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.groovy.user/61947">
    <title>[groovy-user] Running static analysis on Groovy code to look for security problems.</title>
    <link>http://comments.gmane.org/gmane.comp.lang.groovy.user/61947</link>
    <description>&lt;pre&gt;Hi,
   Having used groovy successfully in the the part in a Spring MVC app 
(with a lot of Java code), I am trying to push the introduction of 
groovy in another product. However, the only barrier I have is the lack 
of ability to do web-app security static analysis for Groovy code from 
vendors like whitehat security (https://www.whitehatsec.com/) . We are 
evaluating using these tools to do some static analysis of our code, and 
most of these tools do not support (understandably) dynamic languages 
like groovy.

What options do I have ? I would not like to loose out on Groovy, but at 
the same time, this 3rd party security testing (static and pen testing) 
is very important for us. Please advice.

Thanks,
  ~preetham

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



&lt;/pre&gt;</description>
    <dc:creator>Preetham Kajekar</dc:creator>
    <dc:date>2013-05-23T16:55:00</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.groovy.user/61946">
    <title>[groovy-user] Expando - getProperties doesn't include Class Properties</title>
    <link>http://comments.gmane.org/gmane.comp.lang.groovy.user/61946</link>
    <description>&lt;pre&gt;Hi all,

Can anyone explain why a class that extends Expando has no properties as 
in the example below?  How do I get the properties of a class that 
extends Expando?  I'm using Groovy 2.1.3.

    class A
    {
        def x = 37
    }

    class B extends Expando
    {
        def x = 37
    }

    A a = new A()
    println a.properties

    B b = new B()
    println b.properties

output:

    *[class:class A, x:37]*
    *[:]*


Thanks,
Steve Amerige, Senior Software Developer



&lt;/pre&gt;</description>
    <dc:creator>Steve Amerige</dc:creator>
    <dc:date>2013-05-23T15:50:18</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.groovy.user/61945">
    <title>[groovy-user] Code Review:</title>
    <link>http://comments.gmane.org/gmane.comp.lang.groovy.user/61945</link>
    <description>&lt;pre&gt;Hi all,

The code below is successfully able to determine the String name of a 
closure.  Is what I'm doing correct and safe?  Are there any edge cases 
I might have missed?

import org.codehaus.groovy.runtime.MethodClosure

class Util
{
     static String getClosureName(Closure c)
     {
         return c instanceof Closure &amp;amp;&amp;amp; !(c instanceof MethodClosure) ?
               c.owner.class.name + '.' + c.properties.find { k,v -&amp;gt; c 
== v }.getKey()
            :  null
     }
}

class Foo
{
     def x = {}
     def fn() {}
}

class Bar
{
     def y = {}
}

f = new Foo()
b = new Bar()
assert Util.getClosureName(f.x) == 'Foo.x'
assert Util.getClosureName(b.y) == 'Bar.y'
assert Util.getClosureName(f.&amp;amp;fn) == null

Thanks,
Steve Amerige, Senior Software Developer


&lt;/pre&gt;</description>
    <dc:creator>Steve Amerige</dc:creator>
    <dc:date>2013-05-23T13:04:40</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.groovy.user/61944">
    <title>[groovy-user] Where to get PDF version of *all* groovy documentation?</title>
    <link>http://comments.gmane.org/gmane.comp.lang.groovy.user/61944</link>
    <description>&lt;pre&gt;Hello,

Just like Grails' "single.pdf" that contains all of Grails documentation,
can somebody please create and upload a similar bundle for Groovy?

If not a a single PDF, then, maybe a PDF each for "Getting Started with
Groovy", "Using Groovy", "Cookbook Examples", "Advanced Usage", etc would
also be greatly helpful.

If not PDF's, then at least downloadable HTML tarballs would also be
helpful.

I usually have a need to read Groovy documentation over a slow (and paid!)
connection, so would greatly appreciate offline versions. I'm sure many
others would be benefited too.

Many thanks in advance,
/HS
&lt;/pre&gt;</description>
    <dc:creator>Harry Simons</dc:creator>
    <dc:date>2013-05-23T12:16:08</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.groovy.user/61938">
    <title>[groovy-user] groovy - invoking a closure</title>
    <link>http://comments.gmane.org/gmane.comp.lang.groovy.user/61938</link>
    <description>&lt;pre&gt;Hi,

Given the following piece of code:

class Lol {
    def clo = {
        println "arg $it"
    }.memoize()
}

Why it's not possible to invoke closure as following:

new Lol().clo('sample arg')

The result is:
groovy.lang.MissingMethodException: No signature of method:
org.codehaus.groovy.runtime.memoize.Memoize$MemoizeFunction.doCall() is
applicable for argument types: (java.lang.String) values: [sample arg]

Why? Do I have to call 'call()' method explicitly?



--
View this message in context: http://groovy.329449.n5.nabble.com/groovy-invoking-a-closure-tp5715524.html
Sent from the groovy - user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



&lt;/pre&gt;</description>
    <dc:creator>Opal</dc:creator>
    <dc:date>2013-05-23T07:32:14</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.groovy.user/61936">
    <title>[groovy-user] broken groovy JARs in repositories</title>
    <link>http://comments.gmane.org/gmane.comp.lang.groovy.user/61936</link>
    <description>&lt;pre&gt;Hi,

I am getting checksum errors for all the groovy AND groovy-all 1.6.* jars in
both codehaus and maven central repositories.

Tried to download jar manually and tried to open them, happens they are all
broken.

Anybody knows anything about it?

Thanks in advance,
Daniel



--
View this message in context: http://groovy.329449.n5.nabble.com/broken-groovy-JARs-in-repositories-tp5715519.html
Sent from the groovy - user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



&lt;/pre&gt;</description>
    <dc:creator>Daniel Marreco</dc:creator>
    <dc:date>2013-05-22T20:52:49</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.groovy.user/61931">
    <title>[groovy-user] Tend to forgetting each...</title>
    <link>http://comments.gmane.org/gmane.comp.lang.groovy.user/61931</link>
    <description>&lt;pre&gt;Hello there,

I've found I repeatedly tend to forget 'each', i.e., I tend to write

someCollection { ... }

instead of

someCollection.each { ... }

I wonder, is that just me, or happens this to others, too? To be quite frank I am considering whether to tweak the runtime to automatically perform 'each' in such cases through methodMissing, or whether it would bring more harm than benefits :P

All the best,
OC


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



&lt;/pre&gt;</description>
    <dc:creator>OC</dc:creator>
    <dc:date>2013-05-22T15:07:02</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.groovy.user/61925">
    <title>[groovy-user] XML size (Was: XmlSlurper no GC</title>
    <link>http://comments.gmane.org/gmane.comp.lang.groovy.user/61925</link>
    <description>&lt;pre&gt;XmlSlurper performance aside; as a side-note, I have to wonder why you are shipping 25MB SOAP messages around instead of deferring the big blobs of data to MTOM attachments.


--
Schalk W. Cronjé
[Sent from mobile phone]

-------- Original message --------
From: jochen&amp;lt; at &amp;gt;eddelbuettel.net 
Date: 21/05/2013  22:56  (GMT+00:00) 
To: user&amp;lt; at &amp;gt;groovy.codehaus.org,youknowwho&amp;lt; at &amp;gt;heroicefforts.net 
Subject: Re: [groovy-user] XmlSlurper no GC 
 
Jess,
 
I've had my hand on the XmlSlurper sources just recently. Its categorization as "lazy evaluation" only extends to GPath queries (where it builds a hierarchy of Iterators instead of collecting nodes into new lists) and node structure manipulation (where new node content is represented by Builder closures until the XML is streamed out again). But it still creates a full in-memory representation of its (groovy.util.slurpersupport.)Nodes in the parse method based on SAX events. So we end up with something that is closer to DOM than StAX. It's all implemented in Java, not compiled Groovy. Anyway, given the dimensions of your typical XMLs, it probably isn't a wise choice.
 
What I find interesting is that you describe that it makes a difference, whether any queries are carried out or not. Could you send me a full sample (code and data)? I might find some time early next week to investigate. A recently accepted pull request of mine is going to make the network of Node references that the GC needs to come to terms with still a slight bit more complicated (by keeping a parent node reference) come Groovy 2.2.x.
 
I still believe that Groovy XML processing is utterly brilliant, but the JVM should sure be able to recapture the memory utilized along the way.
 
Cheers
 
Jochen (eddel+)
youknowwho&amp;lt; at &amp;gt;heroicefforts.net hat am 21. Mai 2013 um 16:34 geschrieben:
youknowwho&amp;lt; at &amp;gt;heroicefforts.net hat am 21. Mai 2013 um 16:34 geschrieben: 

Background, I'm contemplating upwards of 25MB SOAP responses coming across the wire to me and vainly holding on to the illusion that the syntactically beautiful XmlSlurper would ever scale, memory wise, to support concurrent processing of such requests in a JEE server environment.  Oh, I can hear the I told you so's echoing from my teammates already.  :)
 
I have a Groovy script that simply reads a 25MB message from disk and does some light processing using XmlSlurper.  With a 128MB heap, it just manages to run (oh StAX how I envy you now).  However, if I run this block in a loop, then I get an OOME.  Once the root GPathResult returned by the parse invocation is queried, then it appears that memory is never GC'd.  I see no explicit cleanup methods on any of these classes.  I've tried scoping in a closure, explicitly assigning nulls, etc. and nothing seems to work.  Other allocations, big arrays, etc. are GC'd as expected.  Are there known memory leak issues in this implementation or maybe Sun's underlying SAX implementation (JDK 1.6)?
 
Also, has anyone calculated the overhead added by XmlSlurper to XML of size X?
 
 
thanks,
 
-Jess

 &lt;/pre&gt;</description>
    <dc:creator>Schalk W. Cronjé</dc:creator>
    <dc:date>2013-05-22T05:11:34</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.groovy.user/61922">
    <title>[groovy-user] Groovy not working with Rhino JS to Java call</title>
    <link>http://comments.gmane.org/gmane.comp.lang.groovy.user/61922</link>
    <description>&lt;pre&gt;Mirth Connect is an open source integration engine with specific support
for

HL7 (healthcare) messages. 

Internally it uses the Rhino JavaScript engine which of course runs
JavaScript, but also allows calling code from custom Java packages
(found in jar files in the custom-lib). 

 

I have written a simple Groovy class and then created the jar using the
GroovyWrapper
(http://docs.codehaus.org/display/GROOVY/WrappingGroovyScript) 

 

The code runs without error, but I find that when I try to do something
Groovy, the call is simply ignored. 

For example: 

 

        def orderList = orders.split("\n") 

        return orderList[0] 

 

returns the expected single line (orderList[0]) when running in the IDE,
but returns the entire multi-line string (orders) when run from Mirth
(Rhino). 

 

Admittedly, this is my first attempt at running compiled Groovy from
Java, so the chances that I am missing something completely obvious are
high, but I have spent some time on this before calling for help. 

 

Can anyone offer some guidance on how I might solve this issue? 

 

Thank you. 

 

&lt;/pre&gt;</description>
    <dc:creator>Schleis, David M.</dc:creator>
    <dc:date>2013-05-21T21:32:07</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.groovy.user/61921">
    <title>[groovy-user] Jar-red Groovy not working from Rhino JS to Java call</title>
    <link>http://comments.gmane.org/gmane.comp.lang.groovy.user/61921</link>
    <description>&lt;pre&gt;Mirth Connect is an open source integration engine with specific support
for

HL7 (healthcare) messages. 

Internally it uses the Rhino JavaScript engine which of course runs
JavaScript, but also allows calling code from custom Java packages
(found in jar files in the custom-lib). 

 

I have written a simple Groovy class and then created the jar using the
GroovyWrapper
(http://docs.codehaus.org/display/GROOVY/WrappingGroovyScript) 

 

The code runs without error, but I find that when I try to do something
Groovy, the call is simply ignored. 

For example: 

 

        def orderList = orders.split("\n") 

        return orderList[0] 

 

returns the expected single line (orderList[0]) when running in the IDE,
but returns the entire multi-line string (orders) when run from Mirth
(Rhino). 

 

Admittedly, this is my first attempt at running compiled Groovy from
Java, so the chances that I am missing something completely obvious are
high, but I have spent some time on this before calling for help. 

 

Can anyone offer some guidance on how I might solve this issue? 

 

Thank you. 

 

&lt;/pre&gt;</description>
    <dc:creator>Schleis, David M.</dc:creator>
    <dc:date>2013-05-21T21:16:50</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.groovy.user/61918">
    <title>[groovy-user] XmlSlurper no GC</title>
    <link>http://comments.gmane.org/gmane.comp.lang.groovy.user/61918</link>
    <description>&lt;pre&gt;
Background, I'm contemplating upwards of 25MB SOAP responses coming across the wire to me and vainly holding on to the illusion that the syntactically beautiful XmlSlurper would ever scale, memory wise, to support concurrent processing of such requests in a JEE server environment.  Oh, I can hear the I told you so's echoing from my teammates already.  :)
 
I have a Groovy script that simply reads a 25MB message from disk and does some light processing using XmlSlurper.  With a 128MB heap, it just manages to run (oh StAX how I envy you now).  However, if I run this block in a loop, then I get an OOME.  Once the root GPathResult returned by the parse invocation is queried, then it appears that memory is never GC'd.  I see no explicit cleanup methods on any of these classes.  I've tried scoping in a closure, explicitly assigning nulls, etc. and nothing seems to work.  Other allocations, big arrays, etc. are GC'd as expected.  Are there known memory leak issues in this implementation or maybe Sun's underlying SAX implementation (JDK 1.6)?
 
Also, has anyone calculated the overhead added by XmlSlurper to XML of size X?
 
 
thanks,
 
-Jess&lt;/pre&gt;</description>
    <dc:creator>youknowwho-h/fBBGY9GQwcavXph9NsS16hYfS7NtTn&lt; at &gt;public.gmane.org</dc:creator>
    <dc:date>2013-05-21T14:34:41</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.groovy.user/61916">
    <title>[groovy-user] in-consistence :)</title>
    <link>http://comments.gmane.org/gmane.comp.lang.groovy.user/61916</link>
    <description>&lt;pre&gt;Hello there,

I've bumped into one slight inconsistence with 'in' -- is this the presumed behaviour?

groovy:000&amp;gt; String in Class
===&amp;gt; false
groovy:000&amp;gt; String instanceof Class
===&amp;gt; true
groovy:000&amp;gt; 

Thanks,
OC


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



&lt;/pre&gt;</description>
    <dc:creator>OC</dc:creator>
    <dc:date>2013-05-21T09:40:41</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.groovy.user/61914">
    <title>[groovy-user] ClassLoaders and garbage collection</title>
    <link>http://comments.gmane.org/gmane.comp.lang.groovy.user/61914</link>
    <description>&lt;pre&gt;Hello everyone,
I'm not that big expert of garbage collection and classloaders, but there's
something that puzzles me and it's very important for me to find an answer
to this.
I've been told that a class can be collected when 
1) all the instances of that class have lost all references. Hence, they're
marked for collection
2) all the classes loaded by the same classloader have no referenced
instances
3) the classloader that loaded is no referenced anymore

I'm experiencing an unexpected behavior with the groovyclassloader.
Let's take this sample code:


We have 2 classloaders extending GroovyClassLoader. the XClassLoader loads a
java.util.Date, while the WoodClassLoader parses a class on the fly.
Both classloaders override finalize() to give us a hint the classloader is
marked for collection.
Finally the instance overrides finalize() as well to let us now the object
is marked for collection as well.

I would expect to see:
- dead instance
- Death of wood class loader
- Death of X class laoder

I've read facts suggesting the wood classloader could take more time to be
collected. And that's fine.
But here what I get:


And this can go on and on thousands hits... what am I missing? Will the ever
get collected? If not, I'm in a big big problem

Thanks in advance

Simone



--
View this message in context: http://groovy.329449.n5.nabble.com/ClassLoaders-and-garbage-collection-tp5715489.html
Sent from the groovy - user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



&lt;/pre&gt;</description>
    <dc:creator>theirish81</dc:creator>
    <dc:date>2013-05-21T06:33:12</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.groovy.user/61903">
    <title>[groovy-user] Is there a groovy way to change a string bit please?</title>
    <link>http://comments.gmane.org/gmane.comp.lang.groovy.user/61903</link>
    <description>&lt;pre&gt; Hi.

I have a string: 
def str = "111000";

And I want change the last bit to 1 (or other changes).
I know I can not use these under groovy 2.1.3:
str[-1] = '1';
str[0] = '0';
str[1..2] = '00';

So, is there a simple groovy way to do these please?



-----
Xunitc
--
View this message in context: http://groovy.329449.n5.nabble.com/Is-there-a-groovy-way-to-change-a-string-bit-please-tp5715478.html
Sent from the groovy - user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



&lt;/pre&gt;</description>
    <dc:creator>xunitc</dc:creator>
    <dc:date>2013-05-20T11:45:12</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.groovy.user/61902">
    <title>[groovy-user] arrays equals and hashCode</title>
    <link>http://comments.gmane.org/gmane.comp.lang.groovy.user/61902</link>
    <description>&lt;pre&gt;Greetings,

It seems Groovy arrays don't obey the javadoc hashCode contract
(http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html#hashCode()).
Specifically, array equality is computed by comparing array elements,
but hashCode is computed based on the object reference. We ran into this
issue at work when trying to use byte arrays as keys in a HashMap
(instead of Strings). I do not see this unexpected behavior documented
anywhere, so I thought I'd post it here for discussion.

Below are some non-exhaustive test cases. Out of these, only the last
test, using Strings, passes. All others fail on the hashCode assertion.

Regards,
Paul

// ran with groovy 2.1.3, osx, jdk 1.6, junit 4

    &amp;lt; at &amp;gt;Test
    void testBytePrimitiveArray() {
        byte[] b1 = new byte[2]
        byte[] b2 = new byte[2]
        assert b1 == b2
        assert b1.hashCode() == b2.hashCode() //fails
    }

    &amp;lt; at &amp;gt;Test
    void testByteObjectArray() {
        Byte[] b1 = new Byte[2]
        Byte[] b2 = new Byte[2]
        assert b1 == b2
        assert b1.hashCode() == b2.hashCode()  //fails
    }

    &amp;lt; at &amp;gt;Test
    void testIntArray() {
        int[] i1 = new int[2]
        int[] i2 = new int[2]
        assert i1 == i2
        assert i1.hashCode() == i2.hashCode() //fails
    }

    &amp;lt; at &amp;gt;Test
    void testCharArray() {
        char[] c1 = new char[2]
        char[] c2 = new char[2]
        assert c1 == c2
        assert c1.hashCode() == c2.hashCode() //fails
    }

    &amp;lt; at &amp;gt;Test
    void testString() {
        String s1 = "dog"
        String s2 = "dog"
        assert s1 == s2
        assert s1.hashCode() == s2.hashCode() //passes
    }

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



&lt;/pre&gt;</description>
    <dc:creator>Pawel Slusarz</dc:creator>
    <dc:date>2013-05-19T20:00:13</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.groovy.user/61899">
    <title>[groovy-user] Would it be possible to forbid auto-prefixing 'this.'?</title>
    <link>http://comments.gmane.org/gmane.comp.lang.groovy.user/61899</link>
    <description>&lt;pre&gt;Hello there,

would it be possible to tell the compiler _NOT_ to try "this.foo" when it compiles "foo"? So that "foo" would mean just a variable, and if there's none, fail. If I want to try for a property, I write "this.foo" anyway.

Thanks,
OC


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



&lt;/pre&gt;</description>
    <dc:creator>OC</dc:creator>
    <dc:date>2013-05-19T12:35:18</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.groovy.user/61896">
    <title>[groovy-user] AST-dump/browse a specific method or class of a big project?</title>
    <link>http://comments.gmane.org/gmane.comp.lang.groovy.user/61896</link>
    <description>&lt;pre&gt;Hello there,

I sort of recall this was already debated, but can't find a solution.

Presumed I've got an AST transform which gets called in some compilation phase, is there an easy way to dump the AST tree of given method and/or a given class to string (or directly to output or whatever)? Or perhaps even to serialize out the AST tree in a format which some GUI AST browser, like the groovyConsole one, could read and display?

I suspect some of my AST transforms go wild and do things they definitely should not; such a dump/browser would help a lot. Note that since there's LOTS of the transforms, plus some preprocessing, plus a number of libraries needed etc., it is not really manageable to simply copy/paste the code in doubt into groovyConsole and press cmd-t :)

Of course it's always possible to DIY; I just wonder whether it's not already done somewhere on the libraries?

Thanks,
OC


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



&lt;/pre&gt;</description>
    <dc:creator>OC</dc:creator>
    <dc:date>2013-05-17T14:07:10</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.comp.lang.groovy.user">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.comp.lang.groovy.user</link>
  </textinput>
</rdf:RDF>
