You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by ps...@apache.org on 2004/04/11 21:39:10 UTC
cvs commit: jakarta-commons/math/src/java/org/apache/commons/math/stat/univariate AbstractUnivariateStatistic.java
psteitz 2004/04/11 12:39:10
Modified: math/src/java/org/apache/commons/math/stat/univariate
AbstractUnivariateStatistic.java
Log:
Improved verification logic in test().
Revision Changes Path
1.14 +4 -4 jakarta-commons/math/src/java/org/apache/commons/math/stat/univariate/AbstractUnivariateStatistic.java
Index: AbstractUnivariateStatistic.java
===================================================================
RCS file: /home/cvs/jakarta-commons/math/src/java/org/apache/commons/math/stat/univariate/AbstractUnivariateStatistic.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- AbstractUnivariateStatistic.java 4 Mar 2004 04:25:09 -0000 1.13
+++ AbstractUnivariateStatistic.java 11 Apr 2004 19:39:10 -0000 1.14
@@ -56,8 +56,8 @@
final int begin,
final int length) {
- if (length > values.length) {
- throw new IllegalArgumentException("length > values.length");
+ if (begin < 0) {
+ throw new IllegalArgumentException("start position cannot be negative");
}
if (begin + length > values.length) {
@@ -69,7 +69,7 @@
throw new IllegalArgumentException("input value array is null");
}
- if (values.length == 0 || length == 0) {
+ if (length == 0) {
return false;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org