-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[java] JSpecify annotations for org.openqa.selenium.net
#16463
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?
Conversation
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
PR Code Suggestions ✨Explore these optional code suggestions:
|
d1db2b9
to
da5d929
Compare
User description
🔗 Related Issues
Related #14291
💥 What does this PR do?
JSpecify annotations added to the:
org.openqa.selenium.net.LinuxEphemeralPortRangeDetector
org.openqa.selenium.net.NetworkUtils
org.openqa.selenium.net.PortProber
org.openqa.selenium.net.UrlChecker
org.openqa.selenium.net.Urls
🔧 Implementation Notes
💡 Additional Considerations
🔄 Types of changes
PR Type
Enhancement
Description
Add JSpecify @NullMarked annotations to five net package classes
Mark nullable fields and return types with @nullable annotation
Add null-safety checks using Require.nonNull() for guaranteed non-null returns
Improve type safety and null-handling in NetworkUtils class
Diagram Walkthrough
File Walkthrough
LinuxEphemeralPortRangeDetector.java
Add JSpecify @NullMarked annotation
java/src/org/openqa/selenium/net/LinuxEphemeralPortRangeDetector.java
NetworkUtils.java
Add comprehensive null-safety annotations and checks
java/src/org/openqa/selenium/net/NetworkUtils.java
(cachedIp4NonLoopbackAddressOfThisMachine,
cachedIp4NonLoopbackAddressHostName, hostname, address)
methods
(getNonLoopbackAddressOfThisMachine, obtainLoopbackIp4Address,
getIpOfLoopBackIp4)
obtainLoopbackIp4Address()
PortProber.java
Add JSpecify @NullMarked annotation
java/src/org/openqa/selenium/net/PortProber.java
UrlChecker.java
Add JSpecify @NullMarked annotation
java/src/org/openqa/selenium/net/UrlChecker.java
Urls.java
Add JSpecify @NullMarked annotation
java/src/org/openqa/selenium/net/Urls.java