Delegate to common ClassUtils.getQualifiedName

Issue: SPR-15237
(cherry picked from commit 81aca78)
This commit is contained in:
Juergen Hoeller
2017-02-10 10:53:08 +01:00
parent eff285eb3b
commit 5f90a7eee9
2 changed files with 13 additions and 29 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2014 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.
@@ -48,6 +48,7 @@ public class ReflectionHelperTests extends AbstractExpressionTests {
public void testFormatHelperForClassName() {
assertEquals("java.lang.String",FormatHelper.formatClassNameForMessage(String.class));
assertEquals("java.lang.String[]",FormatHelper.formatClassNameForMessage(new String[1].getClass()));
assertEquals("java.lang.String[][]",FormatHelper.formatClassNameForMessage(new String[1][1].getClass()));
assertEquals("int[]",FormatHelper.formatClassNameForMessage(new int[1].getClass()));
assertEquals("int[][]",FormatHelper.formatClassNameForMessage(new int[1][2].getClass()));
assertEquals("null",FormatHelper.formatClassNameForMessage(null));
@@ -535,7 +536,7 @@ public class ReflectionHelperTests extends AbstractExpressionTests {
}
private List<TypeDescriptor> getTypeDescriptors(Class<?>... types) {
List<TypeDescriptor> typeDescriptors = new ArrayList<TypeDescriptor>(types.length);
List<TypeDescriptor> typeDescriptors = new ArrayList<>(types.length);
for (Class<?> type : types) {
typeDescriptors.add(TypeDescriptor.valueOf(type));
}