chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r1185883 - /chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryObjectServiceImpl.java
Date Tue, 18 Oct 2011 21:39:32 GMT
Author: jens
Date: Tue Oct 18 21:39:31 2011
New Revision: 1185883

URL: http://svn.apache.org/viewvc?rev=1185883&view=rev
Log:
fix an NPE in createDocumentFromSource

Modified:
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryObjectServiceImpl.java

Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryObjectServiceImpl.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryObjectServiceImpl.java?rev=1185883&r1=1185882&r2=1185883&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryObjectServiceImpl.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/server/InMemoryObjectServiceImpl.java
Tue Oct 18 21:39:31 2011
@@ -133,10 +133,12 @@ public class InMemoryObjectServiceImpl e
         for (PropertyData<?> prop : existingProps.getProperties().values()) {
             newPD.addProperty(prop);
         }
-        // overwrite all new properties
-        for (PropertyData<?> prop : properties.getProperties().values()) {
-            newPD.addProperty(prop);
-        }
+        
+        if (null != properties)
+            // overwrite all new properties
+            for (PropertyData<?> prop : properties.getProperties().values()) {
+                newPD.addProperty(prop);
+            }
 
         String res = createDocument(context, repositoryId, newPD, folderId, content, versioningState,
policies,
                 addAces, removeAces, null);



Mime
View raw message