private static String getCachedFileName(UpdateAction action, File newerDir) {
    if (action.isMove()) return null;
    if (!Digester.isFile(action.getChecksum())) return null;
    // Single file diff is a zip file with single entry corresponding to target file name, so entry name should be part of caching key
    // Also both source and target digests are part of key
    try {
      return "diff-v1-" +
             action.getPath().replaceAll("[^A-Za-z0-9_\\-]","_") +
             '-' +
             Long.toHexString(action.getChecksum()) +
             '-' +
             Long.toHexString(Digester.digestRegularFile(action.getFile(newerDir)));
    }
    catch (IOException ignored) {
      return null;
    }
  }
private static String getCachedFileName(UpdateAction action, File newerDir)