[java] Made JsonToWebElementConverter methods/fields protected#15885
Merged
diemol merged 2 commits intoJun 23, 2025
Conversation
so that the class can be properly extended
Contributor
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
Contributor
PR Code Suggestions ✨No code suggestions found for the PR. |
JsonToWebElementConverter methods/fields protectedJsonToWebElementConverter methods/fields protected
SBadage
reviewed
Jun 13, 2025
diemol
approved these changes
Jun 23, 2025
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
User description
So that the class can be properly extended.
🔗 Related Issues
Fixes #15884
💥 What does this PR do?
Make the corresponding fields/methods
protected🔧 Implementation Notes
So that the class can be properly extended/overridden.
💡 Additional Considerations
Don't use
private(or similar things) in libraries that other people use.I already encountered this problem so often that I had to write a small blog post.
🔄 Types of changes
PR Type
Other
Description
• Changed private fields/methods to protected in JsonToWebElementConverter
• Enables proper class extension and customization
• Improves library extensibility for downstream users
Changes walkthrough 📝
JsonToWebElementConverter.java
Change visibility modifiers from private to protectedjava/src/org/openqa/selenium/remote/JsonToWebElementConverter.java
• Changed
driverfield from private to protected• Made
setOwner()method protected instead of private
• Made
getElementKey()methodprotected instead of private
• Made
getShadowRootKey()methodprotected instead of private