You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by dm...@apache.org on 2002/08/10 03:44:30 UTC

cvs commit: jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/model/beans BeanPropertyPointer.java

dmitri      2002/08/09 18:44:30

  Modified:    jxpath/src/java/org/apache/commons/jxpath/ri/model/beans
                        BeanPropertyPointer.java
  Log:
  Fixed ArrayIndexOutOfBounds during createPath
  
  Revision  Changes    Path
  1.6       +8 -5      jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/model/beans/BeanPropertyPointer.java
  
  Index: BeanPropertyPointer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/model/beans/BeanPropertyPointer.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- BeanPropertyPointer.java	8 May 2002 23:05:05 -0000	1.5
  +++ BeanPropertyPointer.java	10 Aug 2002 01:44:30 -0000	1.6
  @@ -186,8 +186,11 @@
                   if (index == WHOLE_COLLECTION){
                       value = ValueUtils.getValue(getBean(), pd);
                   }
  -                else {
  +                else if (index >= 0 && index < getLength()){
                       value = ValueUtils.getValue(getBean(), pd, index);
  +                }
  +                else {
  +                    value = null;
                   }
               }
           }
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>