commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fredrik Westermarck <>
Subject Re: [lang] Removing code from deprecated NumberUtils
Date Thu, 25 Sep 2003 06:36:25 GMT

Yes, the methods behave exaclty the same.

However if the new methods change later on and before the deprecated 
class is removed, that could mean that we would have to bring back the 
old implementation in the deprecated class from the CVS. Keeping track 
of when that occurs could also be difficult.

I guess thats one of the reasons (and a good one too) not to change the 

Stephen Colebourne wrote:
> We can't delete it yet, so the general approach has been to leave alone so
> that we guarantee it still works the way it used to.
> However, if you are certain that these methods do exactly the same, then a
> forwarding implementation would be OK.
> Stephen
>>Since lang.NumberUtils is deprecated, I don't see a point in making any
>>modifications to it.
>>Fredrik Westermarck wrote:
>>>How about removing tha code in o.a.c.lang.NumberUtils and dispatching
>>>calls to the corresponding method in o.a.c.lang.math.NumberUtils
> instead?
>>>Maybe not all methods can be changed this way since nullhandling and
>>>throwing of exceptions may have changed.
>>>After having a quick look it seems as the following methods in in
>>>o.a.c.lang.NumberUtils could be changed this way:
>>>- stringToInt(String)/stringToInt(String, int)
>>>- isAllZeros(String)
>>>- minimum(long, long, long)/minimum(int, int, int)
>>>- maximum(long, long, long)/maximum(int, int, int)
>>>- compare(double, double)/compare(float, float)
>>>- isDigits(String)
>>>- isNumber(String)

View raw message