[java] JSpecify annotations for `org.openqa.selenium.federatedcredent… #16461
+31
−22
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
User description
🔗 Related Issues
Related #14291
💥 What does this PR do?
JSpecify annotations added to the:
org.openqa.selenium.federatedcredentialmanagement.FederatedCredentialManagementAccount
org.openqa.selenium.federatedcredentialmanagement.FederatedCredentialManagementDialog
org.openqa.selenium.federatedcredentialmanagement.HasFederatedCredentialManagement
🔧 Implementation Notes
💡 Additional Considerations
🔄 Types of changes
PR Type
Enhancement
Description
Add JSpecify null-safety annotations to FedCM classes
Mark classes with @NullMarked for comprehensive null checking
Annotate nullable fields and return types with @nullable
Improve type safety across federated credential management API
Diagram Walkthrough
File Walkthrough
FederatedCredentialManagementAccount.java
Add null-safety annotations to account class
java/src/org/openqa/selenium/federatedcredentialmanagement/FederatedCredentialManagementAccount.java
@NullMarked
class-level annotation for comprehensive nullchecking
@Nullable
annotations to all nine private String fields@Nullable
annotations to all nine getter method return typesFederatedCredentialManagementDialog.java
Add null-safety annotations to dialog interface
java/src/org/openqa/selenium/federatedcredentialmanagement/FederatedCredentialManagementDialog.java
@NullMarked
interface-level annotation@Nullable
annotations to three getter method return typesgetDialogType()
,getTitle()
,getSubtitle()
HasFederatedCredentialManagement.java
Add null-safety annotations to capability interface
java/src/org/openqa/selenium/federatedcredentialmanagement/HasFederatedCredentialManagement.java
@NullMarked
interface-level annotation@Nullable
annotation togetFederatedCredentialManagementDialog()
return type
@Beta
annotation