commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mben...@apache.org
Subject svn commit: r495022 - /jakarta/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/beans/BeanPropertyPointer.java
Date Wed, 10 Jan 2007 22:48:01 GMT
Author: mbenson
Date: Wed Jan 10 14:48:00 2007
New Revision: 495022

URL: http://svn.apache.org/viewvc?view=rev&rev=495022
Log:
avoid setting value if it is unchanged

Modified:
    jakarta/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/beans/BeanPropertyPointer.java

Modified: jakarta/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/beans/BeanPropertyPointer.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/beans/BeanPropertyPointer.java?view=diff&rev=495022&r1=495021&r2=495022
==============================================================================
--- jakarta/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/beans/BeanPropertyPointer.java
(original)
+++ jakarta/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/beans/BeanPropertyPointer.java
Wed Jan 10 14:48:00 2007
@@ -237,8 +237,11 @@
             setValue(null);
         }
         else if (isCollection()) {
+            Object o = getBaseValue();
             Object collection = ValueUtils.remove(getBaseValue(), index);
-            ValueUtils.setValue(getBean(), getPropertyDescriptor(), collection);
+            if (collection != o) {
+                ValueUtils.setValue(getBean(), getPropertyDescriptor(), collection);
+            }
         }
         else if (index == 0) {
             index = WHOLE_COLLECTION;



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