Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-11645

FilesystemAttachmentRecycleBinStore.getAllDeletedAttachments does not allow null attachment argument

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 6.3, 7.1
    • Fix Version/s: None
    • Component/s: Storage - File System
    • Labels:
    • Difficulty:
      Unknown
    • Similar issues:

      Description

      The javadoc for com.xpn.xwiki.store.AttachmentRecycleBinStore says:

           * @param attachment Optional attachment template. If <code>null</code>, return information about all deleted
           *            attachments from the database. Otherwise, filter by the document and filename provided in the passed
           *            attachment.
      

      however the org.xwiki.store.legacy.store.internal.FilesystemAttachmentRecycleBinStore who implements that interface does not support passing in "null" as attachment argument; instead it throws n NPE.

      This causes ADMINTOOL-12 (the second half) ... not sure if this should be fixed in the FilesystemAttachmentRecycleBinStore, or instead the javadoc should be updated (it seems loading 'DeletedAttachment' via HQL is the preferred solution to query for attachments anyway ?)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                tmortagne Thomas Mortagne
                Reporter:
                camil7 Clemens Robbenhaar
              • Votes:
                1 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Date of First Response: