commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephen Colebourne" <scolebou...@btopenworld.com>
Subject Re: [lang] ArrayUtils.lastIndex
Date Sat, 09 Oct 2004 21:21:25 GMT
My opinion is that assigning constants for these kinds of things bloats the
source and byte code to no gain. But we already seem to have gone down this
route in other classes, so consider it a -0.

Stephen

----- Original Message -----
From: "Gary Gregory" <ggregory@seagullsoftware.com>
Speaking of "-1"s. I wonder if we should create a constant for the "-1
means NOT_FOUND" concept. This value is hard coded all over the place in
ArrayUtils. It seems to me like it would make the code more readable.

Gary

> -----Original Message-----
> From: Stephen Colebourne [mailto:scolebourne@btopenworld.com]
> Sent: Saturday, October 09, 2004 04:27
> To: Jakarta Commons Developers List
> Subject: [lang] ArrayUtils.lastIndex
>
> ArrayUtils.lastIndex
> This method is effectively:
>   array.length - 1
> with null checks
>
> This method was added in the 1.41 version of ArrayUtils. I want to
remove
> it, as it really doesn't seem to add any value over and above
getLength().
> The original bug request didn't ask for it either:
> http://issues.apache.org/bugzilla/show_bug.cgi?id=26594
>
> I intend to remove the method unless I hear objections.
>
> Stephen
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org


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



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


Mime
View raw message