Skip to content

Commit 094eb3e

Browse files
committed
Use varargs for array elements
See gh-1850
1 parent 3fed2ec commit 094eb3e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

spring-jdbc/src/main/java/org/springframework/jdbc/support/SqlArrayValue.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@
2828
* Common {@link SqlValue} implementation for JDBC {@link Array} creation
2929
* based on the JDBC 4 {@link java.sql.Connection#createArrayOf} method.
3030
*
31-
* <p>Also serves as a template for custom {@link SqlValue} implementations.
31+
* <p>Also serves as a template for custom {@link SqlValue} implementations
32+
* with cleanup demand.
3233
*
3334
* @author Juergen Hoeller
3435
* @author Philippe Marschall
@@ -50,7 +51,7 @@ public class SqlArrayValue implements SqlValue {
5051
* @param elements the elements to populate the {@code Array} object with
5152
* @see java.sql.Connection#createArrayOf
5253
*/
53-
public SqlArrayValue(String typeName, Object[] elements) {
54+
public SqlArrayValue(String typeName, Object... elements) {
5455
Assert.notNull(typeName, "Type name must not be null");
5556
Assert.notNull(elements, "Elements array must not be null");
5657
this.typeName = typeName;

0 commit comments

Comments
 (0)