From 9277792d87fbd2e1c668ca0123c8baeba9e50f47 Mon Sep 17 00:00:00 2001 From: Tran Ngoc Nhan Date: Sat, 21 Sep 2024 10:44:46 +0700 Subject: [PATCH] Polishing. Original pull request #1894 --- .../jdbc/repository/support/SimpleJdbcRepositoryUnitTests.java | 2 +- .../org/springframework/data/r2dbc/dialect/OracleDialect.java | 2 +- .../springframework/data/r2dbc/dialect/SqlServerDialect.java | 2 +- .../data/relational/core/dialect/AbstractDialect.java | 2 +- .../data/relational/core/sql/render/InVisitor.java | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/spring-data-jdbc/src/test/java/org/springframework/data/jdbc/repository/support/SimpleJdbcRepositoryUnitTests.java b/spring-data-jdbc/src/test/java/org/springframework/data/jdbc/repository/support/SimpleJdbcRepositoryUnitTests.java index d551c856dc6..f3219cf67d7 100644 --- a/spring-data-jdbc/src/test/java/org/springframework/data/jdbc/repository/support/SimpleJdbcRepositoryUnitTests.java +++ b/spring-data-jdbc/src/test/java/org/springframework/data/jdbc/repository/support/SimpleJdbcRepositoryUnitTests.java @@ -42,7 +42,7 @@ public class SimpleJdbcRepositoryUnitTests { @Test // DATAJDBC-252 public void saveReturnsEntityProducedByOperations() { - SimpleJdbcRepository repository = new SimpleJdbcRepository<>(operations, entity,converter); + SimpleJdbcRepository repository = new SimpleJdbcRepository<>(operations, entity, converter); Sample expected = new Sample(); doReturn(expected).when(operations).save(any()); diff --git a/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/dialect/OracleDialect.java b/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/dialect/OracleDialect.java index 1a9b248f2b5..3a4011305b1 100644 --- a/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/dialect/OracleDialect.java +++ b/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/dialect/OracleDialect.java @@ -53,7 +53,7 @@ private static String filterBindMarker(CharSequence input) { } } - if (builder.length() == 0) { + if (builder.isEmpty()) { return ""; } diff --git a/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/dialect/SqlServerDialect.java b/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/dialect/SqlServerDialect.java index 9ab9eb13e81..d2d5d83893c 100644 --- a/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/dialect/SqlServerDialect.java +++ b/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/dialect/SqlServerDialect.java @@ -50,7 +50,7 @@ private static String filterBindMarker(CharSequence input) { } } - if (builder.length() == 0) { + if (builder.isEmpty()) { return ""; } diff --git a/spring-data-relational/src/main/java/org/springframework/data/relational/core/dialect/AbstractDialect.java b/spring-data-relational/src/main/java/org/springframework/data/relational/core/dialect/AbstractDialect.java index 62686ceb04f..516a29899c8 100644 --- a/spring-data-relational/src/main/java/org/springframework/data/relational/core/dialect/AbstractDialect.java +++ b/spring-data-relational/src/main/java/org/springframework/data/relational/core/dialect/AbstractDialect.java @@ -196,7 +196,7 @@ enum PrependWithLeadingWhitespace implements Function