Deprecate MongoNamespace#COMMAND_COLLECTION_NAME by jyemin · Pull Request #1786 · mongodb/mongo-java-driver
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR deprecates the COMMAND_COLLECTION_NAME constant in the MongoNamespace class as part of removing legacy wire protocol support. The constant was used for the deprecated OP_QUERY wire protocol, which has been replaced by OP_MSG.
- Adds
@Deprecatedannotation to theCOMMAND_COLLECTION_NAMEconstant - Updates the documentation to explain the deprecation reason and that no replacement is needed
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
I just found a naming inconsistency in this MongoNamespace class for the following two private methods:
private static String getCollectionNameFullName(final String namespace)
private static String getDatatabaseNameFromFullName(final String namespace)
given they are private methods, it might be great to add the missing From to the first method.
Not a blocker of the PR, just a comment.
Another super minor but more visible issue is the javadoc of this class:
A MongoDB namespace, which includes a database name and collection name.
I think another a is needed before colleciton name.
A MongoDB namespace, which includes a database name and a collection name.
Too trivial for sure.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters