From e1a1e1205f3fc7063da128e48cb7ecfcaf896524 Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Thu, 10 Apr 2014 00:44:14 +0200 Subject: [PATCH] Simplify DefaultBootstrapContext.toString() --- .../test/context/DefaultBootstrapContext.java | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/spring-test/src/main/java/org/springframework/test/context/DefaultBootstrapContext.java b/spring-test/src/main/java/org/springframework/test/context/DefaultBootstrapContext.java index c0f4357158..117c7bc99e 100644 --- a/spring-test/src/main/java/org/springframework/test/context/DefaultBootstrapContext.java +++ b/spring-test/src/main/java/org/springframework/test/context/DefaultBootstrapContext.java @@ -60,19 +60,9 @@ class DefaultBootstrapContext implements BootstrapContext { @Override public String toString() { return new ToStringCreator(this)// - .append("testClass", testClass)// - .append("cacheAwareContextLoaderDelegate", nullSafeToString(cacheAwareContextLoaderDelegate))// + .append("testClass", testClass.getName())// + .append("cacheAwareContextLoaderDelegate", cacheAwareContextLoaderDelegate.getClass().getName())// .toString(); } - /** - * Generate a null-safe {@link String} representation of the supplied - * {@link CacheAwareContextLoaderDelegate} based solely on the fully qualified - * name of the delegate or "null" if the supplied delegate is - * {@code null}. - */ - private static String nullSafeToString(CacheAwareContextLoaderDelegate delegate) { - return delegate == null ? "null" : delegate.getClass().getName(); - } - }