<?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 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/36334"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.groovy.user/36322"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.groovy.user/36319"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.groovy.user/36306"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.groovy.user/36299"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.groovy.user/36291"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.groovy.user/36286"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.groovy.user/36272"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.groovy.user/36269"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.groovy.user/36256"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.groovy.user/36255"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.groovy.user/36246"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.groovy.user/36245"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.groovy.user/36228"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.groovy.user/36220"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.groovy.user/36215"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.groovy.user/36211"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.groovy.user/36210"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.groovy.user/36209"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.groovy.user/36204"/>
      </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/36334">
    <title>[groovy-user] Gant and Gradle</title>
    <link>http://comments.gmane.org/gmane.comp.lang.groovy.user/36334</link>
    <description>Please excuse the very wide initial circulation of this, but I want to
make sure people are aware that there is a debate that might affect
them.  I suspect the best place for the debate is the Gant Users email
list, so if people could be careful about which list they reply to when
replying then people not interested in the debate will not get flooded
</description>
    <dc:creator>Russel Winder</dc:creator>
    <dc:date>2008-10-04T09:07:37</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.groovy.user/36322">
    <title>[groovy-user] Cannot use Map to "extend" a Java inner class</title>
    <link>http://comments.gmane.org/gmane.comp.lang.groovy.user/36322</link>
    <description>i'm not sure if using a Map to "extend" a Java class is an officially
supported feature anyway. The doc only say it can be used to implement
interface.

Say, for the following Java:
public class TestInner {
   public String debug(){ return "outer debug"; }

    public class Inner {
        public String debug(){ return "inner debug"; }
    }
}

The following does work:

def inner1 = ['debug':{return "outer debug 1"}] as TestInner
println inner1.debug()

But not :
def inner2 = ['debug':{return "inner debug 1"}] as TestInner.Inner
println inner2.debug()

There is compilation error.
Caught: org.codehaus.groovy.runtime.typehandling.GroovyCastException: Error
casting map to TestInner$Inner, Reason: Error creating proxy: startup
failed, Script1.groovy: 1: unexpected token: $ &lt; at &gt; line 1, column 16.
1 error

JIRA it as bug or request for new feature? :-)

regards,
mingfai
</description>
    <dc:creator>Mingfai</dc:creator>
    <dc:date>2008-10-03T17:03:55</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.groovy.user/36319">
    <title>[groovy-user] closure issue in GroovyTestCase</title>
    <link>http://comments.gmane.org/gmane.comp.lang.groovy.user/36319</link>
    <description>Hi guys,

I've got a junit test class which extends GroovyTestCase, when the class 
involves some Groovy class/script which generate closures classes, the 
test will fail along with the message like following:

junit.framework.AssertionFailedError: Class MyTest_closure1 has no 
public constructor TestCase(String name) or TestCase()

Does anyone have idea to fix this?

Thanks

Haotian


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

    http://xircles.codehaus.org/manage_email



</description>
    <dc:creator>Haotian Sun</dc:creator>
    <dc:date>2008-10-03T16:10:31</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.groovy.user/36306">
    <title>[groovy-user] escape special characters from MarkupBuilder</title>
    <link>http://comments.gmane.org/gmane.comp.lang.groovy.user/36306</link>
    <description>Hello guys,

Can anyone please tell me how to ask the MarkupBuilder to escape some 
special characters such as "&lt;" and "&gt;" in a html syntax?
For example, I want to produce an "&lt;br&gt;" from MarkupBuilder but I got a 
"&amp;lt;" and "&amp;gt;" from the source code that it generates.

Thanks

Haotian

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

    http://xircles.codehaus.org/manage_email



</description>
    <dc:creator>Haotian Sun</dc:creator>
    <dc:date>2008-10-03T10:15:50</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.groovy.user/36299">
    <title>[groovy-user] multiple assigments state</title>
    <link>http://comments.gmane.org/gmane.comp.lang.groovy.user/36299</link>
    <description>Hi!

Does anybody know if multiple assignments are working now in
groovy-1.6-beta2 ?

Thanks!

Regards,
Sergey Bondarenko.
</description>
    <dc:creator>Sergey Bondarenko</dc:creator>
    <dc:date>2008-10-03T08:10:14</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.groovy.user/36291">
    <title>[groovy-user] Date.format convenience methods</title>
    <link>http://comments.gmane.org/gmane.comp.lang.groovy.user/36291</link>
    <description>This is probably a silly question, but why is there no Date.format(..)
GDK method?  It would basically be a wrapper for SimpleDateFormat so
you could do this:

new Date().format( 'yyyy-MM-dd' )
// returns 2008-10-02

The same could be done for Calendar.  Does something like this
seriously not already exist in the Groovy API?

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

    http://xircles.codehaus.org/manage_email



