Consistent use of ClassUtils.toClassArray (and related polishing)

This commit is contained in:
Juergen Hoeller
2018-02-22 14:27:57 +01:00
parent caed04473e
commit 8b071633d3
20 changed files with 110 additions and 104 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2016 the original author or authors.
* Copyright 2002-2018 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.
@@ -27,6 +27,7 @@ import org.springframework.context.annotation.Configuration;
import org.springframework.core.annotation.AnnotatedElementUtils;
import org.springframework.test.context.SmartContextLoader;
import org.springframework.util.Assert;
import org.springframework.util.ClassUtils;
/**
* Utility methods for {@link SmartContextLoader SmartContextLoaders} that deal
@@ -84,7 +85,7 @@ public abstract class AnnotationConfigContextLoaderUtils {
}
}
return configClasses.toArray(new Class<?>[configClasses.size()]);
return ClassUtils.toClassArray(configClasses);
}
/**