Skip to content

Commit c0c4298

Browse files
committed
Polishing
1 parent 61f89a1 commit c0c4298

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

spring-jdbc/src/main/java/org/springframework/jdbc/core/PreparedStatementCreatorFactory.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2022 the original author or authors.
2+
* Copyright 2002-2023 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -180,7 +180,7 @@ public PreparedStatementCreator newPreparedStatementCreator(@Nullable Object[] p
180180
*/
181181
public PreparedStatementCreator newPreparedStatementCreator(String sqlToUse, @Nullable Object[] params) {
182182
return new PreparedStatementCreatorImpl(
183-
sqlToUse, params != null ? Arrays.asList(params) : Collections.emptyList());
183+
sqlToUse, (params != null ? Arrays.asList(params) : Collections.emptyList()));
184184
}
185185

186186

spring-jdbc/src/test/java/org/springframework/jdbc/object/SqlUpdateTests.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,9 +211,8 @@ public void testUpdateAndGeneratedKeys() throws SQLException {
211211
given(resultSet.getObject(1)).willReturn(11);
212212
given(preparedStatement.executeUpdate()).willReturn(1);
213213
given(preparedStatement.getGeneratedKeys()).willReturn(resultSet);
214-
given(connection.prepareStatement(INSERT_GENERATE_KEYS,
215-
PreparedStatement.RETURN_GENERATED_KEYS)
216-
).willReturn(preparedStatement);
214+
given(connection.prepareStatement(INSERT_GENERATE_KEYS, PreparedStatement.RETURN_GENERATED_KEYS))
215+
.willReturn(preparedStatement);
217216

218217
GeneratedKeysUpdater pc = new GeneratedKeysUpdater();
219218
KeyHolder generatedKeyHolder = new GeneratedKeyHolder();
@@ -294,6 +293,7 @@ public void testNotRequiredRows() throws SQLException {
294293
pc::run);
295294
}
296295

296+
297297
private class Updater extends SqlUpdate {
298298

299299
public Updater() {

0 commit comments

Comments
 (0)