chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dcaru...@apache.org
Subject svn commit: r920861 - /incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/main/java/org/apache/opencmis/client/runtime/PersistentFolderImpl.java
Date Tue, 09 Mar 2010 13:25:55 GMT
Author: dcaruana
Date: Tue Mar  9 13:25:54 2010
New Revision: 920861

URL: http://svn.apache.org/viewvc?rev=920861&view=rev
Log:
Fix NPE when retrieving empty list of folder children via OpenCMIS folder.getChildren()

Modified:
    incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/main/java/org/apache/opencmis/client/runtime/PersistentFolderImpl.java

Modified: incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/main/java/org/apache/opencmis/client/runtime/PersistentFolderImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/main/java/org/apache/opencmis/client/runtime/PersistentFolderImpl.java?rev=920861&r1=920860&r2=920861&view=diff
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/main/java/org/apache/opencmis/client/runtime/PersistentFolderImpl.java
(original)
+++ incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/main/java/org/apache/opencmis/client/runtime/PersistentFolderImpl.java
Tue Mar  9 13:25:54 2010
@@ -240,9 +240,12 @@ public class PersistentFolderImpl extend
 
         // convert objects
         List<CmisObject> page = new ArrayList<CmisObject>();
-        for (ObjectInFolderData objectData : children.getObjects()) {
-          if (objectData.getObject() != null) {
-            page.add(objectFactory.convertObject(objectData.getObject(), ctxt));
+        List<ObjectInFolderData> childObjects = children.getObjects();
+        if (childObjects != null) {
+          for (ObjectInFolderData objectData : childObjects) {
+            if (objectData.getObject() != null) {
+              page.add(objectFactory.convertObject(objectData.getObject(), ctxt));
+            }
           }
         }
 



Mime
View raw message