Uploaded image for project: '[Read Only] - Hippo Repository'
  1. [Read Only] - Hippo Repository
  2. REPO-2128

BranchHandleImpl#isModified can incorrectly indicate that a document is not modified

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • None
    • 5.6.0, 12.6.0
    • None
    • None

    Description

      Currently, the code is as follows:

          private boolean isModified(final DocumentVariant unpublished, final DocumentVariant published) {
              try {
                  return unpublished.getLastModified().after(published.getLastModified());
              } catch (RepositoryException e) {
                  log.error("Cannot determine if document {} is modified, returning false", unpublished.getIdentity(), e);
                  return false;
              }
          }
      

      This means that if you restore a document from version history with a last modified timestamp that is before the published timestamp, the isModified returns false and IIRC, the document cannot be published. AFAICS, isModified should check for last modified inequality, not before/after logic

      Attachments

        Activity

          People

            Unassigned Unassigned
            aschrijvers Ard Schrijvers
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: