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

Avoid double WithWarnings wrapping #6348

Merged
merged 1 commit into from
Apr 19, 2023

Conversation

JaroslavTulach
Copy link
Member

@JaroslavTulach JaroslavTulach commented Apr 19, 2023

Pull Request Description

Fixes #6258 by hiding constructor and checking value instanceof WithWarnings in the factory method.

Checklist

Please ensure that the following checklist has been satisfied before submitting the PR:

  • All code follows the
    Java,
    style guides.
  • All code has been tested:
    • Unit tests have been written where possible.

@JaroslavTulach JaroslavTulach added the CI: No changelog needed Do not require a changelog entry for this PR. label Apr 19, 2023
@JaroslavTulach JaroslavTulach requested a review from radeusgd April 19, 2023 05:47
@JaroslavTulach JaroslavTulach requested a review from 4e6 as a code owner April 19, 2023 05:47
@JaroslavTulach JaroslavTulach self-assigned this Apr 19, 2023
@JaroslavTulach JaroslavTulach requested a review from hubertp as a code owner April 19, 2023 05:47
Copy link
Collaborator

@hubertp hubertp left a comment

Choose a reason for hiding this comment

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

Design patterns ftw!

@JaroslavTulach
Copy link
Member Author

JaroslavTulach commented Apr 19, 2023

Design patterns ftw!

Keeping consistency with my own thoughts: http://wiki.apidesign.org/wiki/Factory

@JaroslavTulach JaroslavTulach merged commit f52ef08 into develop Apr 19, 2023
@JaroslavTulach JaroslavTulach deleted the wip/jtulach/DoubleWarningsWrap_6258 branch April 19, 2023 08:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI: No changelog needed Do not require a changelog entry for this PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

An Atom is recognized as a Primitive when WithWarnings wrap another WithWarnings
3 participants