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

Refaster rule to convert Stream.of() -> Stream.empty() #1061

Merged
merged 3 commits into from
Nov 20, 2019

Conversation

ferozco
Copy link
Contributor

@ferozco ferozco commented Nov 20, 2019

Before this PR

After this PR

==COMMIT_MSG==
Add Refaster rule to convert Stream.of() -> Stream.empty()
==COMMIT_MSG==

Possible downsides?

@changelog-app
Copy link

changelog-app bot commented Nov 20, 2019

Generate changelog in changelog/@unreleased

Type

  • Feature
  • Improvement
  • Fix
  • Break
  • Deprecation
  • Manual task
  • Migration

Description

Add Refaster rule to convert Stream.of() -> Stream.empty()

Check the box to generate changelog(s)

  • Generate changelog entry

@policy-bot policy-bot bot requested a review from j-baker November 20, 2019 17:26
@BeforeTemplate
Stream<T> streamNoParams() {
return Stream.of();
}
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if we have anything matching:

Collections.emptySet().stream()
Collections.emptyList().stream()
ImmutableList.of().stream()
ImmutableSet.of().stream()

They might be too silly

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's pretty crazy

Copy link
Contributor

Choose a reason for hiding this comment

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

Ya, I doubt we have them for real, let's ship this as is :-]

@carterkozak
Copy link
Contributor

👍

@bulldozer-bot bulldozer-bot bot merged commit 90ed907 into develop Nov 20, 2019
@bulldozer-bot bulldozer-bot bot deleted the fo/stream-empty branch November 20, 2019 18:27
This was referenced Nov 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants