commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Henri Yandell <>
Subject Re: Comments on Commons Lang 3.0-SNAPSHOT
Date Tue, 17 Nov 2009 07:48:45 GMT
On Mon, Nov 16, 2009 at 10:16 AM, Paul Benedict <> wrote:
> * I think org.apache.commons.lang.math should be refactored and removed:
>  * Fraction has nothing to do with this library and belongs in
> Commons Math. I see it so closely align to higher Math functions and
> not the JDK.

Dropping Fraction was discussed early on in 3.0, but consensus was for
the class to remain. It's simple enough and not been a maintenance

>  * IEEE754rUtils should move to the root package
>  * NumberUtils should move to the root package

Effectively, I think code on top of java.math is a fine fit for Lang,
whereas Commons Math is a wholly different bigger beastie.

> * System is missing IS_JAVA_1_7 constant

Fair enough.

> * Validate throws IAE on every failure -- including null arguments.
> Because NPE is not thrown, it will make this class less and less
> palatable in the future since that is the favored approach nowadays --
> and implemented by the JDK and Google. One solution is to expose a
> pluggable factory that can choose the type of exception to throw.

I count 137 throw IllegalArgumentException that say 'null' vs 45 throw
NullPointerExceptions.  So this is a package wide decision to discuss.
We used to have NullArgumentException having argued about it long ago,
we recently deleted that and rolled back to IllegalArgumentException.

> * Is there any benefit to making NumberUtils.min/max accept a variable
> arguments over a single array?

Seems good.

> * I think the division of EscapeUtils and UnescapeUtils is
> unnecessary. Do others think it's complex enough to make them separate
> classes? I imagine so, but just checking.

It felt like a lot for one class, but we're the package with a near
6000 line StringUtils class, so 130 line classes are piddly. One thing
I noticed is that I need to javadoc the Escape/UnescapeUtils classes.
I'm happy to merge them if an EscapeUtils is preferred. Or even to
kill EscapeUtils/UnescapeUtils and make StringEscapeUtils undeprecated
and the intended front door.


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

View raw message