Skip to content

Commit a849805

Browse files
authored
Merge branch 'trunk' into renovate/org.htmlunit-htmlunit-core-js-4.x
2 parents c0b32af + c4f228b commit a849805

File tree

25 files changed

+962
-467
lines changed

25 files changed

+962
-467
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@
187187
same "printed page" as the copyright notice for easier
188188
identification within third-party archives.
189189

190-
Copyright 2024 Software Freedom Conservancy (SFC)
190+
Copyright 2025 Software Freedom Conservancy (SFC)
191191

192192
Licensed under the Apache License, Version 2.0 (the "License");
193193
you may not use this file except in compliance with the License.

MODULE.bazel

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ bazel_dep(name = "protobuf", version = "29.2", dev_dependency = True, repo_name
1818
bazel_dep(name = "rules_cc", version = "0.0.9", dev_dependency = True)
1919

2020
bazel_dep(name = "rules_dotnet", version = "0.17.5")
21-
bazel_dep(name = "rules_java", version = "7.11.1")
21+
bazel_dep(name = "rules_java", version = "7.12.4")
2222
bazel_dep(name = "rules_jvm_external", version = "6.6")
2323
bazel_dep(name = "rules_nodejs", version = "6.3.2")
24-
bazel_dep(name = "rules_oci", version = "1.7.6")
24+
bazel_dep(name = "rules_oci", version = "1.8.0")
2525
bazel_dep(name = "rules_pkg", version = "0.10.1")
2626
bazel_dep(name = "rules_python", version = "0.33.0")
2727
bazel_dep(name = "rules_proto", version = "6.0.2")
@@ -173,15 +173,15 @@ maven.install(
173173
"com.github.spotbugs:spotbugs:4.8.6",
174174
"com.github.stephenc.jcip:jcip-annotations:1.0-1",
175175
"com.google.code.gson:gson:2.11.0",
176-
"com.google.guava:guava:33.3.1-jre",
176+
"com.google.guava:guava:33.4.0-jre",
177177
"com.google.auto:auto-common:1.2.2",
178178
"com.google.auto.service:auto-service:1.1.1",
179179
"com.google.auto.service:auto-service-annotations:1.1.1",
180180
"com.google.googlejavaformat:google-java-format:1.25.2:1.25.0",
181181
"com.graphql-java:graphql-java:22.3",
182182
"dev.failsafe:failsafe:3.3.2",
183-
"io.grpc:grpc-context:1.68.1",
184-
"io.lettuce:lettuce-core:6.5.1.RELEASE",
183+
"io.grpc:grpc-context:1.69.0",
184+
"io.lettuce:lettuce-core:6.5.2.RELEASE",
185185
"io.netty:netty-buffer",
186186
"io.netty:netty-codec-http",
187187
"io.netty:netty-codec-http2",
@@ -204,7 +204,7 @@ maven.install(
204204
"org.htmlunit:htmlunit-core-js:4.7.0",
205205
"org.apache.commons:commons-exec:1.4.0",
206206
"org.apache.logging.log4j:log4j-core:2.24.3",
207-
"org.assertj:assertj-core:3.26.3",
207+
"org.assertj:assertj-core:3.27.1",
208208
"org.bouncycastle:bcpkix-jdk18on:1.79",
209209
"org.eclipse.mylyn.github:org.eclipse.egit.github.core:2.1.5",
210210
"org.hsqldb:hsqldb:2.7.4",

NOTICE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Copyright 2011-2024 Software Freedom Conservancy
1+
Copyright 2011-2025 Software Freedom Conservancy
22
Copyright 2004-2011 Selenium committers

dotnet/src/webdriver/Remote/HttpCommandExecutor.cs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ private async Task<HttpResponseInfo> MakeHttpRequest(HttpRequestInfo requestInfo
316316

317317
private Response CreateResponse(HttpResponseInfo responseInfo)
318318
{
319-
Response response = new Response();
319+
Response response;
320320
string body = responseInfo.Body;
321321
if ((int)responseInfo.StatusCode < 200 || (int)responseInfo.StatusCode > 299)
322322
{
@@ -326,8 +326,7 @@ private Response CreateResponse(HttpResponseInfo responseInfo)
326326
}
327327
else
328328
{
329-
response.Status = WebDriverResult.UnknownError;
330-
response.Value = body;
329+
response = new Response(sessionId: null, body, WebDriverResult.UnknownError);
331330
}
332331
}
333332
else if (responseInfo.ContentType != null && responseInfo.ContentType.StartsWith(JsonMimeType, StringComparison.OrdinalIgnoreCase))
@@ -336,12 +335,12 @@ private Response CreateResponse(HttpResponseInfo responseInfo)
336335
}
337336
else
338337
{
339-
response.Value = body;
338+
response = new Response(sessionId: null, body, WebDriverResult.Success);
340339
}
341340

342-
if (response.Value is string)
341+
if (response.Value is string valueString)
343342
{
344-
response.Value = ((string)response.Value).Replace("\r\n", "\n").Replace("\n", Environment.NewLine);
343+
response.Value = valueString.Replace("\r\n", "\n").Replace("\n", Environment.NewLine);
345344
}
346345

347346
return response;

dotnet/src/webdriver/Response.cs

Lines changed: 54 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
using System.Text.Json;
2525
using System.Text.Json.Serialization;
2626

27+
#nullable enable
28+
2729
namespace OpenQA.Selenium
2830
{
2931
/// <summary>
@@ -48,88 +50,98 @@ public Response()
4850
/// Initializes a new instance of the <see cref="Response"/> class
4951
/// </summary>
5052
/// <param name="sessionId">Session ID in use</param>
51-
public Response(SessionId sessionId)
53+
public Response(SessionId? sessionId)
5254
{
53-
if (sessionId != null)
54-
{
55-
this.SessionId = sessionId.ToString();
56-
}
55+
this.SessionId = sessionId?.ToString();
56+
}
57+
58+
/// <summary>
59+
/// Initializes a new instance of the <see cref="Response"/> class
60+
/// </summary>
61+
/// <param name="sessionId">The Session ID in use, if any.</param>
62+
/// <param name="value">The JSON payload of the response.</param>
63+
/// <param name="status">The WebDriver result status of the response.</param>
64+
public Response(string? sessionId, object? value, WebDriverResult status)
65+
{
66+
this.SessionId = sessionId;
67+
this.Value = value;
68+
this.Status = status;
5769
}
5870

5971
/// <summary>
6072
/// Returns a new <see cref="Response"/> from a JSON-encoded string.
6173
/// </summary>
6274
/// <param name="value">The JSON string to deserialize into a <see cref="Response"/>.</param>
6375
/// <returns>A <see cref="Response"/> object described by the JSON string.</returns>
76+
/// <exception cref="ArgumentNullException">If <paramref name="value"/> is <see langword="null"/>.</exception>
77+
/// <exception cref="JsonException">If <paramref name="value"/> is not a valid JSON object.</exception>
6478
public static Response FromJson(string value)
6579
{
66-
Dictionary<string, object> rawResponse = JsonSerializer.Deserialize<Dictionary<string, object>>(value, s_jsonSerializerOptions)
80+
Dictionary<string, object?> rawResponse = JsonSerializer.Deserialize<Dictionary<string, object?>>(value, s_jsonSerializerOptions)
6781
?? throw new WebDriverException("JSON success response returned \"null\" value");
6882

69-
var response = new Response();
83+
object? contents;
84+
string? sessionId = null;
7085

71-
if (rawResponse.ContainsKey("sessionId"))
86+
if (rawResponse.TryGetValue("sessionId", out object? s) && s is not null)
7287
{
73-
if (rawResponse["sessionId"] != null)
74-
{
75-
response.SessionId = rawResponse["sessionId"].ToString();
76-
}
88+
sessionId = s.ToString();
7789
}
7890

79-
if (rawResponse.TryGetValue("value", out object valueObj))
91+
if (rawResponse.TryGetValue("value", out object? valueObj))
8092
{
81-
response.Value = valueObj;
93+
contents = valueObj;
8294
}
83-
84-
// If the returned object does *not* have a "value" property
85-
// the response value should be the entirety of the response.
86-
// TODO: Remove this if statement altogether; there should
87-
// never be a spec-compliant response that does not contain a
88-
// value property.
89-
if (!rawResponse.ContainsKey("value") && response.Value == null)
95+
else
9096
{
97+
// If the returned object does *not* have a "value" property
98+
// the response value should be the entirety of the response.
99+
// TODO: Remove this if statement altogether; there should
100+
// never be a spec-compliant response that does not contain a
101+
// value property.
102+
91103
// Special-case for the new session command, where the "capabilities"
92104
// property of the response is the actual value we're interested in.
93-
if (rawResponse.ContainsKey("capabilities"))
105+
if (rawResponse.TryGetValue("capabilities", out object? capabilities))
94106
{
95-
response.Value = rawResponse["capabilities"];
107+
contents = capabilities;
96108
}
97109
else
98110
{
99-
response.Value = rawResponse;
111+
contents = rawResponse;
100112
}
101113
}
102114

103-
if (response.Value is Dictionary<string, object> valueDictionary)
115+
if (contents is Dictionary<string, object?> valueDictionary)
104116
{
105117
// Special case code for the new session command. If the response contains
106118
// sessionId and capabilities properties, fix up the session ID and value members.
107-
if (valueDictionary.ContainsKey("sessionId"))
119+
if (valueDictionary.TryGetValue("sessionId", out object? session))
108120
{
109-
response.SessionId = valueDictionary["sessionId"].ToString();
110-
if (valueDictionary.TryGetValue("capabilities", out object capabilities))
121+
sessionId = session.ToString();
122+
if (valueDictionary.TryGetValue("capabilities", out object? capabilities))
111123
{
112-
response.Value = capabilities;
124+
contents = capabilities;
113125
}
114126
else
115127
{
116-
response.Value = valueDictionary["value"];
128+
contents = valueDictionary["value"];
117129
}
118130
}
119131
}
120132

121-
return response;
133+
return new Response(sessionId, contents, WebDriverResult.Success);
122134
}
123135

124136
/// <summary>
125137
/// Gets or sets the value from JSON.
126138
/// </summary>
127-
public object Value { get; set; }
139+
public object? Value { get; set; }
128140

129141
/// <summary>
130142
/// Gets or sets the session ID.
131143
/// </summary>
132-
public string SessionId { get; set; }
144+
public string? SessionId { get; set; }
133145

134146
/// <summary>
135147
/// Gets or sets the status value of the response.
@@ -142,26 +154,25 @@ public static Response FromJson(string value)
142154
/// </summary>
143155
/// <param name="value">The JSON string to deserialize into a <see cref="Response"/>.</param>
144156
/// <returns>A <see cref="Response"/> object described by the JSON string.</returns>
157+
/// <exception cref="ArgumentNullException">If <paramref name="value"/> is <see langword="null"/>.</exception>
158+
/// <exception cref="JsonException">If <paramref name="value"/> is not a valid JSON object.</exception>
159+
/// <exception cref="WebDriverException">If the JSON dictionary is not in the expected state, per spec.</exception>
145160
public static Response FromErrorJson(string value)
146161
{
147-
var deserializedResponse = JsonSerializer.Deserialize<Dictionary<string, object>>(value, s_jsonSerializerOptions)
162+
Dictionary<string, object?> deserializedResponse = JsonSerializer.Deserialize<Dictionary<string, object?>>(value, s_jsonSerializerOptions)
148163
?? throw new WebDriverException("JSON error response returned \"null\" value");
149164

150-
var response = new Response();
151-
152-
if (!deserializedResponse.TryGetValue("value", out var valueObject))
165+
if (!deserializedResponse.TryGetValue("value", out object? valueObject))
153166
{
154167
throw new WebDriverException($"The 'value' property was not found in the response:{Environment.NewLine}{value}");
155168
}
156169

157-
if (valueObject is not Dictionary<string, object> valueDictionary)
170+
if (valueObject is not Dictionary<string, object?> valueDictionary)
158171
{
159172
throw new WebDriverException($"The 'value' property is not a dictionary of <string, object>{Environment.NewLine}{value}");
160173
}
161174

162-
response.Value = valueDictionary;
163-
164-
if (!valueDictionary.TryGetValue("error", out var errorObject))
175+
if (!valueDictionary.TryGetValue("error", out object? errorObject))
165176
{
166177
throw new WebDriverException($"The 'value > error' property was not found in the response:{Environment.NewLine}{value}");
167178
}
@@ -171,11 +182,9 @@ public static Response FromErrorJson(string value)
171182
throw new WebDriverException($"The 'value > error' property is not a string{Environment.NewLine}{value}");
172183
}
173184

174-
response.Value = deserializedResponse["value"];
175-
176-
response.Status = WebDriverError.ResultFromError(errorString);
185+
WebDriverResult status = WebDriverError.ResultFromError(errorString);
177186

178-
return response;
187+
return new Response(sessionId: null, valueDictionary, status);
179188
}
180189

181190
/// <summary>

java/maven_install.json

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"__AUTOGENERATED_FILE_DO_NOT_MODIFY_THIS_FILE_MANUALLY": "THERE_IS_NO_DATA_ONLY_ZUUL",
3-
"__INPUT_ARTIFACTS_HASH": 1297759941,
4-
"__RESOLVED_ARTIFACTS_HASH": 641762335,
3+
"__INPUT_ARTIFACTS_HASH": 1913140966,
4+
"__RESOLVED_ARTIFACTS_HASH": -704556416,
55
"artifacts": {
66
"com.beust:jcommander": {
77
"shasums": {
@@ -124,10 +124,10 @@
124124
},
125125
"com.google.errorprone:error_prone_annotations": {
126126
"shasums": {
127-
"jar": "f3fc8a3a0a4020706a373b00e7f57c2512dd26d1f83d28c7d38768f8682b231e",
128-
"sources": "2936e9b315d790d8a6364f0574bcec9c8b2d78688b317e1765c4a16f9ef80632"
127+
"jar": "77440e270b0bc9a249903c5a076c36a722c4886ca4f42675f2903a1c53ed61a5",
128+
"sources": "7e117e0931cb2cb4226372af336189b49edb79969d120ec958a6df0beacb0612"
129129
},
130-
"version": "2.28.0"
130+
"version": "2.36.0"
131131
},
132132
"com.google.googlejavaformat:google-java-format": {
133133
"shasums": {
@@ -145,10 +145,10 @@
145145
},
146146
"com.google.guava:guava": {
147147
"shasums": {
148-
"jar": "4bf0e2c5af8e4525c96e8fde17a4f7307f97f8478f11c4c8e35a0e3298ae4e90",
149-
"sources": "b7cbdad958b791f2a036abff7724570bf9836531c460966f8a3d0df8eaa1c21d"
148+
"jar": "b918c98a7e44dbe94ebd9fe3e40cddaadb5a93e6a78eb6008b42df237241e538",
149+
"sources": "55ef6603b6ab1f6e3ae810b127561650ed682eb5f3fb50a212a658a74087b457"
150150
},
151-
"version": "33.3.1-jre"
151+
"version": "33.4.0-jre"
152152
},
153153
"com.google.guava:listenablefuture": {
154154
"shasums": {
@@ -214,24 +214,24 @@
214214
},
215215
"io.grpc:grpc-api": {
216216
"shasums": {
217-
"jar": "d88d815e07fe58a7572dda5d2823485b61706564f289a1e74281705d50ac2d5b",
218-
"sources": "791d817c56f03690df499020479e23494b79ab6ed578f4f50285d83d45a1f35d"
217+
"jar": "ffa9af0f76fb08b4dbcade9dba9805af6b216980cafa0756b4d97b6029077506",
218+
"sources": "e175c53977b6899c7be5a2e2007f79996d46c5512e852975cb4af663ffd84db9"
219219
},
220-
"version": "1.68.1"
220+
"version": "1.69.0"
221221
},
222222
"io.grpc:grpc-context": {
223223
"shasums": {
224-
"jar": "1df4f0310a7e7836bc2948afa95105f5ee27b5d468488aded74e7ff620359076",
225-
"sources": "6f5941f8531f6eea4ff922d2019757d06dc5857327ff9b9858ace45c0cf0ef8b"
224+
"jar": "e682d036496d4429442955b615b931ee65486bd318d0ab13d9937d11cb36ffd5",
225+
"sources": "a2ac5373e3f1021ec3f936b7c994b5fb94b391a8db24333825a0c081163d9efd"
226226
},
227-
"version": "1.68.1"
227+
"version": "1.69.0"
228228
},
229229
"io.lettuce:lettuce-core": {
230230
"shasums": {
231-
"jar": "ff26c28351becdaf6d5abe25d97ea799a986b1746bfe5f70659d1e53745b6f1a",
232-
"sources": "383337d6e56a97563c31f2d06838c85f8295662a5f7f72408bef5d59329cf98a"
231+
"jar": "59f6a591a631d844b355b831ee723bf6ce98d92f7a775de6b0690f0eb81480e7",
232+
"sources": "e9d835ed5b0583fbf01deabdb2c4ab370ac73166a4011aac5f1e2ca397914912"
233233
},
234-
"version": "6.5.1.RELEASE"
234+
"version": "6.5.2.RELEASE"
235235
},
236236
"io.netty:netty-buffer": {
237237
"shasums": {
@@ -550,10 +550,10 @@
550550
},
551551
"org.assertj:assertj-core": {
552552
"shasums": {
553-
"jar": "4c2f86418ff47ee6b67fbc6adb194e80219b793281b3bda28799d4425bc9a0bd",
554-
"sources": "6de83db9d76fc2baecefd0b9abbf94b18ceebf8442c6da961d8e8e78579d4386"
553+
"jar": "ab4ab885146bc5dfbdd4cdfb06f1ae72ec6b5e8139f0ccdabcbe51374aebac0d",
554+
"sources": "0c9a7b4a85f3609bf700ad13f4173cde85cadcdd8feb829e059a000a5b9aa932"
555555
},
556-
"version": "3.26.3"
556+
"version": "3.27.1"
557557
},
558558
"org.bouncycastle:bcpkix-jdk18on": {
559559
"shasums": {

0 commit comments

Comments
 (0)