[
http://jira.nuxeo.org/browse/NXP-2044?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Stéfane Fermigier updated NXP-2044:
-----------------------------------
Fix Version/s: (was: 5.2 M2)
5.2 M3
> Improve the FileManageActionsBean
> ---------------------------------
>
> Key: NXP-2044
> URL: http://jira.nuxeo.org/browse/NXP-2044
> Project: Nuxeo Enterprise Platform
> Issue Type: Improvement
> Affects Versions: 5.1.3
> Reporter: Radu Darlea
> Assignee: Thierry Martins
> Fix For: 5.1.6, 5.2 M3
>
> Original Estimate: 4 hours
> Remaining Estimate: 4 hours
>
> Currently, when a file is uploaded, the FileManageActionsBean:
> - calls createDocumentFromBlob() with the flag overwrite always true
> - it doesn't always check the returned value (in the case of null returned
> there are cases in which should appear a NPE)
> - it doesn't properly check all the cases of failures. For instance, if the
> overwrite wouldn't be required, the case of couldn't update the document
> because already exists falls in the situation "wrong_document_type"
> Moreover, the logic in default implementation (defaultCreate() in
> FileManagerService) is somehow wrong: there are only 2 branches
> if (overwrite && docModel != null) {
> }else{
> }
> so the case: "do not overwrite and the document existing" is falling in the
> second case, and a "new" document is created.
> This fix could be dangerous, having impacts in other plugins, because until
> now they were never been called with flag overwrite on false.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.nuxeo.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
_______________________________________________
ECM-tickets mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm-tickets