You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wicket.apache.org by Eelco Hillenius <ee...@gmail.com> on 2007/09/22 03:13:57 UTC
Remove Classes#isPrimitive
Hi all,
I just came across Classes#isPrimitive. Method Class#isPrimitive
exists from JDK 1.1. Can we use this method instead (so I'm proposing
to remove the one in Classes). Or was there a particular problem this
implementation solves?
Eelco
Re: Remove Classes#isPrimitive
Posted by Eelco Hillenius <ee...@gmail.com>.
On 9/21/07, Igor Vaynberg <ig...@gmail.com> wrote:
> so remove it and paste its body wherever it is used.
Done.
Eelco
Re: Remove Classes#isPrimitive
Posted by Igor Vaynberg <ig...@gmail.com>.
so remove it and paste its body wherever it is used.
-igor
On 9/21/07, Eelco Hillenius <ee...@gmail.com> wrote:
>
> On 9/21/07, Igor Vaynberg <ig...@gmail.com> wrote:
> > have you looked at the code?
> >
> > Classes.isprimitive does not differentiate between int and Integer,
> while
> > Class.isprimitive() does
>
> I overlooked that, but frankly, the name is ill chosen (as you're
> *not* just testing whether the argument is a Java primitve) and the
> Javadoc doesn't state this either. And why not call it isFoo if you
> expect people to look at the implementation? I'd prefer this method to
> go from the API.
>
> Eelco
>
Re: Remove Classes#isPrimitive
Posted by Eelco Hillenius <ee...@gmail.com>.
On 9/21/07, Igor Vaynberg <ig...@gmail.com> wrote:
> have you looked at the code?
>
> Classes.isprimitive does not differentiate between int and Integer, while
> Class.isprimitive() does
I overlooked that, but frankly, the name is ill chosen (as you're
*not* just testing whether the argument is a Java primitve) and the
Javadoc doesn't state this either. And why not call it isFoo if you
expect people to look at the implementation? I'd prefer this method to
go from the API.
Eelco
Re: Remove Classes#isPrimitive
Posted by Igor Vaynberg <ig...@gmail.com>.
have you looked at the code?
Classes.isprimitive does not differentiate between int and Integer, while
Class.isprimitive() does
-igor
On 9/21/07, Eelco Hillenius <ee...@gmail.com> wrote:
>
> Hi all,
>
> I just came across Classes#isPrimitive. Method Class#isPrimitive
> exists from JDK 1.1. Can we use this method instead (so I'm proposing
> to remove the one in Classes). Or was there a particular problem this
> implementation solves?
>
> Eelco
>