-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
use generics for AbstractFindByBuilder to avoid excessive casting #15526
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
use generics for AbstractFindByBuilder to avoid excessive casting #15526
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||
User description
Thanks for contributing to Selenium!
A PR well described will help maintainers to quickly review and merge it
Before submitting your PR, please check our contributing guidelines.
Avoid large PRs, help reviewers by making them as simple and short as possible.
Motivation and Context
Types of changes
Checklist
PR Type
Enhancement
Description
Refactored
AbstractFindByBuilderto use generics for type safety.Updated
FindByBuilderclasses to leverage generics, reducing casting.Improved method signatures for better clarity and type enforcement.
Changes walkthrough 📝
AbstractFindByBuilder.java
Add generics to `AbstractFindByBuilder` for type safetyjava/src/org/openqa/selenium/support/AbstractFindByBuilder.java
AbstractFindByBuilderclass.buildItmethod to use generic typeT.FindAll.java
Refactor `FindAll.FindByBuilder` to use genericsjava/src/org/openqa/selenium/support/FindAll.java
FindByBuilderto extendAbstractFindByBuilderwithFindAll.buildItmethod to acceptFindAlltype directly.FindBy.java
Refactor `FindBy.FindByBuilder` to use genericsjava/src/org/openqa/selenium/support/FindBy.java
FindByBuilderto extendAbstractFindByBuilderwithFindBy.buildItmethod to acceptFindBytype directly.FindBys.java
Refactor `FindBys.FindByBuilder` to use genericsjava/src/org/openqa/selenium/support/FindBys.java
FindByBuilderto extendAbstractFindByBuilderwithFindBys.buildItmethod to acceptFindBystype directly.