Skip to content

Commit edb289b

Browse files
committed
annotation with @NullMarked the whole package org.openqa.selenium.net
So it's not needed to duplicate @NullMarked in every file.
1 parent 7ac21b9 commit edb289b

File tree

10 files changed

+21
-18
lines changed

10 files changed

+21
-18
lines changed

java/src/org/openqa/selenium/net/DefaultNetworkInterfaceProvider.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,10 @@
2424
import java.util.Collections;
2525
import java.util.Enumeration;
2626
import java.util.List;
27-
import org.jspecify.annotations.NullMarked;
2827
import org.jspecify.annotations.Nullable;
2928
import org.openqa.selenium.Platform;
3029
import org.openqa.selenium.WebDriverException;
3130

32-
@NullMarked
3331
public class DefaultNetworkInterfaceProvider implements NetworkInterfaceProvider {
3432
// Cache the list of interfaces between instances. This is mostly used
3533
// to get the loopback interface, so it's ok even though interfaces may go

java/src/org/openqa/selenium/net/HostIdentifier.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,9 @@
2727
import java.util.Enumeration;
2828
import java.util.concurrent.TimeUnit;
2929
import java.util.logging.Logger;
30-
import org.jspecify.annotations.NullMarked;
3130
import org.jspecify.annotations.Nullable;
3231
import org.openqa.selenium.Platform;
3332

34-
@NullMarked
3533
public class HostIdentifier {
3634
private static final Logger LOG = Logger.getLogger(HostIdentifier.class.getName());
3735

java/src/org/openqa/selenium/net/LinuxEphemeralPortRangeDetector.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,7 @@
2525
import java.io.UncheckedIOException;
2626
import java.nio.charset.Charset;
2727
import java.nio.file.Files;
28-
import org.jspecify.annotations.NullMarked;
2928

30-
@NullMarked
3129
public class LinuxEphemeralPortRangeDetector implements EphemeralPortRangeDetector {
3230

3331
private final int firstEphemeralPort;

java/src/org/openqa/selenium/net/NetworkInterface.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,8 @@
2929
import java.util.logging.Logger;
3030
import java.util.stream.Collectors;
3131
import java.util.stream.StreamSupport;
32-
import org.jspecify.annotations.NullMarked;
3332
import org.jspecify.annotations.Nullable;
3433

35-
@NullMarked
3634
public class NetworkInterface {
3735
private static final Logger LOG = Logger.getLogger(NetworkInterface.class.getName());
3836

java/src/org/openqa/selenium/net/NetworkInterfaceProvider.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

1818
package org.openqa.selenium.net;
1919

20-
import org.jspecify.annotations.NullMarked;
2120
import org.jspecify.annotations.Nullable;
2221

2322
/**
@@ -26,7 +25,6 @@
2625
* <p>Basically an abstraction created to allow stubbing of java.net.NetworkInterface, also soothes
2726
* some of the jdk1.2 idioms from this interface into jdk1.5 idioms.
2827
*/
29-
@NullMarked
3028
public interface NetworkInterfaceProvider {
3129
Iterable<NetworkInterface> getNetworkInterfaces();
3230

java/src/org/openqa/selenium/net/NetworkUtils.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,11 @@
2828
import java.util.List;
2929
import java.util.Objects;
3030
import java.util.concurrent.TimeUnit;
31-
import org.jspecify.annotations.NullMarked;
3231
import org.jspecify.annotations.Nullable;
3332
import org.openqa.selenium.Platform;
3433
import org.openqa.selenium.WebDriverException;
3534
import org.openqa.selenium.internal.Require;
3635

37-
@NullMarked
3836
public class NetworkUtils {
3937

4038
private static @Nullable InetAddress cachedIp4NonLoopbackAddressOfThisMachine;

java/src/org/openqa/selenium/net/PortProber.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,8 @@
2626
import java.net.SocketTimeoutException;
2727
import java.util.Random;
2828
import java.util.concurrent.TimeUnit;
29-
import org.jspecify.annotations.NullMarked;
3029
import org.openqa.selenium.Platform;
3130

32-
@NullMarked
3331
public class PortProber {
3432

3533
public static final int HIGHEST_PORT = 65535;

java/src/org/openqa/selenium/net/UrlChecker.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,8 @@
3131
import java.util.concurrent.TimeUnit;
3232
import java.util.concurrent.atomic.AtomicInteger;
3333
import java.util.logging.Logger;
34-
import org.jspecify.annotations.NullMarked;
3534

3635
/** Polls a URL until a HTTP 200 response is received. */
37-
@NullMarked
3836
public class UrlChecker {
3937

4038
private static final Logger LOG = Logger.getLogger(UrlChecker.class.getName());

java/src/org/openqa/selenium/net/Urls.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,8 @@
2525
import java.net.URL;
2626
import java.net.URLEncoder;
2727
import java.nio.charset.StandardCharsets;
28-
import org.jspecify.annotations.NullMarked;
2928
import org.openqa.selenium.internal.Require;
3029

31-
@NullMarked
3230
public class Urls {
3331

3432
private Urls() {
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// Licensed to the Software Freedom Conservancy (SFC) under one
2+
// or more contributor license agreements. See the NOTICE file
3+
// distributed with this work for additional information
4+
// regarding copyright ownership. The SFC licenses this file
5+
// to you under the Apache License, Version 2.0 (the
6+
// "License"); you may not use this file except in compliance
7+
// with the License. You may obtain a copy of the License at
8+
//
9+
// http://www.apache.org/licenses/LICENSE-2.0
10+
//
11+
// Unless required by applicable law or agreed to in writing,
12+
// software distributed under the License is distributed on an
13+
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
// KIND, either express or implied. See the License for the
15+
// specific language governing permissions and limitations
16+
// under the License.
17+
18+
@NullMarked
19+
package org.openqa.selenium.net;
20+
21+
import org.jspecify.annotations.NullMarked;

0 commit comments

Comments
 (0)