diff --git a/java/src/org/openqa/selenium/net/DefaultNetworkInterfaceProvider.java b/java/src/org/openqa/selenium/net/DefaultNetworkInterfaceProvider.java index d47bee5790e19..4022117bccc4b 100644 --- a/java/src/org/openqa/selenium/net/DefaultNetworkInterfaceProvider.java +++ b/java/src/org/openqa/selenium/net/DefaultNetworkInterfaceProvider.java @@ -24,12 +24,10 @@ import java.util.Collections; import java.util.Enumeration; import java.util.List; -import org.jspecify.annotations.NullMarked; import org.jspecify.annotations.Nullable; import org.openqa.selenium.Platform; import org.openqa.selenium.WebDriverException; -@NullMarked public class DefaultNetworkInterfaceProvider implements NetworkInterfaceProvider { // Cache the list of interfaces between instances. This is mostly used // to get the loopback interface, so it's ok even though interfaces may go diff --git a/java/src/org/openqa/selenium/net/HostIdentifier.java b/java/src/org/openqa/selenium/net/HostIdentifier.java index 4be04c1d70b05..a5f1efc70d78e 100644 --- a/java/src/org/openqa/selenium/net/HostIdentifier.java +++ b/java/src/org/openqa/selenium/net/HostIdentifier.java @@ -27,11 +27,9 @@ import java.util.Enumeration; import java.util.concurrent.TimeUnit; import java.util.logging.Logger; -import org.jspecify.annotations.NullMarked; import org.jspecify.annotations.Nullable; import org.openqa.selenium.Platform; -@NullMarked public class HostIdentifier { private static final Logger LOG = Logger.getLogger(HostIdentifier.class.getName()); diff --git a/java/src/org/openqa/selenium/net/LinuxEphemeralPortRangeDetector.java b/java/src/org/openqa/selenium/net/LinuxEphemeralPortRangeDetector.java index 4d2f840ded4a9..0a1354ae437e3 100644 --- a/java/src/org/openqa/selenium/net/LinuxEphemeralPortRangeDetector.java +++ b/java/src/org/openqa/selenium/net/LinuxEphemeralPortRangeDetector.java @@ -25,9 +25,7 @@ import java.io.UncheckedIOException; import java.nio.charset.Charset; import java.nio.file.Files; -import org.jspecify.annotations.NullMarked; -@NullMarked public class LinuxEphemeralPortRangeDetector implements EphemeralPortRangeDetector { private final int firstEphemeralPort; diff --git a/java/src/org/openqa/selenium/net/NetworkInterface.java b/java/src/org/openqa/selenium/net/NetworkInterface.java index feb7d647eb9a9..59f9b0268ee37 100644 --- a/java/src/org/openqa/selenium/net/NetworkInterface.java +++ b/java/src/org/openqa/selenium/net/NetworkInterface.java @@ -29,10 +29,8 @@ import java.util.logging.Logger; import java.util.stream.Collectors; import java.util.stream.StreamSupport; -import org.jspecify.annotations.NullMarked; import org.jspecify.annotations.Nullable; -@NullMarked public class NetworkInterface { private static final Logger LOG = Logger.getLogger(NetworkInterface.class.getName()); diff --git a/java/src/org/openqa/selenium/net/NetworkInterfaceProvider.java b/java/src/org/openqa/selenium/net/NetworkInterfaceProvider.java index 6bca42489a480..3cb1743d89a1f 100644 --- a/java/src/org/openqa/selenium/net/NetworkInterfaceProvider.java +++ b/java/src/org/openqa/selenium/net/NetworkInterfaceProvider.java @@ -17,7 +17,6 @@ package org.openqa.selenium.net; -import org.jspecify.annotations.NullMarked; import org.jspecify.annotations.Nullable; /** @@ -26,7 +25,6 @@ *

Basically an abstraction created to allow stubbing of java.net.NetworkInterface, also soothes * some of the jdk1.2 idioms from this interface into jdk1.5 idioms. */ -@NullMarked public interface NetworkInterfaceProvider { Iterable getNetworkInterfaces(); diff --git a/java/src/org/openqa/selenium/net/NetworkUtils.java b/java/src/org/openqa/selenium/net/NetworkUtils.java index 299cd635ab9dc..70d2486fb133a 100644 --- a/java/src/org/openqa/selenium/net/NetworkUtils.java +++ b/java/src/org/openqa/selenium/net/NetworkUtils.java @@ -28,13 +28,11 @@ import java.util.List; import java.util.Objects; import java.util.concurrent.TimeUnit; -import org.jspecify.annotations.NullMarked; import org.jspecify.annotations.Nullable; import org.openqa.selenium.Platform; import org.openqa.selenium.WebDriverException; import org.openqa.selenium.internal.Require; -@NullMarked public class NetworkUtils { private static @Nullable InetAddress cachedIp4NonLoopbackAddressOfThisMachine; diff --git a/java/src/org/openqa/selenium/net/PortProber.java b/java/src/org/openqa/selenium/net/PortProber.java index 2f70b6011ccd7..e132157a33f62 100644 --- a/java/src/org/openqa/selenium/net/PortProber.java +++ b/java/src/org/openqa/selenium/net/PortProber.java @@ -26,10 +26,8 @@ import java.net.SocketTimeoutException; import java.util.Random; import java.util.concurrent.TimeUnit; -import org.jspecify.annotations.NullMarked; import org.openqa.selenium.Platform; -@NullMarked public class PortProber { public static final int HIGHEST_PORT = 65535; diff --git a/java/src/org/openqa/selenium/net/UrlChecker.java b/java/src/org/openqa/selenium/net/UrlChecker.java index 6838a04738d99..0d282ad735f10 100644 --- a/java/src/org/openqa/selenium/net/UrlChecker.java +++ b/java/src/org/openqa/selenium/net/UrlChecker.java @@ -31,10 +31,8 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; import java.util.logging.Logger; -import org.jspecify.annotations.NullMarked; /** Polls a URL until a HTTP 200 response is received. */ -@NullMarked public class UrlChecker { private static final Logger LOG = Logger.getLogger(UrlChecker.class.getName()); diff --git a/java/src/org/openqa/selenium/net/Urls.java b/java/src/org/openqa/selenium/net/Urls.java index 3efde2635ea0b..4ee4fe959843c 100644 --- a/java/src/org/openqa/selenium/net/Urls.java +++ b/java/src/org/openqa/selenium/net/Urls.java @@ -25,10 +25,8 @@ import java.net.URL; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; -import org.jspecify.annotations.NullMarked; import org.openqa.selenium.internal.Require; -@NullMarked public class Urls { private Urls() { diff --git a/java/src/org/openqa/selenium/net/package-info.java b/java/src/org/openqa/selenium/net/package-info.java new file mode 100644 index 0000000000000..8af9c93ba9404 --- /dev/null +++ b/java/src/org/openqa/selenium/net/package-info.java @@ -0,0 +1,21 @@ +// Licensed to the Software Freedom Conservancy (SFC) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The SFC licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +@NullMarked +package org.openqa.selenium.net; + +import org.jspecify.annotations.NullMarked;