commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pste...@apache.org
Subject cvs commit: jakarta-commons/math/src/java/org/apache/commons/math/stat/univariate AbstractUnivariateStatistic.java
Date Sun, 11 Apr 2004 19:39:10 GMT
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


Mime
View raw message