Skip to content

Commit 6480729

Browse files
authored
Merge branch 'trunk' into pinned-browser-updates
2 parents 44f6d27 + 0ecbd47 commit 6480729

File tree

13 files changed

+143
-116
lines changed

13 files changed

+143
-116
lines changed

.bazelrc.remote

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ build:rbe --disk_cache=
3131
build:rbe --incompatible_enable_cc_toolchain_resolution
3232
build:rbe --action_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1
3333
test:rbe --test_env=DISPLAY=:99.0
34-
test:rbe --test_tag_filters=-skip-rbe,-remote
34+
test:rbe --test_tag_filters=-skip-rbe
3535

3636
# Env vars we can hard code
3737
build:rbe --action_env=HOME=/home/dev

Rakefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -747,9 +747,12 @@ namespace :rb do
747747

748748
desc 'Update generated Ruby files for local development'
749749
task :local_dev do
750+
puts 'installing ruby, this may take a minute'
750751
Bazel.execute('build', [], '@bundle//:bundle')
751752
Rake::Task['rb:build'].invoke
752753
Rake::Task['grid'].invoke
754+
# A command like this is required to move ruby binary into working directory
755+
Bazel.execute('build', %w[--test_arg --dry-run], '@bundle//bin:rubocop')
753756
end
754757

755758
desc 'Push Ruby gems to rubygems'

java/src/org/openqa/selenium/remote/HttpSessionId.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@
1818
package org.openqa.selenium.remote;
1919

2020
import java.util.Optional;
21+
import org.jspecify.annotations.NullMarked;
2122

23+
@NullMarked
2224
public class HttpSessionId {
2325

2426
private HttpSessionId() {

java/src/org/openqa/selenium/remote/Response.java

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,17 @@
2020
import java.util.Map;
2121
import java.util.Objects;
2222
import java.util.Optional;
23+
import org.jspecify.annotations.NullMarked;
24+
import org.jspecify.annotations.Nullable;
2325

26+
@NullMarked
2427
public class Response {
2528

26-
private volatile Object value;
27-
private volatile String sessionId;
29+
private volatile @Nullable Object value;
30+
private volatile @Nullable String sessionId;
2831
@Deprecated // (forRemoval = true)
29-
private volatile Integer status;
30-
private volatile String state;
32+
private volatile @Nullable Integer status;
33+
private volatile @Nullable String state;
3134

3235
public Response() {}
3336

@@ -36,36 +39,36 @@ public Response(SessionId sessionId) {
3639
}
3740

3841
@Deprecated // (forRemoval = true)
39-
public Integer getStatus() {
42+
public @Nullable Integer getStatus() {
4043
return status;
4144
}
4245

4346
@Deprecated // (forRemoval = true)
44-
public void setStatus(Integer status) {
47+
public void setStatus(@Nullable Integer status) {
4548
this.status = status;
4649
}
4750

48-
public String getState() {
51+
public @Nullable String getState() {
4952
return state;
5053
}
5154

52-
public void setState(String state) {
55+
public void setState(@Nullable String state) {
5356
this.state = state;
5457
}
5558

56-
public void setValue(Object value) {
59+
public void setValue(@Nullable Object value) {
5760
this.value = value;
5861
}
5962

60-
public Object getValue() {
63+
public @Nullable Object getValue() {
6164
return value;
6265
}
6366

64-
public void setSessionId(String sessionId) {
67+
public void setSessionId(@Nullable String sessionId) {
6568
this.sessionId = sessionId;
6669
}
6770

68-
public String getSessionId() {
71+
public @Nullable String getSessionId() {
6972
return sessionId;
7073
}
7174

@@ -76,7 +79,7 @@ public String toString() {
7679
}
7780

7881
@Override
79-
public boolean equals(Object o) {
82+
public boolean equals(@Nullable Object o) {
8083
if (!(o instanceof Response)) {
8184
return false;
8285
}

java/src/org/openqa/selenium/remote/SessionId.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,12 @@
2020
import java.io.Serializable;
2121
import java.util.Map;
2222
import java.util.UUID;
23+
import org.jspecify.annotations.NullMarked;
24+
import org.jspecify.annotations.Nullable;
2325
import org.openqa.selenium.internal.Require;
2426
import org.openqa.selenium.json.JsonException;
2527

28+
@NullMarked
2629
public class SessionId implements Serializable {
2730

2831
private final String opaqueKey;
@@ -46,7 +49,7 @@ public int hashCode() {
4649
}
4750

4851
@Override
49-
public boolean equals(Object obj) {
52+
public boolean equals(@Nullable Object obj) {
5053
return obj instanceof SessionId && opaqueKey.equals(((SessionId) obj).opaqueKey);
5154
}
5255

java/src/org/openqa/selenium/support/ui/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,5 +58,6 @@ java_library(
5858
"//java/src/org/openqa/selenium:core",
5959
"//java/src/org/openqa/selenium/remote",
6060
artifact("com.google.guava:guava"),
61+
artifact("org.jspecify:jspecify"),
6162
],
6263
)

java/src/org/openqa/selenium/support/ui/ExpectedCondition.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
package org.openqa.selenium.support.ui;
1919

2020
import com.google.common.base.Function;
21+
import org.jspecify.annotations.NullMarked;
22+
import org.jspecify.annotations.Nullable;
2123
import org.openqa.selenium.WebDriver;
2224

2325
/**
@@ -34,5 +36,6 @@
3436
// NB: this originally extended Guava's Function interface since Java didn't have one. To avoid code
3537
// such as "com.google.common.base.Function condition = ExpectedConditions.elementFound(By);"
3638
// breaking at compile time, we continue to extend Guava's Function interface.
37-
public interface ExpectedCondition<T>
39+
@NullMarked
40+
public interface ExpectedCondition<T extends @Nullable Object>
3841
extends Function<WebDriver, T>, java.util.function.Function<WebDriver, T> {}

0 commit comments

Comments
 (0)