You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Henri Yandell <ba...@generationjava.com> on 2002/10/29 20:54:09 UTC
[lang] Lang Bugs
Howard Lewis Ship has a bugzilla report pointing out that Enum has a
couple of quirks.
1) You can pass null as the name of an Enum.
2) You can define two different Enums with the same name (and class).
The first seems like a bad thing to me. Does the second matter?
Class obviously should be allowed to be the same, should name be unique?
Hen
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: [lang] Lang Bugs
Posted by Steve Downey <st...@netfolio.com>.
On Tuesday 29 October 2002 02:54 pm, Henri Yandell wrote:
> Howard Lewis Ship has a bugzilla report pointing out that Enum has a
> couple of quirks.
>
> 1) You can pass null as the name of an Enum.
> 2) You can define two different Enums with the same name (and class).
>
> The first seems like a bad thing to me. Does the second matter?
> Class obviously should be allowed to be the same, should name be unique?
>
> Hen
Actually, the second seems a lot worse than the first. Null is at least
distinguishable. And it maps well to some uses in databases. A nullable
foreign key to a reference table.
But I can't see a good use for naming two different Enums with the same name.
--
-SMD
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: [lang] Lang Bugs
Posted by Stephen Colebourne <sc...@btopenworld.com>.
I have fixed #2 that was raised. But can't reproduce #1 (although I've now
added tests for it).
Howard, can you detail the problem more fully? I haven't closed the bugzilla
report yet.
Stephen
----- Original Message -----
From: "Henri Yandell" <ba...@generationjava.com>
> Howard Lewis Ship has a bugzilla report pointing out that Enum has a
> couple of quirks.
>
> 1) You can pass null as the name of an Enum.
> 2) You can define two different Enums with the same name (and class).
>
> The first seems like a bad thing to me. Does the second matter?
> Class obviously should be allowed to be the same, should name be unique?
>
> Hen
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>