>              if (length > 0) {
> -               connection.setRequestProperty(CONTENT_LENGTH, 
> String.valueOf(length));
> -               connection.setFixedLengthStreamingMode(length);
> +               connection.setRequestProperty(CONTENT_LENGTH, 
> length.toString());
> +               if (length <= Integer.MAX_VALUE) {
> +                  connection.setFixedLengthStreamingMode(length.intValue());
> +               } else {
> +                  setFixedLengthStreamingMode(connection, length);
> +               }

Actually, comment about this: could we not check here whether we are running on 
a 6 or 7 JDK? If we're on a 6 JDK, we _know_ the reflective call cannot 
succeed, so why try?

Or am I missing something here..?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/585/files#r19376498

Reply via email to