You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Fredrik Westermarck <fr...@mdh.se> on 2003/09/24 22:58:25 UTC
[lang] Removing code from deprecated NumberUtils
Hi!
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)
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
Re: [lang] Removing code from deprecated NumberUtils
Posted by Fredrik Westermarck <fr...@mdh.se>.
Hi!
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
methods.
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)
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
Re: [lang] Removing code from deprecated NumberUtils
Posted by Fredrik Westermarck <fr...@mdh.se>.
Hi!
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
methods.
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)
Re: [lang] Removing code from deprecated NumberUtils
Posted by Stephen Colebourne <sc...@btopenworld.com>.
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
----- Original Message -----
From: "__matthewHawthorne" <ma...@phreaker.net>
To: "Jakarta Commons Developers List" <co...@jakarta.apache.org>
Sent: Wednesday, September 24, 2003 10:24 PM
Subject: Re: [lang] Removing code from deprecated NumberUtils
> Since lang.NumberUtils is deprecated, I don't see a point in making any
> modifications to it.
>
>
>
>
> Fredrik Westermarck wrote:
>
> > Hi!
> >
> > 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)
>
>
>
> ---------------------------------------------------------------------
> 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
Re: [lang] Removing code from deprecated NumberUtils
Posted by Stephen Colebourne <sc...@btopenworld.com>.
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
----- Original Message -----
From: "__matthewHawthorne" <ma...@phreaker.net>
To: "Jakarta Commons Developers List" <co...@jakarta.apache.org>
Sent: Wednesday, September 24, 2003 10:24 PM
Subject: Re: [lang] Removing code from deprecated NumberUtils
> Since lang.NumberUtils is deprecated, I don't see a point in making any
> modifications to it.
>
>
>
>
> Fredrik Westermarck wrote:
>
> > Hi!
> >
> > 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)
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>
Re: [lang] Removing code from deprecated NumberUtils
Posted by __matthewHawthorne <ma...@phreaker.net>.
Since lang.NumberUtils is deprecated, I don't see a point in making any
modifications to it.
Fredrik Westermarck wrote:
> Hi!
>
> 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)
Re: [lang] Removing code from deprecated NumberUtils
Posted by __matthewHawthorne <ma...@phreaker.net>.
Since lang.NumberUtils is deprecated, I don't see a point in making any
modifications to it.
Fredrik Westermarck wrote:
> Hi!
>
> 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)
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org