Uploaded image for project: 'CMS'
  1. CMS
  2. CMS-5445

Useless code on ContentWorkflowAction

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 3.5.5, 3.7, 3.9
    • None
    • None

    Description

      When you fix CMS-4082, you have removed the setCurrentStepId call, but you have not removed the addLockToken call. Then this block is useless:

       try
              {
                  Node node = content.getNode();
                  if (node.isLocked())
                  {
                      LockManager lockManager = node.getSession().getWorkspace().getLockManager();
                      Lock lock = lockManager.getLock(node.getPath());
                      Node lockHolder = lock.getNode();
                  
                      lockManager.addLockToken(lockHolder.getProperty(RepositoryConstants.METADATA_LOCKTOKEN).getString());
                  }
              }
              catch (RepositoryException e)
              {
                  throw new WorkflowException("Unable to set metadata 'currentStepId' on content " + content.getId(), e);
              }
      

      Attachments

        Activity

          People

            trizzi Thibaut Rizzi (Inactive)
            ogehin Olivier Gehin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: