diff options
Diffstat (limited to 'spring-jdbc/src/test/java/org/springframework/jdbc/core/JdbcTemplateTests.java')
-rw-r--r-- | spring-jdbc/src/test/java/org/springframework/jdbc/core/JdbcTemplateTests.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/spring-jdbc/src/test/java/org/springframework/jdbc/core/JdbcTemplateTests.java b/spring-jdbc/src/test/java/org/springframework/jdbc/core/JdbcTemplateTests.java index b98b77c3..4e8b2cea 100644 --- a/spring-jdbc/src/test/java/org/springframework/jdbc/core/JdbcTemplateTests.java +++ b/spring-jdbc/src/test/java/org/springframework/jdbc/core/JdbcTemplateTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2017 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. @@ -51,6 +51,7 @@ import org.springframework.jdbc.support.SQLStateSQLExceptionTranslator; import org.springframework.jdbc.support.nativejdbc.NativeJdbcExtractor; import org.springframework.jdbc.support.nativejdbc.NativeJdbcExtractorAdapter; import org.springframework.util.LinkedCaseInsensitiveMap; +import org.springframework.util.StringUtils; import static org.hamcrest.Matchers.*; import static org.junit.Assert.*; @@ -229,7 +230,7 @@ public class JdbcTemplateTests { this.list.add(rs.getString(1)); } public String[] getStrings() { - return this.list.toArray(new String[this.list.size()]); + return StringUtils.toStringArray(this.list); } } |