-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
[java] Feat 14291/jspecify nullable annotation edge driver service #15972
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
base: trunk
Are you sure you want to change the base?
[java] Feat 14291/jspecify nullable annotation edge driver service #15972
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
User description
🔗 Related Issues
fixes #14291
💥 What does this PR do?
This pull request introduces changes to the
EdgeDriverService
and its parent classDriverService
to improve nullability handling by adding@Nullable
annotations to various parameters and fields. These changes enhance type safety and make the codebase more robust when dealing with potentially null values.🔧 Implementation Notes
Nullability Enhancements in
EdgeDriverService
:@Nullable
annotations to parameters in theEdgeDriverService
constructor, includingFile executable
,Duration timeout
,List<String> args
, andMap<String, String> environment
. This ensures better handling of optional values during service creation.Builder
class fields (e.g.,disableBuildCheck
,logLevel
,allowedListIps
) with@Nullable
annotations to explicitly mark them as optional.Builder
class, such aswithLoglevel
andwithAllowedListIps
, to include@Nullable
annotations for their parameters, improving clarity about optional inputs. [1] [2] [3]createDriverService
method inEdgeDriverService
to use@Nullable
annotations for its parameters, aligning with the updated constructor.Nullability Enhancements in
DriverService
:@Nullable
annotations to theDriverService
constructor parameters (File executable
,Duration timeout
,List<String> args
, andMap<String, String> environment
) to propagate nullability handling to the parent class.💡 Additional Considerations
🔄 Types of changes
PR Type
Enhancement
Description
Add @nullable annotations to EdgeDriverService constructor parameters
Add @nullable annotations to Builder class fields and methods
Update DriverService constructor with @nullable annotations
Add jspecify dependency to BUILD.bazel
Changes diagram
Changes walkthrough 📝
EdgeDriverService.java
Add @Nullable annotations for null safety
java/src/org/openqa/selenium/edge/EdgeDriverService.java
timeout, args, environment)
logLevel, allowedListIps, etc.)
withAllowedListIps, withReadableTimestamp)
DriverService.java
Add @Nullable annotations to constructor
java/src/org/openqa/selenium/remote/service/DriverService.java
timeout, args, environment)
BUILD.bazel
Add jspecify dependency
java/src/org/openqa/selenium/edge/BUILD.bazel