[ https://issues.apache.org/jira/browse/CMIS-969?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Florian Müller resolved CMIS-969. --------------------------------- Resolution: Fixed Fix Version/s: OpenCMIS 0.14.0 Thanks for the report. It should be fixed now (on the client side). You can (and should) the Browser binding as well. Even if the bridge is talking AtomPub to the repository, the client can use the Browser binding to talk to the bridge. The Browser binding is faster. Also, avoid getPath calls in a loop. Each of them may make another call to the repository, which can be expensive. If possible, get the path of the parent folder and assemble the path manually. > OpenCmis Bridge : NPE with child.getPaths() > -------------------------------------------- > > Key: CMIS-969 > URL: https://issues.apache.org/jira/browse/CMIS-969 > Project: Chemistry > Issue Type: Bug > Components: opencmis-bridge > Affects Versions: OpenCMIS 0.13.0 > Environment: Client 0.13.0 / bridge 0.13.0 > Reporter: J.-M. Kubek > Assignee: Florian Müller > Priority: Minor > Fix For: OpenCMIS 0.14.0 > > > Hi, > The following code raises an NPA when using opencmls bridge with atompub > binding. The bridge is using the stock SimpleForwardingCmisService. > There is no problem when connecting directly to the target cmis service > (nuxeo 7.10). > public void BridgeNPE () { > > Folder rootFolder = directCmisSession.getRootFolder(); > Folder subFolder = FileUtils.createFolder(rootFolder, > "TestNPA", "cmis:folder"); > FileUtils.createTextDocument(subFolder.getId(), "test.txt", > "dummy content", "cmis:document", VersioningState.MAJOR, directCmisSession); > cmisSession.clear(); > > OperationContext opContext = > OperationContextUtils.createMaximumOperationContext(); > ItemIterable<CmisObject> childrenWithOpContext = > subFolder.getChildren(opContext); > for (CmisObject child: childrenWithOpContext) { > if (child instanceof Document){ > ((Document) child).getPaths(); > } > } > /* The same without opContext > ItemIterable<CmisObject> children = subFolder.getChildren(); > > for (CmisObject child: children) { > if (child instanceof Document){ > ((Document) child).getPaths(); > } > } > */ > } -- This message was sent by Atlassian JIRA (v6.3.4#6332)