You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by el...@apache.org on 2020/08/12 17:32:03 UTC
[calcite-avatica] branch master updated: [CALCITE-4095] Update
Jetty to 9.4.31.v20200723
This is an automated email from the ASF dual-hosted git repository.
elserj pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/calcite-avatica.git
The following commit(s) were added to refs/heads/master by this push:
new 8618b05 [CALCITE-4095] Update Jetty to 9.4.31.v20200723
8618b05 is described below
commit 8618b05b566bce37580f89499ae9fc702b543c0e
Author: Peter Somogyi <ps...@cloudera.com>
AuthorDate: Wed Aug 12 13:38:29 2020 +0200
[CALCITE-4095] Update Jetty to 9.4.31.v20200723
Jetty upgrade also includes the migration to `SslContextFactory.Server` from `SslContextFactory`
Closes #125
---
gradle.properties | 2 +-
.../apache/calcite/avatica/server/HttpServer.java | 22 +++++++++++-----------
2 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/gradle.properties b/gradle.properties
index fb47ead..e122584 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -68,7 +68,7 @@ httpcore.version=4.4.11
jackson.version=2.10.0
jcip-annotations.version=1.0-1
jcommander.version=1.72
-jetty.version=9.4.15.v20190215
+jetty.version=9.4.31.v20200723
junit.version=4.12
kerby.version=1.1.1
mockito.version=2.23.4
diff --git a/server/src/main/java/org/apache/calcite/avatica/server/HttpServer.java b/server/src/main/java/org/apache/calcite/avatica/server/HttpServer.java
index 989a01b..f883b87 100644
--- a/server/src/main/java/org/apache/calcite/avatica/server/HttpServer.java
+++ b/server/src/main/java/org/apache/calcite/avatica/server/HttpServer.java
@@ -76,7 +76,7 @@ public class HttpServer {
private final AvaticaHandler handler;
private final AvaticaServerConfiguration config;
private final Subject subject;
- private final SslContextFactory sslFactory;
+ private final SslContextFactory.Server sslFactory;
private final List<ServerCustomizer<Server>> serverCustomizers;
private final int maxAllowedHeaderSize;
@@ -135,11 +135,11 @@ public class HttpServer {
* @param handler The Handler to run
* @param config Optional configuration for the server
* @param subject The javax.security Subject for the server, or null
- * @param sslFactory A configured SslContextFactory, or null
+ * @param sslFactory A configured SslContextFactory.Server, or null
*/
public HttpServer(int port, AvaticaHandler handler,
AvaticaServerConfiguration config, Subject subject,
- SslContextFactory sslFactory) {
+ SslContextFactory.Server sslFactory) {
this(port, handler, config, subject, sslFactory,
Collections.<ServerCustomizer<Server>>emptyList(),
MAX_ALLOWED_HEADER_SIZE);
@@ -151,11 +151,11 @@ public class HttpServer {
* @param handler The Handler to run
* @param config Optional configuration for the server
* @param subject The javax.security Subject for the server, or null
- * @param sslFactory A configured SslContextFactory, or null
+ * @param sslFactory A configured SslContextFactory.Server, or null
* @param maxAllowedHeaderSize A maximum size in bytes that are allowed in an HTTP header
*/
public HttpServer(int port, AvaticaHandler handler, AvaticaServerConfiguration config,
- Subject subject, SslContextFactory sslFactory, int maxAllowedHeaderSize) {
+ Subject subject, SslContextFactory.Server sslFactory, int maxAllowedHeaderSize) {
this(port, handler, config, subject, sslFactory,
Collections.<ServerCustomizer<Server>>emptyList(),
maxAllowedHeaderSize);
@@ -167,11 +167,11 @@ public class HttpServer {
* @param handler The Handler to run
* @param config Optional configuration for the server
* @param subject The javax.security Subject for the server, or null
- * @param sslFactory A configured SslContextFactory, or null
+ * @param sslFactory A configured SslContextFactory.Server, or null
* @param maxAllowedHeaderSize A maximum size in bytes that are allowed in an HTTP header
*/
private HttpServer(int port, AvaticaHandler handler, AvaticaServerConfiguration config,
- Subject subject, SslContextFactory sslFactory,
+ Subject subject, SslContextFactory.Server sslFactory,
List<ServerCustomizer<Server>> serverCustomizers, int maxAllowedHeaderSize) {
this.port = port;
this.handler = handler;
@@ -798,7 +798,7 @@ public class HttpServer {
throw new IllegalArgumentException("Unhandled AuthenticationType");
}
- SslContextFactory sslFactory = buildSSLContextFactory();
+ SslContextFactory.Server sslFactory = buildSSLContextFactory();
List<ServerCustomizer<Server>> jettyCustomizers = new ArrayList<>();
for (ServerCustomizer<?> customizer : this.serverCustomizers) {
@@ -810,10 +810,10 @@ public class HttpServer {
maxAllowedHeaderSize);
}
- protected SslContextFactory buildSSLContextFactory() {
- SslContextFactory sslFactory = null;
+ protected SslContextFactory.Server buildSSLContextFactory() {
+ SslContextFactory.Server sslFactory = null;
if (usingTLS) {
- sslFactory = new SslContextFactory();
+ sslFactory = new SslContextFactory.Server();
sslFactory.setKeyStorePath(this.keystore.getAbsolutePath());
sslFactory.setKeyStorePassword(keystorePassword);
sslFactory.setTrustStorePath(truststore.getAbsolutePath());