Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add StreamingFileUpload.asInputStream #9787

Merged
merged 3 commits into from
Aug 29, 2023
Merged

Add StreamingFileUpload.asInputStream #9787

merged 3 commits into from
Aug 29, 2023

Conversation

yawkat
Copy link
Member

@yawkat yawkat commented Aug 28, 2023

Repurpose some existing publisher->stream code to implement StreamingFileUpload.asInputStream. This will be useful for micronaut-projects/micronaut-object-storage#113

Repurpose some existing publisher->stream code to implement StreamingFileUpload.asInputStream. This will be useful for micronaut-projects/micronaut-object-storage#113
@yawkat yawkat added the type: enhancement New feature or request label Aug 28, 2023
@yawkat yawkat added this to the 4.2.0 milestone Aug 28, 2023
@yawkat
Copy link
Member Author

yawkat commented Aug 28, 2023

actually i'm going to make PublisherAsBlocking less abstract again.

* @return An {@link InputStream} that reads this file's contents
* @since 4.2.0
*/
default InputStream asInputStream() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add @NonNull to return type

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

annotate with @Blocking

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the method itself is not blocking even though the stream might be. should it still be annotated as such?

@sonarqubecloud
Copy link

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 3 Code Smells

69.8% 69.8% Coverage
0.0% 0.0% Duplication

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint

@yawkat yawkat merged commit de5ca8e into 4.2.x Aug 29, 2023
@yawkat yawkat deleted the streaming-stream branch August 29, 2023 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement New feature or request
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants