jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Felix Meschberger <Felix.Meschber...@day.com>
Subject Re: Checkstyle improvements
Date Wed, 27 Apr 2005 18:52:34 GMT

Just a small clarification...

Stefan Guggisberg schrieb:

>regarding missing hashCode(): i intentionally do never override hashCode()
>for mutable objects. hashCode() should imo only be implemented for 
>immutable objects. 
Unfortunately this is not in line with the general contract of the 
hashCode and equals methods, which says - amongst other things - that 
for two objects being equal according to equals the hashCode must be the 
same. If you do not overwrite the hashCode method whenever you overwrite 
the equals method, you will get into troubles. Josh Bloch has written a 
nice text on this issue in his famous book.

>i suggest to disable the related Checkstyle check.
Therefore I strongly oppose to removing that check.

>in general: i think that checkstyle is a good tool that helps to improve the 
>quality and consistency of the code base. but we should use common 
>sense when interpreting the recommendations. blindly following all the 
>recommendations or or trying to achieve 0 reported issues is imo not 

View raw message