commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephen Colebourne" <scolebou...@btopenworld.com>
Subject Re: [uid] Uuid
Date Sun, 04 Jan 2004 16:50:59 GMT
From: "Phil Steitz" <phil@steitz.com>
> What we should try to do is to decide on a set of checks that we are
> comfortable with and modify checkstyle.xml accordingly.  This project is
> new, so now is a good time to discuss this kind of thing (hopefully
> without getting too bogged down).
>
> I would not be opposed to removing the "magic numbers" check if others
> don't like it.
I would tend towards removing magic number check

> > Also to avoid "Definition of equals with corresponding definition of
> > hashCode" warning I've added: --------
> >
> > /** @see java.lang.Object#hashCode() */
> >  public int hashCode() {
> >     return super.hashCode();
> >  }
> I need more info to understand what is going on here.
Whenever equals is overridden, hashCode must be too. Read the javadoc in
equals and hashCode on Object for more info, or buy Joshua Bloch's Effective
Java.

> > Third, based on some previous discussions on this list, I think Sun
> > convention is to use the UUID naming instead of Uuid. Should these be
> > renamed?
>
> That is a good question.  The fact is that Sun (and everyone else) is
> inconsistent on this.  I am +1 for renaming, but interested in others'
> opinions.
I personally favour the upper case names. [lang] chose mixed case, so who
knows what you choose...

Stephen


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message