Skip to content

Commit ae86227

Browse files
committed
Revert "** fix ** fix for LargeFileTaskUpload constructor"
This reverts commit d76e8e0.
1 parent d76e8e0 commit ae86227

File tree

3 files changed

+7
-11
lines changed

3 files changed

+7
-11
lines changed

CHANGELOG.md

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,6 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8-
## [3.1.11] - 2024-05-12
9-
10-
### Fixed
11-
12-
- Fixes a bug where a `LargeFileTaskUpload` cannot be constructed if `InputStream.available()` returns 0 [#1621](https://github.com/microsoftgraph/msgraph-sdk-java-core/issues/1621)
13-
148
## [3.1.10] - 2024-05-09
159

1610
### Changed
@@ -28,7 +22,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2822
### Added
2923

3024
### Changed
31-
3225
- Changed chunkInputStream method in LargeFileUploadTask to resolve IndexOutOfBoundsException when uploading large files
3326
- Fix Large File Upload bug where exception was thrown for completed successful uploads
3427

@@ -48,7 +41,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
4841
## [3.1.5] - 2024-02-27
4942

5043
### Changed
51-
5244
- Bumps Kiota-Java abstractions, authentication, http, and serialization components
5345

5446
## [3.1.4] - 2024-02-21
@@ -94,7 +86,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
9486

9587
### Changed
9688

97-
- Parent namespace for all classes has been changed from com.microsoft.graph.*to com.microsoft.graph.core.* in order to avoid conflicts with the generated service libraries.
89+
- Parent namespace for all classes has been changed from com.microsoft.graph.* to com.microsoft.graph.core.* in order to avoid conflicts with the generated service libraries.
9890
- This change is not backwards compatible and will require changes to your code.
9991

10092
## [3.0.10] - 2023-11-27
@@ -183,7 +175,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
183175
### Changed
184176

185177
- Changed CoreHttpProvider dependency from OkHttpClient to Call.Factory (parent interface implemented by OkHttpClient). This make usage of OpenTelemetry tracing possible.
186-
<https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/instrumentation/okhttp/okhttp-3.0/library/README.md>
178+
https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/instrumentation/okhttp/okhttp-3.0/library/README.md
187179

188180
```java
189181
private Call.Factory createTracedClient(OpenTelemetry openTelemetry, @Nonnull final IAuthenticationProvider auth) {
@@ -343,3 +335,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
343335

344336
- Casing fixed for Odata type parsing
345337
- Removed .azure-pipelines/**
338+

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ mavenMajorVersion = 3
3030
mavenMinorVersion = 1
3131
# x-release-please-end
3232
# x-release-please-start-patch
33-
mavenPatchVersion = 11
33+
mavenPatchVersion = 10
3434
# x-release-please-end
3535
mavenArtifactSuffix =
3636

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,9 @@ 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+
}
9194
this.uploadSession = extractSessionFromParsable(uploadSession);
9295
this.requestAdapter = Objects.isNull(requestAdapter) ? initializeAdapter(this.uploadSession.getUploadUrl()):requestAdapter;
9396
this.totalUploadLength = streamSize;

0 commit comments

Comments
 (0)