diff --git a/build.gradle b/build.gradle index f5940c99ad..59c131deb2 100644 --- a/build.gradle +++ b/build.gradle @@ -124,8 +124,8 @@ subprojects { subproject -> mysqlVersion = '5.1.41' pahoMqttClientVersion = '1.1.1' postgresVersion = '42.0.0' - reactorNettyVersion = '0.6.4.RELEASE' - reactorVersion = '3.1.0.M2' + reactorNettyVersion = '0.7.0.BUILD-SNAPSHOT' + reactorVersion = '3.1.0.BUILD-SNAPSHOT' romeToolsVersion = '1.7.2' servletApiVersion = '3.1.0' slf4jVersion = "1.7.25" @@ -135,7 +135,7 @@ subprojects { subproject -> springDataMongoVersion = '2.0.0.M4' springDataRedisVersion = '2.0.0.M4' springGemfireVersion = '2.0.0.M4' - springSecurityVersion = '5.0.0.M2' + springSecurityVersion = '5.0.0.BUILD-SNAPSHOT' springSocialTwitterVersion = '2.0.0.M2' springRetryVersion = '1.2.0.RELEASE' springVersion = project.hasProperty('springVersion') ? project.springVersion : '5.0.0.BUILD-SNAPSHOT' @@ -310,7 +310,7 @@ project('spring-integration-core') { compile("com.esotericsoftware:kryo-shaded:$kryoShadedVersion", optional) testCompile ("org.aspectj:aspectjweaver:$aspectjVersion") - compile "io.projectreactor:reactor-test:$reactorVersion" + testCompile "io.projectreactor:reactor-test:$reactorVersion" } } @@ -341,6 +341,7 @@ project('spring-integration-file') { testCompile "org.apache.derby:derby:$derbyVersion" testCompile "org.apache.derby:derbyclient:$derbyVersion" testCompile "redis.clients:jedis:$jedisVersion" + testCompile "io.projectreactor:reactor-test:$reactorVersion" } } @@ -399,6 +400,7 @@ project('spring-integration-http') { testCompile project(":spring-integration-security") testCompile "org.springframework.security:spring-security-config:$springSecurityVersion" testCompile "org.springframework.security:spring-security-test:$springSecurityVersion" + testCompile "io.projectreactor:reactor-test:$reactorVersion" } } diff --git a/spring-integration-http/src/main/java/org/springframework/integration/http/support/DefaultHttpHeaderMapper.java b/spring-integration-http/src/main/java/org/springframework/integration/http/support/DefaultHttpHeaderMapper.java index d1b1158b22..afd0c16658 100644 --- a/spring-integration-http/src/main/java/org/springframework/integration/http/support/DefaultHttpHeaderMapper.java +++ b/spring-integration-http/src/main/java/org/springframework/integration/http/support/DefaultHttpHeaderMapper.java @@ -368,9 +368,11 @@ public class DefaultHttpHeaderMapper implements HeaderMapper, BeanF * mapping outbound endpoint request headers. * @param excludedOutboundStandardRequestHeaderNames the excludedStandardRequestHeaderNames to set */ - public void setExcludedOutboundStandardRequestHeaderNames(String[] excludedOutboundStandardRequestHeaderNames) { + public void setExcludedOutboundStandardRequestHeaderNames(String... excludedOutboundStandardRequestHeaderNames) { Assert.notNull(excludedOutboundStandardRequestHeaderNames, "'excludedOutboundStandardRequestHeaderNames' must not be null"); + Assert.noNullElements(excludedOutboundStandardRequestHeaderNames, + "'excludedOutboundStandardRequestHeaderNames' must not have null elements"); this.excludedOutboundStandardRequestHeaderNames = Arrays.copyOf(excludedOutboundStandardRequestHeaderNames, excludedOutboundStandardRequestHeaderNames.length); } @@ -380,9 +382,11 @@ public class DefaultHttpHeaderMapper implements HeaderMapper, BeanF * mapping inbound endpoint response headers. * @param excludedInboundStandardResponseHeaderNames the excludedStandardResponseHeaderNames to set */ - public void setExcludedInboundStandardResponseHeaderNames(String[] excludedInboundStandardResponseHeaderNames) { + public void setExcludedInboundStandardResponseHeaderNames(String... excludedInboundStandardResponseHeaderNames) { Assert.notNull(excludedInboundStandardResponseHeaderNames, "'excludedInboundStandardResponseHeaderNames' must not be null"); + Assert.noNullElements(excludedInboundStandardResponseHeaderNames, + "'excludedInboundStandardResponseHeaderNames' must not have null elements"); this.excludedInboundStandardResponseHeaderNames = Arrays.copyOf(excludedInboundStandardResponseHeaderNames, excludedInboundStandardResponseHeaderNames.length); } diff --git a/spring-integration-http/src/test/java/org/springframework/integration/http/support/DefaultHttpHeaderMapperFromMessageOutboundTests.java b/spring-integration-http/src/test/java/org/springframework/integration/http/support/DefaultHttpHeaderMapperFromMessageOutboundTests.java index 58ce6bb5db..e459c27e12 100644 --- a/spring-integration-http/src/test/java/org/springframework/integration/http/support/DefaultHttpHeaderMapperFromMessageOutboundTests.java +++ b/spring-integration-http/src/test/java/org/springframework/integration/http/support/DefaultHttpHeaderMapperFromMessageOutboundTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 the original author or authors. + * Copyright 2002-2017 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. @@ -50,6 +50,7 @@ import org.springframework.util.StopWatch; * @author Mark Fisher * @author Gunnar Hillert * @author Artem Bilan + * @author Gary Russell * @since 2.0.1 */ public class DefaultHttpHeaderMapperFromMessageOutboundTests { @@ -685,7 +686,7 @@ public class DefaultHttpHeaderMapperFromMessageOutboundTests { public void dontPropagateContentLength() { DefaultHttpHeaderMapper mapper = DefaultHttpHeaderMapper.outboundMapper(); // not suppressed on outbound request, by default - mapper.setExcludedOutboundStandardRequestHeaderNames(new String[] {"Content-Length"}); + mapper.setExcludedOutboundStandardRequestHeaderNames("Content-Length"); Map messageHeaders = new HashMap(); messageHeaders.put("Content-Length", 4);