Skip to content

Replace @Evolving with @Sealed where appropriate #1141

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

Merged

Conversation

stIncMale
Copy link
Member

@stIncMale stIncMale commented Jun 9, 2023

I changed only program elements annotated with @Beta because changing others is not a backward-compatible change.

JAVA-5020

I changed only program elements annotated with `@Beta`
because changing others is not a backward-compatible change.
@stIncMale stIncMale self-assigned this Jun 9, 2023
@@ -26,13 +26,15 @@

/**
* Signifies that the annotated class or interface should be treated as sealed:
* it must not be extended or implemented.
* it must not be extended or implemented by users.
Copy link
Member Author

Choose a reason for hiding this comment

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

Note the documentation change.

* </tr>
* </table>
*
* @see Sealed
Copy link
Member Author

Choose a reason for hiding this comment

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

Note the documentation change.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Minor and optional: the example is the same for the last two items.

Copy link
Member Author

Choose a reason for hiding this comment

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

It's because both apply there.

Copy link
Member Author

Choose a reason for hiding this comment

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

Evolving should have been annotated with @Sealed rather than @Evolving, but the idea of @Sealed did not come at that time, and now it will be a breaking change, even though one may be quite sure that no one extended Evolving.

@jyemin
Copy link
Collaborator

jyemin commented Jun 9, 2023

@stIncMale I think a change like this deserves a JAVA ticket first.

@stIncMale
Copy link
Member Author

@jyemin Done. Added the link to the PR description.

@stIncMale stIncMale requested a review from jyemin June 12, 2023 21:29
Copy link
Collaborator

@katcharov katcharov left a comment

Choose a reason for hiding this comment

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

LGTM

* </tr>
* </table>
*
* @see Sealed
Copy link
Collaborator

Choose a reason for hiding this comment

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

Minor and optional: the example is the same for the last two items.

@stIncMale stIncMale merged commit 0f68e1e into mongodb:master Jun 16, 2023
@stIncMale stIncMale deleted the userSealedInsteadOfEvolvingWhereAppropriate branch June 16, 2023 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants