Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions java/src/org/openqa/selenium/net/HostIdentifier.java
Original file line number Diff line number Diff line change
Expand Up @@ -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());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 0 additions & 2 deletions java/src/org/openqa/selenium/net/NetworkInterface.java
Original file line number Diff line number Diff line change
Expand Up @@ -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());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

package org.openqa.selenium.net;

import org.jspecify.annotations.NullMarked;
import org.jspecify.annotations.Nullable;

/**
Expand All @@ -26,7 +25,6 @@
* <p>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<NetworkInterface> getNetworkInterfaces();

Expand Down
2 changes: 0 additions & 2 deletions java/src/org/openqa/selenium/net/NetworkUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 0 additions & 2 deletions java/src/org/openqa/selenium/net/PortProber.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 0 additions & 2 deletions java/src/org/openqa/selenium/net/UrlChecker.java
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
2 changes: 0 additions & 2 deletions java/src/org/openqa/selenium/net/Urls.java
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
21 changes: 21 additions & 0 deletions java/src/org/openqa/selenium/net/package-info.java
Original file line number Diff line number Diff line change
@@ -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;