[java] Feat 14291/jspecify nullable annotation chrome driver såervice #15998
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
fixes #14291
💥 What does this PR do?
This pull request introduces changes to improve nullability annotations in the
ChromeDriverService
class and its associated methods, enhancing type safety and clarity in handling nullable parameters. Additionally, a dependency onorg_jspecify_jspecify
is added to the Bazel build file to support these annotations.Nullability Enhancements in
ChromeDriverService
:ChromeDriverService
constructor and several builder methods to include@Nullable
annotations for parameters that can accept null values, ensuring better clarity and type safety. (java/src/org/openqa/selenium/chrome/ChromeDriverService.java
) [1] [2] [3] [4] [5]@Nullable
annotations to fields in theBuilder
class to reflect their potential nullability. (java/src/org/openqa/selenium/chrome/ChromeDriverService.java
)Dependency Updates:
@maven//:org_jspecify_jspecify
in the Bazel build file to support@Nullable
annotations. (java/src/org/openqa/selenium/chrome/BUILD.bazel
)Import Statements:
@Nullable
: Included the necessary import statement fororg.jspecify.annotations.Nullable
in theChromeDriverService
class. (java/src/org/openqa/selenium/chrome/ChromeDriverService.java
)🔧 Implementation Notes
💡 Additional Considerations
🔄 Types of changes
PR Type
Enhancement
Description
Add JSpecify nullable annotations to ChromeDriverService parameters
Update constructor and builder methods with @nullable annotations
Add JSpecify dependency to Bazel build configuration
Improve type safety for nullable parameters
Changes diagram
Changes walkthrough 📝
ChromeDriverService.java
Add nullable annotations to parameters and fields
java/src/org/openqa/selenium/chrome/ChromeDriverService.java
environment)
readableTimestamp, etc.)
readableTimestamp)
BUILD.bazel
Add JSpecify dependency
java/src/org/openqa/selenium/chrome/BUILD.bazel