Skip to content

Add JSpecify nullable annotations to exception classes #16027

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

Conversation

iampopovich
Copy link
Contributor

🔗 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:

💡 Additional Considerations

🔄 Types of changes

  • Cleanup (formatting, renaming)

@selenium-ci selenium-ci added B-grid Everything grid and server related C-java Java Bindings B-devtools Includes everything BiDi or Chrome DevTools related B-support Issue or PR related to support classes labels Jul 8, 2025
@selenium-ci
Copy link
Member

Thank you, @iampopovich for this code suggestion.

The support packages contain example code that many users find helpful, but they do not necessarily represent
the best practices for using Selenium, and the Selenium team is not currently merging changes to them.

We actively encourage people to add the wrapper and helper code that makes sense for them to their own frameworks.
If you have any questions, please contact us

@selenium-ci selenium-ci closed this Jul 8, 2025
@iampopovich
Copy link
Contributor Author

i guess there are too many similar PRs for the changes. i'll try open one another later

@iampopovich
Copy link
Contributor Author

oh. i see now
i have to revert changes for support package
[java/src/org/openqa/selenium/support/ui/UnexpectedTagNameException.java](https://github.com/SeleniumHQ/selenium/pull/16027/files#diff-e1086280d39ba9ca4ef2ab40f7403eac779fb0fc05170f0717177522b2e68faeR20-R27): Added @NullMarked annotation to the class and updated the constructor to include @Nullable annotations for expectedTagName and actualTagName parameters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B-devtools Includes everything BiDi or Chrome DevTools related B-grid Everything grid and server related B-support Issue or PR related to support classes C-java Java Bindings
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[🚀 Feature]: JSpecify Nullness annotations for Java
2 participants