</description>
    <dc:creator>Tom Nichols</dc:creator>
    <dc:date>2008-10-02T18:49:21</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.groovy.user/36286">
    <title>[groovy-user] Wanted: Help translating Perl One Liner that Emits UTF-8 (or UTF-16)</title>
    <link>http://comments.gmane.org/gmane.comp.lang.groovy.user/36286</link>
    <description>"
If I use the windows command (cmd.exe) and type 

chcp 65001
perl -wle "binmode STDOUT, q[:utf8]; print chr() for 0x410 .. 0x430;"

I get the Russian alphabet, one character every other line (not quite what I want but close) with the proper Cyrillic glyphs.

If I install cygwin-xfree86 and a funky antique program called ruxvt-X I can also get the russian alphabet

LC_CTYPE=en_US.UTF-8 urxvt-X.exe&amp;
perl -wle "binmode STDOUT, q[:utf8]; print chr() for 0x410 .. 0x430;"

Can someone help me translate this perl to groovy?

Thanks!
Siegfried</description>
    <dc:creator>Siegfried Heintze</dc:creator>
    <dc:date>2008-10-02T15:45:51</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.groovy.user/36272">
    <title>[groovy-user] [Fwd: scriptom dll file not found in java.library.path issue]</title>
    <link>http://comments.gmane.org/gmane.comp.lang.groovy.user/36272</link>
    <description>
---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
</description>
    <dc:creator>Haotian Sun</dc:creator>
    <dc:date>2008-10-02T10:31:47</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.groovy.user/36269">
    <title>[groovy-user] London GGUG meeting last evening -- Groovy strategy for parallelism</title>
    <link>http://comments.gmane.org/gmane.comp.lang.groovy.user/36269</link>
    <description>Thanks to everyone who sat through my ramble last evening.  Unlike Gus
and Jerome's presentation on their Grails and testing experiences (which
was great and I bet what most people turned up to hear), my talk really
was unplanned, definitely unrehearsed, and literally made up as I went
along.  

Special thanks to the people who came up afterwards and said they
enjoyed the talk -- it made me feel a lot better about the unstructured
and disconnected nature of the session.
 
I thought the basic questions I was trying to raise worth summarizing
and broadcasting more widely.  I am not sure if discussion on mailing
lists is the right mechanism for continuing the discussion and whilst
this email has gone to the Grails user list as well as the Groovy user
list, this is definitely a Groovy rather than Grails issue.

The backdrop here is that now every computer is a parallel computer yet
most code is still sequential code.  Most programmers are very poor at
writing concurrent code and even worse at parallel code.  Sha</description>
    <dc:creator>Russel Winder</dc:creator>
    <dc:date>2008-10-02T06:16:31</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.groovy.user/36256">
    <title>[groovy-user] Error calling getter when overriding invokeMethod... bug?</title>
    <link>http://comments.gmane.org/gmane.comp.lang.groovy.user/36256</link>
    <description>Hi all,

I created a layer to add some usefull methods to HtmlUnit. When creating a
shortcut to a property, I get a strange MissingMethodException calling a
gettter, but if I use a property access, it runs ok. I succeeded in
reproducing the error in a more simple code, that goes below:
--------------------------------------------------------------------------
class A{
    def someMethod() { 'some method' }
}

class B extends A{
    private String reallyBigPropName = 'property'

    public String getReallyBigPropName() {
        reallyBigPropName
    }

    public void setReallyBigPropName(String reallyBigPropName) {
        this.reallyBigPropName = reallyBigPropName
    }
}


ExpandoMetaClass.enableGlobally()

