Re: [Codenarc-user] implementing Cloneable
Brought to you by:
chrismair
From: Roshan D. <ros...@gm...> - 2011-07-04 14:09:57
|
I am on CN 0.9 Is that newer than 0.14 or older? :-) On Mon, Jul 4, 2011 at 7:38 PM, Hamlet DArcy <ham...@ca...> wrote: > When I do a "grails list-plugins" then I see this line: > > codenarc <0.14> -- CodeNarc plugin > > So it should be up to date and ready to install. > > > ----- Original Message ----- > > Great. Thanks. > > > > > > Waiting for this fixed CodeNarc to be available soon through its > > Grails plugin. > > > > > > On Mon, Jul 4, 2011 at 7:27 PM, Hamlet DArcy < ham...@ca... > > > wrote: > > > > > > Yes, I checked the behavior. It does not give a warning for your code > > other than "UnnecessaryOverridingMethod". That is the one and only > > warning produced. It does not look at the return type of clone(). > > > > > > > > > > > > ----- Original Message ----- > > > > > > On Mon, Jul 4, 2011 at 7:18 PM, Hamlet DArcy < > > > ham...@ca... > > > > wrote: > > > > > > > > > CodeNarc 0.14 does not give a warning for your code. It does > > > however > > > give this warning: > > > > > > line: 2 UnnecessaryOverridingMethod The method clone contains no > > > logic and can be safely deleted source: Dummy clone() > > > {super.clone()} > > > > > > > > > > > > No, no. This error is obvious and irrelevant to my question, that's > > > why I was trying to keep it out of the discussion :-) > > > > > > > > > I am getting "CloneableWithoutClone" and my code defines a > > > covariant > > > clone() like below: > > > > > > > > > class Dummy implements Cloneable { > > > Dummy clone() { > > > super.clone() > > > // some more stuff > > > } > > > } > > > > > > > > > Can anyone please check the behavior in case of co-variant clone()? > > > > > > -- > > > Roshan > > > Blog: http://roshandawrani.wordpress.com/ > > > Twitter: @roshandawrani > > > Skype: roshandawrani > > > > > > > > > > > |