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
2 changes: 2 additions & 0 deletions java/src/org/openqa/selenium/remote/CommandCodec.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

package org.openqa.selenium.remote;

import org.jspecify.annotations.NullMarked;
import org.openqa.selenium.UnsupportedCommandException;
import org.openqa.selenium.remote.http.HttpMethod;

Expand All @@ -25,6 +26,7 @@
*
* @param <T> The type of encoded command.
*/
@NullMarked
public interface CommandCodec<T> {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@
import java.util.Objects;
import java.util.concurrent.ConcurrentHashMap;
import java.util.stream.Collectors;
import org.jspecify.annotations.NullMarked;
import org.jspecify.annotations.Nullable;
import org.openqa.selenium.UnsupportedCommandException;
import org.openqa.selenium.internal.Require;
import org.openqa.selenium.json.Json;
Expand All @@ -106,6 +108,7 @@
*
* @see <a href="https://w3.org/tr/webdriver">W3C WebDriver spec</a>
*/
@NullMarked
public abstract class AbstractHttpCommandCodec implements CommandCodec<HttpRequest> {
private static final String SESSION_ID_PARAM = "sessionId";

Expand Down Expand Up @@ -362,7 +365,7 @@ private CommandSpec(HttpMethod method, String path) {
}

@Override
public boolean equals(Object o) {
public boolean equals(@Nullable Object o) {
if (o instanceof CommandSpec) {
CommandSpec that = (CommandSpec) o;
return this.method.equals(that.method) && this.path.equals(that.path);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
import java.util.regex.Pattern;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import org.jspecify.annotations.NullMarked;
import org.openqa.selenium.InvalidSelectorException;
import org.openqa.selenium.WebDriverException;
import org.openqa.selenium.remote.WebElementToJsonConverter;
Expand All @@ -96,6 +97,7 @@
*
* @see <a href="https://w3.org/tr/webdriver">W3C WebDriver spec</a>
*/
@NullMarked
public class W3CHttpCommandCodec extends AbstractHttpCommandCodec {

private static final ConcurrentHashMap<String, String> ATOM_SCRIPTS = new ConcurrentHashMap<>();
Expand Down