Skip to content

Commit d76e8e0

Browse files
committed
** fix ** fix for LargeFileTaskUpload constructor
fixes #1621
1 parent 3d9a461 commit d76e8e0

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

CHANGELOG.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ 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+
814
## [3.1.10] - 2024-05-09
915

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

2430
### Changed
31+
2532
- Changed chunkInputStream method in LargeFileUploadTask to resolve IndexOutOfBoundsException when uploading large files
2633
- Fix Large File Upload bug where exception was thrown for completed successful uploads
2734

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

4350
### Changed
51+
4452
- Bumps Kiota-Java abstractions, authentication, http, and serialization components
4553

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

8795
### Changed
8896

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.
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.
9098
- This change is not backwards compatible and will require changes to your code.
9199

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

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

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

336344
- Casing fixed for Odata type parsing
337345
- 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 = 10
33+
mavenPatchVersion = 11
3434
# x-release-please-end
3535
mavenArtifactSuffix =
3636

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)