You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by mb...@apache.org on 2007/01/10 23:48:01 UTC
svn commit: r495022 -
/jakarta/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/beans/BeanPropertyPointer.java
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