-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
[java] Made JsonToWebElementConverter
methods/fields protected
#15885
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
[java] Made JsonToWebElementConverter
methods/fields protected
#15885
Conversation
so that the class can be properly extended
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨No code suggestions found for the PR. |
JsonToWebElementConverter
methods/fields protectedJsonToWebElementConverter
methods/fields protected
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, @AB-xdev!
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 protected
java/src/org/openqa/selenium/remote/JsonToWebElementConverter.java
• Changed
driver
field from private to protected• Made
setOwner()
method protected instead of private
• Made
getElementKey()
methodprotected instead of private
• Made
getShadowRootKey()
methodprotected instead of private