Skip to content

Conversation

@JoeWang1127
Copy link
Contributor

@JoeWang1127 JoeWang1127 commented Mar 28, 2023

Fixes #1576 ☕️

@product-auto-label product-auto-label bot added the size: s Pull request size is small. label Mar 28, 2023
@JoeWang1127 JoeWang1127 added the owlbot:run Add this label to trigger the Owlbot post processor. label Mar 30, 2023
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Mar 30, 2023
@JoeWang1127 JoeWang1127 marked this pull request as ready for review March 30, 2023 19:52
@JoeWang1127 JoeWang1127 requested a review from a team as a code owner March 30, 2023 19:52
@burkedavison
Copy link
Member

LGTM

Copy link
Member

@suztomo suztomo left a comment

Choose a reason for hiding this comment

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

Let's merge this at the same time as the Page's

@suztomo suztomo added the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Mar 31, 2023
return iterator;
}

public Stream<V> stream() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you please add Javadoc? All public methods are required to have Javadoc.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

}

public Stream<V> stream() {
return StreamSupport.stream(this.spliterator(), false);
Copy link
Contributor

Choose a reason for hiding this comment

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

I see that the second argument is set to false, which means this is a sequential stream, do we want to expose another parallelStream method as well?

Copy link
Contributor Author

@JoeWang1127 JoeWang1127 Mar 31, 2023

Choose a reason for hiding this comment

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

I'm not sure whether a deterministic result is required as parallel stream can randomize the result.

Also, we could explore more about parallel stream later as we did in Page.

@product-auto-label product-auto-label bot added size: m Pull request size is medium. and removed size: s Pull request size is small. labels Apr 1, 2023
@suztomo suztomo removed the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Apr 11, 2023
@sonarqubecloud
Copy link

[gapic-generator-java-root] Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

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

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@sonarqubecloud
Copy link

[java_showcase_integration_tests] Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

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

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@sonarqubecloud
Copy link

[java_showcase_unit_tests] Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

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

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@JoeWang1127 JoeWang1127 merged commit e38c8ec into main Apr 11, 2023
@JoeWang1127 JoeWang1127 deleted the feat/add-stream-in-ServerStream branch April 11, 2023 17:49
JoeWang1127 pushed a commit that referenced this pull request Apr 11, 2023
…1575) (#914)

Source-Link: googleapis/synthtool@2e9ac19
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:8175681a918181d306d9c370d3262f16b4c724cc73d74111b7d42fc985ca7f93
JoeWang1127 pushed a commit that referenced this pull request Apr 11, 2023
…1575) (#795)

Source-Link: googleapis/synthtool@2e9ac19
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:8175681a918181d306d9c370d3262f16b4c724cc73d74111b7d42fc985ca7f93
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size: m Pull request size is medium.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ServerStream do not easily support Java Streams

4 participants