Author: fmui
Date: Thu Aug 5 09:29:50 2010
New Revision: 982515
URL: http://svn.apache.org/viewvc?rev=982515&view=rev
Log:
fixed property update bug (empty lists are allowed and must not throw an
exception)
Modified:
incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/repository/PersistentObjectFactoryImpl.java
Modified:
incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/repository/PersistentObjectFactoryImpl.java
URL:
http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/repository/PersistentObjectFactoryImpl.java?rev=982515&r1=982514&r2=982515&view=diff
==============================================================================
---
incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/repository/PersistentObjectFactoryImpl.java
(original)
+++
incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/repository/PersistentObjectFactoryImpl.java
Thu Aug 5 09:29:50 2010
@@ -460,7 +460,7 @@ public class PersistentObjectFactoryImpl
// assemble property
PropertyData<?> propertyData = null;
- Object firstValue = (values == null ? null : values.get(0));
+ Object firstValue = (values == null || values.isEmpty() ? null :
values.get(0));
if (definition instanceof PropertyStringDefinition) {
if (firstValue == null) {