提交 acb2aec3 编写于 作者: J Juergen Hoeller

Compatibility with HtmlUnit 2.51

Includes upgrade to Tomcat 9.0.50, Jetty 9.4.43, Jackson 2.12.4.

Closes gh-27147
上级 297880d9
......@@ -27,12 +27,12 @@ configure(allprojects) { project ->
dependencyManagement {
imports {
mavenBom "com.fasterxml.jackson:jackson-bom:2.12.3"
mavenBom "com.fasterxml.jackson:jackson-bom:2.12.4"
mavenBom "io.netty:netty-bom:4.1.65.Final"
mavenBom "io.projectreactor:reactor-bom:2020.0.8"
mavenBom "io.r2dbc:r2dbc-bom:Arabba-SR10"
mavenBom "io.rsocket:rsocket-bom:1.1.1"
mavenBom "org.eclipse.jetty:jetty-bom:9.4.42.v20210604"
mavenBom "org.eclipse.jetty:jetty-bom:9.4.43.v20210629"
mavenBom "org.jetbrains.kotlin:kotlin-bom:1.5.10"
mavenBom "org.jetbrains.kotlinx:kotlinx-coroutines-bom:1.5.0"
mavenBom "org.jetbrains.kotlinx:kotlinx-serialization-bom:1.2.1"
......@@ -127,14 +127,14 @@ configure(allprojects) { project ->
dependency "org.webjars:webjars-locator-core:0.47"
dependency "org.webjars:underscorejs:1.8.3"
dependencySet(group: 'org.apache.tomcat', version: '9.0.48') {
dependencySet(group: 'org.apache.tomcat', version: '9.0.50') {
entry 'tomcat-util'
entry('tomcat-websocket') {
exclude group: "org.apache.tomcat", name: "tomcat-websocket-api"
exclude group: "org.apache.tomcat", name: "tomcat-servlet-api"
}
}
dependencySet(group: 'org.apache.tomcat.embed', version: '9.0.48') {
dependencySet(group: 'org.apache.tomcat.embed', version: '9.0.50') {
entry 'tomcat-embed-core'
entry 'tomcat-embed-websocket'
}
......@@ -204,10 +204,10 @@ configure(allprojects) { project ->
}
dependency "io.mockk:mockk:1.11.0"
dependency("net.sourceforge.htmlunit:htmlunit:2.50.0") {
dependency("net.sourceforge.htmlunit:htmlunit:2.51.0") {
exclude group: "commons-logging", name: "commons-logging"
}
dependency("org.seleniumhq.selenium:htmlunit-driver:2.50.0") {
dependency("org.seleniumhq.selenium:htmlunit-driver:2.51.0") {
exclude group: "commons-logging", name: "commons-logging"
}
dependency("org.seleniumhq.selenium:selenium-java:3.141.59") {
......
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -22,7 +22,6 @@ import com.gargoylesoftware.htmlunit.WebConnection;
import org.openqa.selenium.Capabilities;
import org.openqa.selenium.htmlunit.HtmlUnitDriver;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert;
/**
......@@ -35,15 +34,12 @@ import org.springframework.util.Assert;
*
* @author Rob Winch
* @author Sam Brannen
* @author Juergen Hoeller
* @since 4.2
* @see MockMvcHtmlUnitDriverBuilder
*/
public class WebConnectionHtmlUnitDriver extends HtmlUnitDriver {
@Nullable
private WebClient webClient;
public WebConnectionHtmlUnitDriver() {
}
......@@ -72,9 +68,7 @@ public class WebConnectionHtmlUnitDriver extends HtmlUnitDriver {
*/
@Override
protected final WebClient modifyWebClient(WebClient webClient) {
this.webClient = super.modifyWebClient(webClient);
this.webClient = modifyWebClientInternal(this.webClient);
return this.webClient;
return modifyWebClientInternal(super.modifyWebClient(webClient));
}
/**
......@@ -90,13 +84,12 @@ public class WebConnectionHtmlUnitDriver extends HtmlUnitDriver {
}
/**
* Return the current {@link WebClient}.
* Return the current {@link WebClient} in a public fashion.
* @since 4.3
*/
@Override
public WebClient getWebClient() {
Assert.state(this.webClient != null, "No WebClient set");
return this.webClient;
return super.getWebClient();
}
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册