A.metaClass.invokeMethod = {name, args -&gt;
    def method = A.metaClass.getMetaMethod(name, args)
    if(method){
        if(name == 'someMethod')
            return 'someMethod intercepted'
        return method.invoke(delegate, args)
    }
    throw new MissingMethodException(name, delegate.getClass()</description>
    <dc:creator>João Paulo Mafra</dc:creator>
    <dc:date>2008-10-01T13:30:15</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.groovy.user/36255">
    <title>[groovy-user] Evaluating expression defined in XML file...</title>
    <link>http://comments.gmane.org/gmane.comp.lang.groovy.user/36255</link>
    <description>Hi,

I have the following 'xml' file:

&lt;range&gt;
&lt;item stvalue="${x} &amp;lt; ${estimatedtime}" value='0'/&gt;
&lt;!-- and so on --&gt;
&lt;/range&gt;

And, this is my groovy program:

#!/usr/bin/env groovy
def xmlreader = new XmlParser().parse(new File('range.xml'))
def result = [:]
xmlreader.item.each {
   result[it.'&lt; at &gt;value'] = it.'&lt; at &gt;stvalue'
}
estimatedtime = 20
x = 35
result.each { key, value -&gt;
   println "|${value}| ${value.class.name}"
   println new GroovyShell().evaluate(value)
}

Then, run the script, and I got this:
|${x} &lt; ${estimatedtime}| java.lang.String
Caught: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed, Script1.groovy: 1: unexpected token: $ &lt; at &gt; line 1, column 1.
1 error

        at t$_run_closure2.doCall(t.groovy:11)
        at t.run(t.groovy:9)
        at t.main(t.groovy)

Some one knows what's wrong with the code above? 
Instead, the code below runs

#!/usr/bin/env groovy
estimated = 20
x = 35
expression = "${x} &lt; ${estimated}"
println new GroovyShell().evaluate(expression)

f</description>
    <dc:creator>John Sanabria</dc:creator>
    <dc:date>2008-10-01T13:03:46</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.groovy.user/36246">
    <title>[groovy-user] NetBeans:  abstract method setMetaClass(groovy.lang.MetaClass) in groovy.lang.GroovyObject</title>
    <link>http://comments.gmane.org/gmane.comp.lang.groovy.user/36246</link>
    <description>
Hello all,

I thought I would try out the NetBeans support for Groovy  in NetBeans 6.5
Beta.  The editor works wonderfully, but when I try to run code I get
strange errors:

Exception in thread "main" java.lang.ExceptionInInitializerError
at desktopapplication1.DesktopApplication1.main(DesktopApplication1.java:43)

Caused by: java.lang.RuntimeException: Uncompilable source code -
desktopapplication1.TestGroovy is not abstract and does not override
abstract method setMetaClass(groovy.lang.MetaClass) in
groovy.lang.GroovyObject
        at desktopapplication1.TestGroovy.&lt;clinit&gt;(TestGroovy.java:10)
        ... 1 more

Anyone know why this would be?  I was thinking it might be some kind of
conflict since I have 1.6 installed - but even launching it from a clean
environment doesn't seem to help.

Cheers!

Simon.
</description>
    <dc:creator>simonz</dc:creator>
    <dc:date>2008-10-01T04:47:18</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.groovy.user/36245">
    <title>[groovy-user] Creating Closures from string in Markup builders</title>
    <link>http://comments.gmane.org/gmane.comp.lang.groovy.user/36245</link>
    <description>I'm able to read content written in builder DSL from a file and generate xml
using StreamingMarkupBuilder.
However I'm unable to figure out the difference between two ways of creating
and passing closure to StreamingMarkupBuilder.bind().
One fails and other works. Delved into debugging using Intellij IDE but with
all the MOP going under the hood its not a trivial task to understand what
is going on.
Hopefully the MOP experts here can help me.

1. Closure using return  -
import groovy.xml.StreamingMarkupBuilder
def clsrStr = "return { root{ child{}} }"
def clsr = evaluate(clsrStr)
def xml = new StreamingMarkupBuilder().bind(clsr)
xml.toString()

This works with following o/p
&lt;root&gt;&lt;child&gt;&lt;/child&gt;&lt;/root&gt;

2.

def clsrStr = "{ -&gt; root{ child{}} }"
def clsr = evaluate(clsrStr)
def xml = new StreamingMarkupBuilder().bind(clsr)
xml.toString()

This fails with the following exception.groovy.lang.MissingMethodException:
No signature of method: Script1$_run_closure1.doCall() is applicable for
argument types:
(groovy.</description>
    <dc:creator>Kumar Pandey</dc:creator>
    <dc:date>2008-10-01T03:54:51</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.groovy.user/36228">
    <title>[groovy-user] GString not coerced to String closure argument</title>
    <link>http://comments.gmane.org/gmane.comp.lang.groovy.user/36228</link>
    <description>Hi,

I have noticed a couple of times now that if I have a closure like this:

  def c = { String arg1 -&gt;
      ...
  }

the closure is not called if I pass a GString:

  c("Value $i")

Is this behaviour intended? Should the GString be coerced to a String
for the closure? I've seen it with GrailsMock and a closure defined in
a Gant script.

Thanks,

Peter

</description>
    <dc:creator>Peter Ledbrook</dc:creator>
    <dc:date>2008-09-30T15:00:41</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.groovy.user/36220">
    <title>[groovy-user] shortcut to get a sublist (1..n)</title>
    <link>http://comments.gmane.org/gmane.comp.lang.groovy.user/36220</link>
    <description>
is there a shorcut to get a sublist, this list.size()-1 expression seems a
bit too verbose to me:

def list=[1,2,3]
assert [2,3] == list[1..list.size()-1]

thanks.



-----
manuel aldana
aldana((at))gmx.de
software-engineering blog: http://www.aldana-online.de
</description>
    <dc:creator>aldana</dc:creator>
    <dc:date>2008-09-30T13:02:56</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.groovy.user/36215">
    <title>[groovy-user] help with dynamic closure name/call</title>
    <link>http://comments.gmane.org/gmane.comp.lang.groovy.user/36215</link>
    <description>def cls = { f -&gt; println f }
cls("foo")
"cls"("foo")
def meth = "cls"
this.invokeMethod("cls", "foo")

cls("foo")and "cls"("foo") both work
calling invokeMethod (which is a guess on my part, calling "$meth"("foo") fails) gives:
Exception thrown: java.lang.ClassCastException: java.lang.String cannot be cast to [Ljava.lang.Object;
java.lang.ClassCastException: java.lang.String cannot be cast to [Ljava.lang.Object;
 at Script22.run(Script22:5)

Is there a way to call a closure when the name of the closure is held within a variable (the variable is being passed in from some other code)


________________________________
The information in this message is confidential and may be legally privileged. It is intended solely for the addressee. Access to this message by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, or distribution of the message, or any action or omission taken by you in reliance on it, is prohibited and may be unlawful. Please immediately contact the send</description>
    <dc:creator>Gary McWilliams</dc:creator>
    <dc:date>2008-09-30T11:04:35</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.groovy.user/36211">
    <title>[groovy-user] anonymous class in Groovy</title>
    <link>http://comments.gmane.org/gmane.comp.lang.groovy.user/36211</link>
    <description>Hi all,

I know it is not supported in groovy. So i need your help to translate my
java code below in groovy :)

class A {
    public void methodOne() {
        // some behaviours
    }

    public void methodTwo() {
        // some behaviours
    }
}


A obj1 = new A() { // anonymous subclass
    public void methodOne() {
        // modified behaviours
    }
};

A obj2 = new A() {
    public void methodTwo() {
        // some behaviours
    }
};

I usually use this technique in testing. But in groovy, i have to explicitly
define two subclasses which is more verbose. Do you know how to do it in
groovier way?


Thanks
</description>
    <dc:creator>tran duc trung</dc:creator>
    <dc:date>2008-09-30T10:19:35</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.groovy.user/36210">
    <title>[groovy-user] Re[groovy-user] gExp help</title>
    <link>http://comments.gmane.org/gmane.comp.lang.groovy.user/36210</link>
    <description>
Hi there,

I'm looking for a regular expression guru.

I want to check the following:

allowed
super.printStackTrace()

not allowed

sometext.printStackTrace()
printStackTrace() 

Can someone help? Thanks in advance...
Greets
</description>
    <dc:creator>A_Grails_User</dc:creator>
    <dc:date>2008-09-30T09:52:54</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.groovy.user/36209">
    <title>[groovy-user] Groovy defect free?</title>
    <link>http://comments.gmane.org/gmane.comp.lang.groovy.user/36209</link>
    <description>
Fortify has Groovy listed on https://opensource.fortify.com/ as "defect
free". It indicates that it is free from whatever security vulnerabilities
their tool checks for. I am not sure what that is but good to know I guess.
I am also unsure how old that list is.

They also have "Grails" listed as "Groovy for Rails".

Paul.

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

    http://xircles.codehaus.org/manage_email



</description>
    <dc:creator>Paul King</dc:creator>
    <dc:date>2008-09-30T08:29:39</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.groovy.user/36204">
    <title>[groovy-user] who have the experience using Checkstyle or PMD with groovy code?</title>
    <link>http://comments.gmane.org/gmane.comp.lang.groovy.user/36204</link>
    <description>
Dear all,


We expect to know these tools for static code analyze, such as PMD, Findbugs
and Checkstyle whether could compatible with grails/groovy ?

could someone share your experience,

best regard!

</description>
    <dc:creator>devonfgu</dc:creator>
    <dc:date>2008-09-29T14:26:22</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.groovy.user/36203">
    <title>[groovy-user] Closure does not have scope precedent over local method?</title>
    <link>http://comments.gmane.org/gmane.comp.lang.groovy.user/36203</link>
    <description>
Looking at this SSCCE, the local selectSql gets called rather than the
closure, when the closure should have scope preference. Is this a known
defect?

public class Tester {
   private String selectSql() {return 'local method'}

   public String returnSql(String id, Closure selectSql) {
        return """
            select
                ${selectSql()}
            from
                tester t
            where
                t.id = $id
            order $id
        """
    }
}

        Tester t = new Tester()
        t.returnSql('10') { 'date,name,value' }
</description>
    <dc:creator>Tom Corcoran</dc:creator>
    <dc:date>2008-09-29T14:21:47</dc:date>
  </item>
  <textinput 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>
