diff --git a/core/src/main/java/org/jclouds/http/internal/JavaUrlHttpCommandExecutorService.java b/core/src/main/java/org/jclouds/http/internal/JavaUrlHttpCommandExecutorService.java index acc20416d2..fac7c55f1d 100644 --- a/core/src/main/java/org/jclouds/http/internal/JavaUrlHttpCommandExecutorService.java +++ b/core/src/main/java/org/jclouds/http/internal/JavaUrlHttpCommandExecutorService.java @@ -209,9 +209,11 @@ public class JavaUrlHttpCommandExecutorService extends BaseHttpCommandExecutorSe writePayloadToConnection(payload, "streaming", connection); } else { Long length = checkNotNull(md.getContentLength(), "payload.getContentLength"); - // http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6755625 - checkArgument(length < Integer.MAX_VALUE, - "JDK 1.6 does not support >2GB chunks. Use chunked encoding, if possible."); + // TODO: remove check after moving to JDK 7. + checkArgument(length <= Integer.MAX_VALUE, + "Cannot transfer 2 GB or larger chunks due to JDK 1.6 limitations." + + " Use chunked encoding or multi-part upload, if possible." + + " For more information: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6755625"); if (length > 0) { connection.setRequestProperty(CONTENT_LENGTH, length.toString()); connection.setFixedLengthStreamingMode(length.intValue());