Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-8851

Fix trigger of event handlers without filters and not bound to a document

    XMLWordPrintable

    Details

      Description

              Object obj = ctx.getInput();
              DocumentModel doc = null;
              if (obj instanceof DocumentModel) {
                  doc = (DocumentModel) obj;
              }
              if (doctypes != null) {
                  if (doc == null
                          || (!doctypes.isEmpty() && !doctypes.contains(doc.getType()))) {
                      return false;
                  }
              }
      

      the problem is that doctypes is not null and empty. And because the event is not a document event, doc is null.

      if (doctypes != null || doctypes.size() > 0) {
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                stan Sun Tan
                Reporter:
                stan Sun Tan
                Participants:
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: