-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[dotnet] Fix null warnings in RelativeBy by sealing the type
#15379
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
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
||||||||||||
User description
Description
Removed the parameterless constructor from
RelativeBy, because it does not provide a value forrootand this value is crucial toRelativeBy's functionality.Motivation and Context
Fixes null warning on
RelativeBy.rootand prevents extending theRelativeBytype.Currently, if you try to extend the type, you get an error:
Types of changes
Checklist
PR Type
Bug fix, Enhancement
Description
Sealed the
RelativeByclass to prevent extension.Removed the parameterless constructor from
RelativeBy.Refactored
filtersinitialization to handle null values.Moved
wrappedAtominitialization to a static method.Changes walkthrough 📝
RelativeBy.cs
Refactor and seal `RelativeBy` classdotnet/src/webdriver/RelativeBy.cs
RelativeByclass to prevent extension.filtersinitialization to handle null values.wrappedAtominitialization to a static helper method.