> > public PolynomialFunction(double c[]) { > > super(); > > if (c.length < 1) { > > - throw > > MathRuntimeException.createIllegalArgumentException(LocalizedFormats.EMPTY_POLYNOMIALS_COEFFICIENTS_ARRAY); > > + throw new > > NotStrictlyPositiveException(LocalizedFormats.EMPTY_POLYNOMIALS_COEFFICIENTS_ARRAY, > > + c.length); > > } > > Seems very odd to me to reject an empty array parameter with > "NotStrictlyPositiveException".
It just means that a 0 length is not allowed. > I would expect that to be reserved for numeric data passed as a > parameter or as an array entry. > > IllegalArgument seems much clearer to me; "NotStrictlyPositiveException" is a subclass of "IllegalArgumentException". > alternatively one could > perhaps create an EmptyArrayNotAllowedException, if this is a common > requirement. Could be too. Gilles --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org