Uploaded image for project: 'Jackrabbit Content Repository'
  1. Jackrabbit Content Repository
  2. JCR-3434

EventJournal#skipTo() broken

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.2.12, 2.4.3, 2.5.2
    • 2.2.13, 2.4.4, 2.5.3
    • jackrabbit-core
    • None

    Description

      There is a little typo in the implementation of EventJournal#skipTo method which makes it pretty useless because it is skipping always to the last EventBundle. I attach the patch inlined because it is really small:

      Index: src/main/java/org/apache/jackrabbit/core/observation/EventJournalImpl.java
      ===================================================================
      — src/main/java/org/apache/jackrabbit/core/observation/EventJournalImpl.java (revision 1391154)
      +++ src/main/java/org/apache/jackrabbit/core/observation/EventJournalImpl.java (working copy)
      @@ -135,7 +135,7 @@
      // get skip map for this journal
      SortedMap<Long, Long> skipMap = getSkipMap();
      synchronized (skipMap) {

      • SortedMap<Long, Long> head = skipMap.headMap(new Long(time));
        + SortedMap<Long, Long> head = skipMap.headMap(new Long(date));
        if (!head.isEmpty()) {
        eventBundleBuffer.clear();
        lastRevision = head.get(head.lastKey());

      Attachments

        Activity

          People

            unico@apache.org Unico Hommes
            lmichele Lars Michele
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 5m
                5m
                Remaining:
                Remaining Estimate - 5m
                5m
                Logged:
                Time Spent - Not Specified
                Not Specified