commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Henri Yandell <flame...@gmail.com>
Subject Re: [Lang 3] #isTrue()
Date Thu, 26 Nov 2009 09:28:41 GMT
+1 to removing the overloaded variants now that autoboxing is available.

Hen

On Tue, Nov 24, 2009 at 4:22 PM, Paul Benedict <pbenedict@apache.org> wrote:
> I understand why this method exists:
> public static void isTrue(boolean expression, String message, Object value)
>
> But why do these variants exist?
> public static void isTrue(boolean expression, String message, double value)
> public static void isTrue(boolean expression, String message, long value)
>
> Java 5 can autobox primitives so really only the Object variant should
> be needed. I understand this can instantiate objects just for the sake
> of validation, but then why doesn't int/char/byte/short variants exist
> too? What do we want here: all primitives or none? I lean towards all.
>
> Paul
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message