From 381c83facf8947302f9e0f60d80f559dd6117b82 Mon Sep 17 00:00:00 2001 From: Jamal Kaabi-Mofrad Date: Tue, 10 May 2016 10:43:59 +0000 Subject: [PATCH] Merged FILE-FOLDER-API (5.2.0) to HEAD (5.2) 121204 gcornwell: Very minor formatting and test fixes spotted during verification of various stories. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@126400 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- source/java/org/alfresco/rest/api/impl/NodesImpl.java | 9 +++++---- .../org/alfresco/rest/api/tests/NodeApiTest.java | 3 ++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/source/java/org/alfresco/rest/api/impl/NodesImpl.java b/source/java/org/alfresco/rest/api/impl/NodesImpl.java index 9965176ef9..1e2a71ca1f 100644 --- a/source/java/org/alfresco/rest/api/impl/NodesImpl.java +++ b/source/java/org/alfresco/rest/api/impl/NodesImpl.java @@ -470,8 +470,8 @@ public class NodesImpl implements Nodes } } - private NodeRef getParentNodeRef(final NodeRef nodeRef) { - + private NodeRef getParentNodeRef(final NodeRef nodeRef) + { if (repositoryHelper.getCompanyHome().equals(nodeRef)) { return null; // note: does not make sense to return parent above C/H @@ -693,7 +693,7 @@ public class NodesImpl implements Nodes } String pathStr = null; - if(pathElements.size() > 0) + if (pathElements.size() > 0) { StringBuilder sb = new StringBuilder(120); for (PathInfo.ElementInfo e : pathElements) @@ -1585,7 +1585,8 @@ public class NodesImpl implements Nodes List result = new ArrayList<>(qnameStrList.size()); for (String str : qnameStrList) { - if (str.startsWith(PREFIX)) { + if (str.startsWith(PREFIX)) + { str = str.substring(PREFIX.length()); } diff --git a/source/test-java/org/alfresco/rest/api/tests/NodeApiTest.java b/source/test-java/org/alfresco/rest/api/tests/NodeApiTest.java index dbc4799ccd..3d8940b1b2 100644 --- a/source/test-java/org/alfresco/rest/api/tests/NodeApiTest.java +++ b/source/test-java/org/alfresco/rest/api/tests/NodeApiTest.java @@ -368,9 +368,10 @@ public class NodeApiTest extends AbstractBaseApiTest nodes = jacksonUtil.parseEntries(response.getJsonResponse(), Document.class); for (Node n : nodes) { - assertNotNull("There should be a 'properties' object in the response.", n.getIsLink()); // eg. cm:title, see above + assertNotNull("There should be a 'properties' object in the response.", n.getProperties()); // eg. cm:title, see above assertNotNull("There should be a 'isLink' object in the response.", n.getIsLink()); assertNotNull("There should be a 'path' object in the response.", n.getPath()); + assertNotNull("There should be a 'aspectNames' object in the response.", n.getAspectNames()); } // request specific property via select