From d4fba783fbed07e727d43150517c36efd65494df Mon Sep 17 00:00:00 2001 From: Johnny Lim Date: Tue, 31 Jul 2018 14:31:38 +0900 Subject: [PATCH] Remove ex.printStackTrace() in tests Closes gh-13952 --- .../boot/devtools/livereload/LiveReloadServerTests.java | 1 - .../tunnel/server/SocketTargetServerConnectionTests.java | 1 - .../boot/context/properties/bind/CollectionBinderTests.java | 2 -- .../analyzer/BeanCurrentlyInCreationFailureAnalyzerTests.java | 1 - 4 files changed, 5 deletions(-) diff --git a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/livereload/LiveReloadServerTests.java b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/livereload/LiveReloadServerTests.java index 7fda28bb127..e0a1f461b60 100644 --- a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/livereload/LiveReloadServerTests.java +++ b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/livereload/LiveReloadServerTests.java @@ -188,7 +188,6 @@ public class LiveReloadServerTests { super.run(); } catch (ConnectionClosedException ex) { - ex.printStackTrace(); synchronized (MonitoredLiveReloadServer.this.monitor) { MonitoredLiveReloadServer.this.closedExceptions.add(ex); } diff --git a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/tunnel/server/SocketTargetServerConnectionTests.java b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/tunnel/server/SocketTargetServerConnectionTests.java index d9970494b4e..42634ffd894 100644 --- a/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/tunnel/server/SocketTargetServerConnectionTests.java +++ b/spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/tunnel/server/SocketTargetServerConnectionTests.java @@ -162,7 +162,6 @@ public class SocketTargetServerConnectionTests { channel.close(); } catch (Exception ex) { - ex.printStackTrace(); fail(); } } diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/CollectionBinderTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/CollectionBinderTests.java index 43e9712e35b..2bd86d5ea21 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/CollectionBinderTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/CollectionBinderTests.java @@ -124,7 +124,6 @@ public class CollectionBinderTests { fail("No exception thrown"); } catch (BindException ex) { - ex.printStackTrace(); Set unbound = ((UnboundConfigurationPropertiesException) ex .getCause()).getUnboundProperties(); assertThat(unbound).hasSize(1); @@ -147,7 +146,6 @@ public class CollectionBinderTests { fail("No exception thrown"); } catch (BindException ex) { - ex.printStackTrace(); Set unbound = ((UnboundConfigurationPropertiesException) ex .getCause()).getUnboundProperties(); assertThat(unbound).hasSize(1); diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/diagnostics/analyzer/BeanCurrentlyInCreationFailureAnalyzerTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/diagnostics/analyzer/BeanCurrentlyInCreationFailureAnalyzerTests.java index 15859fb5f66..324be5d5d03 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/diagnostics/analyzer/BeanCurrentlyInCreationFailureAnalyzerTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/diagnostics/analyzer/BeanCurrentlyInCreationFailureAnalyzerTests.java @@ -144,7 +144,6 @@ public class BeanCurrentlyInCreationFailureAnalyzerTests { return null; } catch (Exception ex) { - ex.printStackTrace(); return ex; } }