commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dmi...@apache.org
Subject cvs commit: jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/model/dynabeans DynaBeanPropertyPointer.java
Date Thu, 26 Jun 2003 02:17:59 GMT
dmitri      2003/06/25 19:17:59

  Modified:    jxpath/src/java/org/apache/commons/jxpath/ri/model/beans
                        PropertyPointer.java
               jxpath/src/java/org/apache/commons/jxpath/ri/model/dynabeans
                        DynaBeanPropertyPointer.java
  Log:
  Fixed index reset problem
  
  Revision  Changes    Path
  1.10      +8 -6      jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/model/beans/PropertyPointer.java
  
  Index: PropertyPointer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/model/beans/PropertyPointer.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- PropertyPointer.java	11 Mar 2003 00:59:25 -0000	1.9
  +++ PropertyPointer.java	26 Jun 2003 02:17:59 -0000	1.10
  @@ -95,8 +95,10 @@
       }
   
       public void setPropertyIndex(int index) {
  -        propertyIndex = index;
  -        index = WHOLE_COLLECTION;
  +        if (propertyIndex != index) {
  +            propertyIndex = index;
  +            setIndex(WHOLE_COLLECTION);
  +        }
       }
   
       public Object getBean() {
  
  
  
  1.9       +6 -5      jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/model/dynabeans/DynaBeanPropertyPointer.java
  
  Index: DynaBeanPropertyPointer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jxpath/src/java/org/apache/commons/jxpath/ri/model/dynabeans/DynaBeanPropertyPointer.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- DynaBeanPropertyPointer.java	17 Jun 2003 01:37:59 -0000	1.8
  +++ DynaBeanPropertyPointer.java	26 Jun 2003 02:17:59 -0000	1.9
  @@ -166,7 +166,8 @@
               String names[] = getPropertyNames();
               for (int i = 0; i < names.length; i++) {
                   if (names[i].equals(name)) {
  -                    setPropertyIndex(i);
  +                    propertyIndex = i;
  +                    name = null;
                       break;
                   }
               }
  
  
  

---------------------------------------------------------------------
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