From 1b181b2f3493e343ac5eb558342aa60a3620e1a0 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Tue, 27 Jun 2017 14:38:02 +0200 Subject: [PATCH] Upgrade to Tomcat 8.5.16 This commit uses the replacement for deprecated APIs in 8.5.16 to ease a forward compatibility with Tomcat 9 Closes gh-9611 --- .../web/servlet/DefaultServletWebServerFactoryCustomizer.java | 2 +- .../servlet/DefaultServletWebServerFactoryCustomizerTests.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/DefaultServletWebServerFactoryCustomizer.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/DefaultServletWebServerFactoryCustomizer.java index 3861215987..d7fe68ced3 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/DefaultServletWebServerFactoryCustomizer.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/DefaultServletWebServerFactoryCustomizer.java @@ -276,7 +276,7 @@ public class DefaultServletWebServerFactoryCustomizer ProtocolHandler handler = connector.getProtocolHandler(); if (handler instanceof AbstractProtocol) { AbstractProtocol protocol = (AbstractProtocol) handler; - protocol.setBacklog(acceptCount); + protocol.setAcceptCount(acceptCount); } } diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/DefaultServletWebServerFactoryCustomizerTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/DefaultServletWebServerFactoryCustomizerTests.java index 8becf80eca..ff31665c23 100644 --- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/DefaultServletWebServerFactoryCustomizerTests.java +++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/DefaultServletWebServerFactoryCustomizerTests.java @@ -352,7 +352,7 @@ public class DefaultServletWebServerFactoryCustomizerTests { embeddedFactory.start(); try { assertThat(((AbstractProtocol) embeddedFactory.getTomcat().getConnector() - .getProtocolHandler()).getBacklog()).isEqualTo(10); + .getProtocolHandler()).getAcceptCount()).isEqualTo(10); } finally { embeddedFactory.stop();