code: private CorruptFileBlocks versionBasedListCorruptFileBlocks(String path,
        String cookie) throws IOException {
      if (namenodeVersion < ClientProtocol.LIST_CORRUPT_FILEBLOCKS_VERSION) {
        LOG.info("NameNode version is " + namenodeVersion +
                 " Using older version of getCorruptFiles.");
        if (cookie != null ) {
          return new CorruptFileBlocks(new String[0], "");
        }
        ArrayList<String> str = new ArrayList<String>();
        for (FileStatus stat : namenode.getCorruptFiles()) {
          String filename = stat.getPath().toUri().getPath();
          if (filename.startsWith(path)) {
            str.add(filename);
          }
        }
        return new CorruptFileBlocks(str.toArray(new String[str.size()]), "");
      }
      return namenode.listCorruptFileBlocks(path, cookie);
    }
docs: Version based list corrupt file blocks