commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Carman" <>
Subject RE: [lang] enhanced version of Class.forName
Date Wed, 07 Sep 2005 00:29:08 GMT
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 [] 
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
> 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.


To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message