-
-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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] Add nullness for virtualauthenticator #15082
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
This PR solves the following error:
There are 3 more problems in |
Co-authored-by: Diego Molina <[email protected]>
User description
Description
In this PR I'm adding nullness annotations for classes:
org.openqa.selenium.virtualauthenticator.Credential
org.openqa.selenium.virtualauthenticator.HasVirtualAuthenticator
org.openqa.selenium.virtualauthenticator.VirtualAuthenticator
org.openqa.selenium.virtualauthenticator.VirtualAuthenticatorOptions
NullAway analysis: #14421
Motivation and Context
The JSpecify nullness annotations will give developers better exposure to potential problems with their code to avoid NullPointerExceptions.
Related issue: #14291
Types of changes
Checklist
PR Type
Enhancement
Description
Added JSpecify
@NullMarked
annotations to virtual authenticator classes.Introduced
@Nullable
annotations for nullable fields and methods.Enhanced null-safety for
Credential
class with nullable user handle.Improved IDE/static analyzer support for nullness checks.
Changes walkthrough 📝
Credential.java
Add nullness annotations to `Credential` class
java/src/org/openqa/selenium/virtualauthenticator/Credential.java
@NullMarked
annotation to the class.userHandle
field and related methods as@Nullable
.HasVirtualAuthenticator.java
Add nullness annotations to `HasVirtualAuthenticator` interface
java/src/org/openqa/selenium/virtualauthenticator/HasVirtualAuthenticator.java
@NullMarked
annotation to the interface.VirtualAuthenticator.java
Add nullness annotations to `VirtualAuthenticator` interface
java/src/org/openqa/selenium/virtualauthenticator/VirtualAuthenticator.java
@NullMarked
annotation to the interface.VirtualAuthenticatorOptions.java
Add nullness annotations to `VirtualAuthenticatorOptions` class
java/src/org/openqa/selenium/virtualauthenticator/VirtualAuthenticatorOptions.java
@NullMarked
annotation to the class.