public static String forceFilenameEndsWithExtension(
      final String filename, final String extension) {
    if (filename.toLowerCase().endsWith(("." + extension).toLowerCase())) {
      return filename;
    }

    return filename + "." + extension;
  }
BinDiff-specific file name and filesystem utility methods.
java/ui/src/main/java/com/google/security/zynamics/bindiff/utils/BinDiffFileUtils.java