From e81f7d58118ebc44b511c4f62b1f2b66dfcab542 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Fri, 25 Nov 2016 10:10:55 +0100 Subject: [PATCH] Remove deprecated code See gh-7362 --- .../autoconfigure/web/ServerProperties.java | 19 -------------- .../web/ServerPropertiesTests.java | 25 ------------------- 2 files changed, 44 deletions(-) diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ServerProperties.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ServerProperties.java index 20eea271cc..db89aa46b2 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ServerProperties.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ServerProperties.java @@ -145,11 +145,6 @@ public class ServerProperties */ private int maxHttpHeaderSize = 0; // bytes - /** - * Maximum size in bytes of the HTTP post content. - */ - private int maxHttpPostSize = 0; // bytes - /** * Time in milliseconds that connectors will wait for another HTTP request before * closing the connection. When not set, the connector's container-specific default @@ -362,20 +357,6 @@ public class ServerProperties this.maxHttpHeaderSize = maxHttpHeaderSize; } - @Deprecated - @DeprecatedConfigurationProperty(reason = "Use dedicated property for each container.") - public int getMaxHttpPostSize() { - return this.maxHttpPostSize; - } - - @Deprecated - public void setMaxHttpPostSize(int maxHttpPostSize) { - this.maxHttpPostSize = maxHttpPostSize; - this.jetty.setMaxHttpPostSize(maxHttpPostSize); - this.tomcat.setMaxHttpPostSize(maxHttpPostSize); - this.undertow.setMaxHttpPostSize(maxHttpPostSize); - } - protected final boolean getOrDeduceUseForwardHeaders() { if (this.useForwardHeaders != null) { return this.useForwardHeaders; diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/ServerPropertiesTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/ServerPropertiesTests.java index 0753f83632..606800efea 100644 --- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/ServerPropertiesTests.java +++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/ServerPropertiesTests.java @@ -305,16 +305,6 @@ public class ServerPropertiesTests { assertThat(this.properties.getMaxHttpHeaderSize()).isEqualTo(9999); } - @Test - public void testCustomizePostSize() throws Exception { - Map map = new HashMap(); - map.put("server.maxHttpPostSize", "9999"); - bindProperties(map); - assertThat(this.properties.getJetty().getMaxHttpPostSize()).isEqualTo(9999); - assertThat(this.properties.getTomcat().getMaxHttpPostSize()).isEqualTo(9999); - assertThat(this.properties.getUndertow().getMaxHttpPostSize()).isEqualTo(9999); - } - @Test public void testCustomizeJettyAcceptors() throws Exception { Map map = new HashMap(); @@ -492,21 +482,6 @@ public class ServerPropertiesTests { .isEqualTo(10000); } - @Test - @Deprecated - public void customTomcatMaxHttpPostSizeWithDeprecatedProperty() { - Map map = new HashMap(); - map.put("server.max-http-post-size", "2000"); - bindProperties(map); - - TomcatEmbeddedServletContainerFactory container = new TomcatEmbeddedServletContainerFactory(); - this.properties.customize(container); - TomcatEmbeddedServletContainer embeddedContainer = (TomcatEmbeddedServletContainer) container - .getEmbeddedServletContainer(); - assertThat(embeddedContainer.getTomcat().getConnector().getMaxPostSize()) - .isEqualTo(2000); - } - @Test public void customizeUndertowAccessLog() { Map map = new HashMap();