Skip to content

Commit 9ba096b

Browse files
authored
bugfix: disabled checking for stream available length in large file upload #1621
** fix ** fix for LargFileUploadTask constructor
2 parents ebaec69 + 6f462be commit 9ba096b

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

.vscode/settings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
{
2-
"java.configuration.updateBuildConfiguration": "automatic"
2+
"java.configuration.updateBuildConfiguration": "automatic",
3+
"java.format.enabled": false
34
}

src/main/java/com/microsoft/graph/core/tasks/LargeFileUploadTask.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,6 @@ public LargeFileUploadTask(@Nullable final RequestAdapter requestAdapter,
8888
Objects.requireNonNull(uploadSession);
8989
Objects.requireNonNull(uploadStream);
9090
Objects.requireNonNull(factory);
91-
if(uploadStream.available() <=0) {
92-
throw new IllegalArgumentException("Must provide a stream that is not empty.");
93-
}
9491
this.uploadSession = extractSessionFromParsable(uploadSession);
9592
this.requestAdapter = Objects.isNull(requestAdapter) ? initializeAdapter(this.uploadSession.getUploadUrl()):requestAdapter;
9693
this.totalUploadLength = streamSize;

0 commit comments

Comments
 (0)