You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@chemistry.apache.org by fm...@apache.org on 2013/07/09 13:26:41 UTC

svn commit: r1501201 - in /chemistry/dotcmis/trunk/DotCMIS: binding/atompub/atompub.cs client/client-objects.cs

Author: fmui
Date: Tue Jul  9 11:26:41 2013
New Revision: 1501201

URL: http://svn.apache.org/r1501201
Log:
CMIS-690: multi-value null fix / deleteTree fix

Modified:
    chemistry/dotcmis/trunk/DotCMIS/binding/atompub/atompub.cs
    chemistry/dotcmis/trunk/DotCMIS/client/client-objects.cs

Modified: chemistry/dotcmis/trunk/DotCMIS/binding/atompub/atompub.cs
URL: http://svn.apache.org/viewvc/chemistry/dotcmis/trunk/DotCMIS/binding/atompub/atompub.cs?rev=1501201&r1=1501200&r2=1501201&view=diff
==============================================================================
--- chemistry/dotcmis/trunk/DotCMIS/binding/atompub/atompub.cs (original)
+++ chemistry/dotcmis/trunk/DotCMIS/binding/atompub/atompub.cs Tue Jul  9 11:26:41 2013
@@ -1950,12 +1950,14 @@ namespace DotCMIS.Binding.AtomPub
             bool? continueOnFailure, ExtensionsData extension)
         {
             // find the down link
-            String link = LoadLink(repositoryId, folderId, AtomPubConstants.RelDown, null);
+            string link = LoadLink(repositoryId, folderId, AtomPubConstants.RelDown, null);
+            string childrenLink = null;
 
             if (link != null)
             {
                 // found only a children link, but no descendants link
                 // -> try folder tree link
+                childrenLink = link;
                 link = null;
             }
             else
@@ -1977,6 +1979,11 @@ namespace DotCMIS.Binding.AtomPub
 
             if (link == null)
             {
+                link = childrenLink;
+            }
+
+            if (link == null)
+            {
                 ThrowLinkException(repositoryId, folderId, AtomPubConstants.RelDown, AtomPubConstants.MediatypeDescendants);
             }
 

Modified: chemistry/dotcmis/trunk/DotCMIS/client/client-objects.cs
URL: http://svn.apache.org/viewvc/chemistry/dotcmis/trunk/DotCMIS/client/client-objects.cs?rev=1501201&r1=1501200&r2=1501201&view=diff
==============================================================================
--- chemistry/dotcmis/trunk/DotCMIS/client/client-objects.cs (original)
+++ chemistry/dotcmis/trunk/DotCMIS/client/client-objects.cs Tue Jul  9 11:26:41 2013
@@ -1582,18 +1582,25 @@ namespace DotCMIS.Client.Impl
         {
             get
             {
-                StringBuilder result = new StringBuilder();
-                foreach (object value in Values)
+                if (Values == null)
                 {
-                    if (result.Length > 0)
+                    return "[]";
+                }
+                else
+                {
+                    StringBuilder result = new StringBuilder();
+                    foreach (object value in Values)
                     {
-                        result.Append(", ");
+                        if (result.Length > 0)
+                        {
+                            result.Append(", ");
+                        }
+
+                        result.Append(FormatValue(value));
                     }
 
-                    result.Append(FormatValue(value));
+                    return "[" + result.ToString() + "]";
                 }
-
-                return "[" + result.ToString() + "]";
             }
         }