-
Type: Bug
-
Status: Resolved
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 5.6.0-HF18, 5.7.1
-
Component/s: Nuxeo Drive
When adapting a document through the DefaultFileSystemItemFactory, the following code might cause a NPE if the parent document cannot be adapted:
FileSystemItem parent = getFileSystemItemAdapterService().getFileSystemItem( parentDoc, true); // TODO: handle NPE on parent parentId = parent.getId();
Stack trace in this case:
Caused by: java.lang.NullPointerException at org.nuxeo.drive.adapter.impl.AbstractDocumentBackedFileSystemItem.<init>(AbstractDocumentBackedFileSystemItem.java:86) at org.nuxeo.drive.adapter.impl.DocumentBackedFileItem.<init>(DocumentBackedFileItem.java:55) at org.nuxeo.drive.service.impl.DefaultFileSystemItemFactory.adaptDocument(DefaultFileSystemItemFactory.java:158)