Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-5927

NoSuchElementException in MgnlAuditLoggingContentDecorator

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Neutral Neutral
    • 4.5.23, 5.3.5
    • 4.5.18
    • None

      We're currently seeing the following exception:

      java.util.NoSuchElementException
      	at java.util.LinkedList.getLast(LinkedList.java:255)
      	at info.magnolia.audit.MgnlAuditLoggingContentDecorator.logActionDelete(MgnlAuditLoggingContentDecorator.java:211)
      	at info.magnolia.audit.MgnlAuditLoggingContentDecoratorNodeWrapper.remove(MgnlAuditLoggingContentDecoratorNodeWrapper.java:94)
      

      By looking at the code in MgnlAuditLoggingContentDecorator.java:211 it seems that this is bound to happen when a deletion is the first entry to be logged for a given path.

      The fix would be to surround lines 211-222 with

      if (!pathEntries.isEmpty()) {
      [..]
      }
      

        Acceptance criteria

              mdivilek Milan Divilek
              jfrantzius Joerg von Frantzius
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Bug DoR
                  Task DoD