The MATH code base currently generates hundreds of boxing warnings. Many, if not most, are perfectly OK. For example, conversion of int and long to Number when throwing various Exceptions.
However, buried amongst the valid uses there may well be some code that is buggy - e.g. it uses Long when it could use the primitive and avoid the conversion overhead. Or there is an unboxing conversion that fails to check if the field is null. At present, there are just too many warnings for them to be any use. It occurs to me that it would be easy to add overloaded methods for the Exceptions, for example NumberIsTooLargeException(Number, Number, boolean) could have the following overloads: NumberIsTooLargeException(int, int, boolean) NumberIsTooLargeException(long, long, boolean) NumberIsTooLargeException(float, float, boolean) NumberIsTooLargeException(double, double, boolean) The int and float versions could probably be omitted without losing essential information. Thoughts? --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org