17 Jul 21:09
Re: [groovy-user] creating a new method inside invokeMethod
From: Graeme Rocher <graeme@...>
Subject: Re: [groovy-user] creating a new method inside invokeMethod
Newsgroups: gmane.comp.lang.groovy.user
Date: 2008-07-17 19:09:39 GMT
Subject: Re: [groovy-user] creating a new method inside invokeMethod
Newsgroups: gmane.comp.lang.groovy.user
Date: 2008-07-17 19:09:39 GMT
You can do for safety, the reason I said it was a bug is we do have one instance where that happens in GORM and that was as a result of a bug in Groovy which I raised and was fixed Cheers On Thu, Jul 17, 2008 at 6:54 PM, Rubee <charlestassoni@...> wrote: > > From the comments above, I gather that Jochen (aka "blackdrag") thinks > that the most I should have to synchronize is this: > > synchronized(this) { > Manager.metaClass."${name}" = { Object[] varArgs -> > return delegateTo.invokeMethod(name, *varArgs) > } > } > > and Graeme thinks I don't even need that. > > After Graeme's comment, I realized I should probably search the Grails > source for 'synchronized', since that's a great real-world example. I see a > few instances where Graeme or another Grails developer encloses method > creation inside a synchronized block. (The cases I saw were for adding > static methods, which, of course, may be a different beast.) So unless I > hear otherwise-- and please let me know if I can get away without this--I > think I'll go with the style shown above. > > > -- > View this message in context: http://www.nabble.com/creating-a-new-method-inside-invokeMethod-tp18508436p18514253.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 > > > -- -- Graeme Rocher Grails Project Lead G2One, Inc. Chief Technology Officer http://www.g2one.com --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
RSS Feed