So, you're saying that you'd rather return a null Class object from
getClass() when you pass in a null?  I can do that, no problem, but
Class.forName() actually throws an NPE for that scenario.  Not that we
should try to mimic exactly what they did (otherwise we wouldn't have to
write this method), but we might want to be consistent.  I don't know.


-----Original Message-----
From: Stephen Colebourne [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 06, 2005 4:25 PM
To: Jakarta Commons Developers List
Subject: Re: [lang] enhanced version of Class.forName

James Carman wrote:
> Well, what does the [lang] "team" think about this approach (just letting
> Class.forName() throw the ClassNotFoundException)?  Does this work for you
> guys?  I have added a patch to issue 36512 which includes code to
implement
> it this way (my latest patch).  Are there any votes against this method
> being implemented this way?  If not, do you guys care if I go ahead and
> commit it (I'll wait a while for votes)?  Since I'm not a "normal" [lang]
> committer, I don't want to step on anyone's toes.

You are welcome to check it in, but you will need to add your name to 
the [lang] committers in project.xml. Other committers will then review 
it :-)

For reference, lang strives to avoid NPE, so typically I would want a 
null input to yield a null output.

Stephen

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to