boolean (final Set<FilePath> deletedFiles, final ContentRevision afterRevision, final Set<FilePath> replacedFiles) { FilePath file = afterRevision.getFile(); while(file != null) { if (deletedFiles.contains(file)) { return true; } file = file.getParentPath(); if (file != null && replacedFiles.contains(file)) { return true; } } return false; }