private static void applyBinaryChange(@NotNull Change change) throws IOException, VcsException {
    if (change.getAfterRevision() == null) {
      FilePath path = Objects.requireNonNull(change.getBeforeRevision()).getFile();
      VirtualFile file = LocalFileSystem.getInstance().refreshAndFindFileByPath(path.getPath());
      if (file == null) {
        throw new VcsException(message("error.can.not.delete.file", path.getPath()), true);
      }
      file.delete(TreeConflictRefreshablePanel.class);
    }
    else {
      FilePath file = change.getAfterRevision().getFile();
      String parentPath = Objects.requireNonNull(file.getParentPath()).getPath();
      VirtualFile parentFile = VfsUtil.createDirectoryIfMissing(parentPath);
      if (parentFile == null) {
        throw new VcsException(message("error.can.not.create.directory", parentPath), true);
      }
      VirtualFile child = parentFile.createChildData(TreeConflictRefreshablePanel.class, file.getName());
      byte[] content = ((BinaryContentRevision)change.getAfterRevision()).getBinaryContent();
      // actually it was the fix for IDEA-91572 Error saving merged data: Argument 0 for @NotNull parameter of > com/intellij/
      if (content == null) {
        throw new VcsException(message("error.can.not.load.theirs.content.for.file", file.getPath()), true);
      }
      child.setBinaryContent(content);
    }
  }
private static void applyBinaryChange(@NotNull Change change)