directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Emmanuel Lecharny" <elecha...@gmail.com>
Subject Re: Code cleaning + simple rules
Date Sun, 23 Dec 2007 18:06:38 GMT
> Checkstyle (I can't find, but it'd be anyway just about formatting)? Do you mean CPD (Copy/Paste
Detector) ;-)

Yeah, I don't exactly recall all the tools you are using ;) I usually
don't use those tools ;)


> > 4) We should have a toString() method for each class, or at least for
> > each data structure. This is helpful for debugging purpose
>
> In most cases you just want to show the values of your class fields. If so you may want
to have a look at commons-lang
> [1] and especially on its ToStringBuilder [2] function. It simplifies life really. Just
add
>
> public String toString() {
>    return ToStringBuilder.reflectionToString(this);
> }
>
> to your class and your done.

Thanks for the trick ! I gonna try (and it will save me a lot of time,
for sure ;)

-- 
Regards,
Cordialement,
Emmanuel L├ęcharny
www.iktek.com

Mime
View raw message