From 170de47ed84e598b1df40d9addf179f3228aae4e Mon Sep 17 00:00:00 2001 From: Kirill Mokevnin Date: Tue, 22 Aug 2023 18:43:29 -0400 Subject: [PATCH] polish Signed-off-by: Kirill Mokevnin --- src/main/java/org/example/hexlet/repository/CarRepository.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/example/hexlet/repository/CarRepository.java b/src/main/java/org/example/hexlet/repository/CarRepository.java index 2a6a4aa..5e24926 100644 --- a/src/main/java/org/example/hexlet/repository/CarRepository.java +++ b/src/main/java/org/example/hexlet/repository/CarRepository.java @@ -10,7 +10,7 @@ public class CarRepository extends BaseRepository { public static void save(Car car) throws SQLException { - String sql = "INSERT INTO cars (make, model) VALUES (?, ?)"; + var sql = "INSERT INTO cars (make, model) VALUES (?, ?)"; try (var conn = dataSource.getConnection(); var preparedStatement = conn.prepareStatement(sql, Statement.RETURN_GENERATED_KEYS)) { preparedStatement.setString(1, car.getMake());