[ANN] Announcing CodeNarc 0.26.0

2016-10-25 Thread Chris Mair
The *CodeNarc Team *is proud to announce the release of version *0.26.0*. CodeNarc is a static analysis tool for Groovy source code. Version *0.26.0* includes several enhancements and bug fixes. See the full details in the release notes

Re: @Delegate and Date

2016-10-25 Thread Jochen Theodorou
On 26.10.2016 00:08, o...@ocs.cz wrote: [...] And just to interject the question the OP is probably going to ask: Why should it matter whether it's an "extension" or not? Is it documented that the methods available on a Delegate exclude what Groovy has added to the class? Jochen or someone oth

Re: @Delegate and Date

2016-10-25 Thread o...@ocs.cz
Hello there, > On 25. 10. 2016, at 11:40 PM, David Karr wrote: > On Tue, Oct 25, 2016 at 1:34 PM, Dinko Srkoč wrote: >> On 25 October 2016 at 16:02, VG wrote: >>> why this does not work? >>> >>> class Example { >>>@Delegate Date when >>> } >>> >>> def x = new Example(when: new Date()) >>>

Re: @Delegate and Date

2016-10-25 Thread David Karr
On Tue, Oct 25, 2016 at 1:34 PM, Dinko Srkoč wrote: > On 25 October 2016 at 16:02, VG wrote: >> Hi there, >> >> why this does not work? >> >> class Example { >> @Delegate Date when >> } >> >> def x = new Example(when: new Date()) >> x.next() // fails >> >> I checked >> http://docs.groovy-lan

Re: 2.5 JsonBuilder Converters thoughts

2016-10-25 Thread John Wagenleitner
On Tue, Oct 25, 2016 at 12:07 PM, James Kleeh wrote: > Currently if one were to register a converter with options like so: > > JsonGenerator.Options options = new JsonGenerator.Options() > options.addConverter(MyCustomType) { MyCustomType mct -> > mct.name > } > > > Assuming “mct.name” return

Re: @Delegate and Date

2016-10-25 Thread Dinko Srkoč
On 25 October 2016 at 16:02, VG wrote: > Hi there, > > why this does not work? > > class Example { > @Delegate Date when > } > > def x = new Example(when: new Date()) > x.next() // fails > > I checked > http://docs.groovy-lang.org/latest/html/groovy-jdk/java/util/Date.html and > the next meth

2.5 JsonBuilder Converters thoughts

2016-10-25 Thread James Kleeh
Currently if one were to register a converter with options like so: JsonGenerator.Options options = new JsonGenerator.Options() options.addConverter(MyCustomType) { MyCustomType mct -> mct.name } Assuming “mct.name” returns a string, it will be output without quotes because of: Convert

@Delegate and Date

2016-10-25 Thread VG
Hi there, why this does not work? class Example { @Delegate Date when } def x = new Example(when: new Date()) x.next() // fails I checked http://docs.groovy-lang.org/latest/html/groovy-jdk/java/util/Date.html and the next method is available there? Should not the method next be available t