From d12662021608356a511cf7eb713ed369ac30a5c4 Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Sun, 16 Jun 2013 00:38:56 +0200 Subject: [PATCH] Remove superfluous not-null check in ContextLoaderUtils --- .../test/context/ContextLoaderUtils.java | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/spring-test/src/main/java/org/springframework/test/context/ContextLoaderUtils.java b/spring-test/src/main/java/org/springframework/test/context/ContextLoaderUtils.java index 3fb2b0a6e7..92f5e2c764 100644 --- a/spring-test/src/main/java/org/springframework/test/context/ContextLoaderUtils.java +++ b/spring-test/src/main/java/org/springframework/test/context/ContextLoaderUtils.java @@ -502,15 +502,13 @@ abstract class ContextLoaderUtils { throw new IllegalStateException(msg, e); } - if (resolver != null) { - profiles = resolver.resolve(declaringClass); - if (profiles == null) { - String msg = String.format( - "ActiveProfilesResolver [%s] returned a null array of bean definition profiles.", - resolverClass.getName()); - logger.error(msg); - throw new IllegalStateException(msg); - } + profiles = resolver.resolve(declaringClass); + if (profiles == null) { + String msg = String.format( + "ActiveProfilesResolver [%s] returned a null array of bean definition profiles.", + resolverClass.getName()); + logger.error(msg); + throw new IllegalStateException(msg); } } else if (valueDeclared) {