-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
[java] Feat 14291/add jspecify annotations to exception classes pt4 #16028
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/add jspecify annotations to exception classes pt4 #16028
Conversation
PR Reviewer Guide 🔍(Review updated until commit 0fef631)Here are some key observations to aid the review process:
|
PR Code Suggestions ✨No code suggestions found for the PR. |
PR Code Suggestions ✨No code suggestions found for the PR. |
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.
Thank you! @iampopovich
…ption-classes-pt4
User description
🔗 Related Issues
partially fixes #14291
💥 What does this PR do?
same as
#16024
#16025
#16026
🔧 Implementation Notes
This pull request introduces updates to several exception classes across the Selenium codebase to improve null-safety and enhance clarity. The changes primarily involve adding @NullMarked annotations to the classes and @nullable annotations to method parameters where applicable.
Null-safety improvements:
java/src/org/openqa/selenium/devtools/RequestFailedException.java: Added @NullMarked annotation to the class to enforce null-safety.
java/src/org/openqa/selenium/grid/sessionmap/jdbc/JdbcException.java: Added @NullMarked annotation to the class and @nullable annotations to method parameters (message and cause) to handle potential null values.
java/src/org/openqa/selenium/remote/NoSuchDriverException.java: Added @NullMarked annotation to the class and updated constructors to include @nullable annotations for reason and cause parameters.
java/src/org/openqa/selenium/remote/UnreachableBrowserException.java: Added @NullMarked annotation to the class and updated constructors with @nullable annotations for message and cause parameters.
💡 Additional Considerations
🔄 Types of changes
Cleanup (formatting, renaming)
PR Type
Enhancement
Description
Add JSpecify null-safety annotations to exception classes
Include @NullMarked and @nullable annotations for better IDE support
Update build dependencies to include jspecify library
Improve Kotlin interoperability and static analysis
Changes diagram
Changes walkthrough 📝
6 files
Add @NullMarked annotation to class
Add null-safety annotations to constructors
Add @NullMarked and @Nullable annotations
Add null-safety annotations to constructors
Add @NullMarked and @Nullable annotations
Add null-safety annotations to constructor
3 files
Add jspecify dependency to build
Add jspecify dependency to build
Add jspecify dependency to build