From a39c8bef41a433e72fe19d1d7eb6b96ea1052853 Mon Sep 17 00:00:00 2001 From: Artem Bilan Date: Fri, 6 Jan 2017 10:38:01 -0500 Subject: [PATCH] Fix compatibility with the latest SF https://build.spring.io/browse/INT-MJATS41-869 * Revert to `B-S` versions for SA * Since `MessagingException.toString()` now includes and `failedMessage` as well, a comparision with `TcpConnectionExceptionEvent.toString()` should be a bit different See https://jira.spring.io/browse/SPR-15091 --- build.gradle | 2 +- .../ip/tcp/connection/TcpSocketFactorySupport.java | 4 ++-- .../integration/ip/tcp/connection/ConnectionEventTests.java | 5 +++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/build.gradle b/build.gradle index d38107077c..f2a3c0a046 100644 --- a/build.gradle +++ b/build.gradle @@ -135,7 +135,7 @@ subprojects { subproject -> springSecurityVersion = '4.1.0.RELEASE' springSocialTwitterVersion = '1.1.2.RELEASE' springRetryVersion = '1.1.3.RELEASE' - springVersion = project.hasProperty('springVersion') ? project.springVersion : '4.3.5.RELEASE' + springVersion = project.hasProperty('springVersion') ? project.springVersion : '4.3.6.BUILD-SNAPSHOT' springWsVersion = '2.3.0.RELEASE' xmlUnitVersion = '1.6' xstreamVersion = '1.4.7' diff --git a/spring-integration-ip/src/main/java/org/springframework/integration/ip/tcp/connection/TcpSocketFactorySupport.java b/spring-integration-ip/src/main/java/org/springframework/integration/ip/tcp/connection/TcpSocketFactorySupport.java index 7e570f34ea..d19d2b341c 100644 --- a/spring-integration-ip/src/main/java/org/springframework/integration/ip/tcp/connection/TcpSocketFactorySupport.java +++ b/spring-integration-ip/src/main/java/org/springframework/integration/ip/tcp/connection/TcpSocketFactorySupport.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. @@ -33,7 +33,7 @@ public interface TcpSocketFactorySupport { /** * Supplies the {@link ServerSocketFactory} to be used to create new * {@link ServerSocket}s. - * @return the ServerSocketFacory + * @return the ServerSocketFactory */ ServerSocketFactory getServerSocketFactory(); diff --git a/spring-integration-ip/src/test/java/org/springframework/integration/ip/tcp/connection/ConnectionEventTests.java b/spring-integration-ip/src/test/java/org/springframework/integration/ip/tcp/connection/ConnectionEventTests.java index 78e012f633..fc9f4e249d 100644 --- a/spring-integration-ip/src/test/java/org/springframework/integration/ip/tcp/connection/ConnectionEventTests.java +++ b/spring-integration-ip/src/test/java/org/springframework/integration/ip/tcp/connection/ConnectionEventTests.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. @@ -117,7 +117,8 @@ public class ConnectionEventTests { assertNotNull(theEvent.get(0)); assertTrue(theEvent.get(0) instanceof TcpConnectionExceptionEvent); assertTrue(theEvent.get(0).toString().endsWith("[factory=foo, connectionId=" + conn.getConnectionId() + "]")); - assertThat(theEvent.get(0).toString(), containsString("RuntimeException: foo]")); + assertThat(theEvent.get(0).toString(), + containsString("RuntimeException: foo, failedMessage=GenericMessage [payload=bar")); TcpConnectionExceptionEvent event = (TcpConnectionExceptionEvent) theEvent.get(0); assertNotNull(event.getCause()); assertSame(toBeThrown, event.getCause().getCause());