CMIS-690: multi-value null fix / deleteTree fix
git-svn-id: https://svn.apache.org/repos/asf/chemistry/dotcmis/trunk@1501201 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/DotCMIS/binding/atompub/atompub.cs b/DotCMIS/binding/atompub/atompub.cs
index 435a117..7a96d5e 100644
--- a/DotCMIS/binding/atompub/atompub.cs
+++ b/DotCMIS/binding/atompub/atompub.cs
@@ -1950,12 +1950,14 @@
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 @@
if (link == null)
{
+ link = childrenLink;
+ }
+
+ if (link == null)
+ {
ThrowLinkException(repositoryId, folderId, AtomPubConstants.RelDown, AtomPubConstants.MediatypeDescendants);
}
diff --git a/DotCMIS/client/client-objects.cs b/DotCMIS/client/client-objects.cs
index eeb4152..bc1e468 100644
--- a/DotCMIS/client/client-objects.cs
+++ b/DotCMIS/client/client-objects.cs
@@ -1582,18 +1582,25 @@
{
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() + "]";
}
}