code: public static Long sum(Iterable<Integer> values) {
      long ret = 0;
      for (final int x : values) {
        ret += x;
      }
      return ret;
    }
docs: Note: this does not warn about overflow beyond the range of a long.