-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[dotnet] Add nullability to FirefoxExtension
#14964
base: trunk
Are you sure you want to change the base?
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
public void AddExtension(string extensionToInstall) | ||
{ | ||
if (extensionToInstall is null) |
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.
This already throws ArgumentNullException
because of the Dictionary.Add
just below
PR Code Suggestions ✨Explore these optional code suggestions:
|
@@ -48,6 +48,7 @@ public class FirefoxExtension | |||
/// <remarks>WebDriver attempts to resolve the <paramref name="fileName"/> parameter | |||
/// by looking first for the specified file in the directory of the calling assembly, | |||
/// then using the full path to the file, if a full path is provided.</remarks> | |||
/// <exception cref="ArgumentNullException">If <paramref name="fileName"/> is <see langword="null"/>.</exception> |
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.
This is already unreachable with null
using normal means, but this constructor is public-facing so we need the validation.
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.
Description
Annotates nullability for
FirefoxExtension
Motivation and Context
Contributes to #14640
Types of changes
Checklist
PR Type
Enhancement
Description
FirefoxExtension
classChanges walkthrough 📝
FirefoxExtension.cs
Add nullability annotations and improve null handling
dotnet/src/webdriver/Firefox/FirefoxExtension.cs
#nullable enable
FirefoxProfile.cs
Add null parameter validation for AddExtension method
dotnet/src/webdriver/Firefox/FirefoxProfile.cs
extensionToInstall
parameter