Skip to content
Merged
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/HttpSessionId.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
package org.openqa.selenium.remote;

import java.util.Optional;
import org.jspecify.annotations.NullMarked;

@NullMarked
public class HttpSessionId {

private HttpSessionId() {
Expand Down
29 changes: 16 additions & 13 deletions java/src/org/openqa/selenium/remote/Response.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,17 @@
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import org.jspecify.annotations.NullMarked;
import org.jspecify.annotations.Nullable;

@NullMarked
public class Response {

private volatile Object value;
private volatile String sessionId;
private volatile @Nullable Object value;
private volatile @Nullable String sessionId;
@Deprecated // (forRemoval = true)
private volatile Integer status;
private volatile String state;
private volatile @Nullable Integer status;
private volatile @Nullable String state;

public Response() {}

Expand All @@ -36,36 +39,36 @@ public Response(SessionId sessionId) {
}

@Deprecated // (forRemoval = true)
public Integer getStatus() {
public @Nullable Integer getStatus() {
return status;
}

@Deprecated // (forRemoval = true)
public void setStatus(Integer status) {
public void setStatus(@Nullable Integer status) {
this.status = status;
}

public String getState() {
public @Nullable String getState() {
return state;
}

public void setState(String state) {
public void setState(@Nullable String state) {
this.state = state;
}

public void setValue(Object value) {
public void setValue(@Nullable Object value) {
this.value = value;
}

public Object getValue() {
public @Nullable Object getValue() {
return value;
}

public void setSessionId(String sessionId) {
public void setSessionId(@Nullable String sessionId) {
this.sessionId = sessionId;
}

public String getSessionId() {
public @Nullable String getSessionId() {
return sessionId;
}

Expand All @@ -76,7 +79,7 @@ public String toString() {
}

@Override
public boolean equals(Object o) {
public boolean equals(@Nullable Object o) {
if (!(o instanceof Response)) {
return false;
}
Expand Down
5 changes: 4 additions & 1 deletion java/src/org/openqa/selenium/remote/SessionId.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,12 @@
import java.io.Serializable;
import java.util.Map;
import java.util.UUID;
import org.jspecify.annotations.NullMarked;
import org.jspecify.annotations.Nullable;
import org.openqa.selenium.internal.Require;
import org.openqa.selenium.json.JsonException;

@NullMarked
public class SessionId implements Serializable {

private final String opaqueKey;
Expand All @@ -46,7 +49,7 @@ public int hashCode() {
}

@Override
public boolean equals(Object obj) {
public boolean equals(@Nullable Object obj) {
return obj instanceof SessionId && opaqueKey.equals(((SessionId) obj).opaqueKey);
}

Expand Down