diff --git a/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/core/convert/JdbcConverter.java b/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/core/convert/JdbcConverter.java index ae5b4aa23e..a78bed13f2 100644 --- a/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/core/convert/JdbcConverter.java +++ b/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/core/convert/JdbcConverter.java @@ -34,6 +34,7 @@ * versa. * * @author Jens Schauder + * @author Mark Paluch * @since 1.1 */ public interface JdbcConverter extends RelationalConverter { diff --git a/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/repository/query/JdbcQueryMethod.java b/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/repository/query/JdbcQueryMethod.java index 858f8565b0..0bca96a88f 100644 --- a/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/repository/query/JdbcQueryMethod.java +++ b/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/repository/query/JdbcQueryMethod.java @@ -52,6 +52,7 @@ * @author Moises Cisneros * @author Hebert Coelho * @author Diego Krupitza + * @author Mark Paluch */ public class JdbcQueryMethod extends QueryMethod { diff --git a/spring-data-relational/src/main/java/org/springframework/data/relational/core/mapping/DerivedSqlIdentifier.java b/spring-data-relational/src/main/java/org/springframework/data/relational/core/mapping/DerivedSqlIdentifier.java index 7bf01c48ae..c0ecd3d4a9 100644 --- a/spring-data-relational/src/main/java/org/springframework/data/relational/core/mapping/DerivedSqlIdentifier.java +++ b/spring-data-relational/src/main/java/org/springframework/data/relational/core/mapping/DerivedSqlIdentifier.java @@ -63,6 +63,7 @@ public SqlIdentifier transform(UnaryOperator transformationFunction) { @Override public String toSql(IdentifierProcessing processing) { + // using a local copy of volatile this.sqlName to ensure thread safety. CachedSqlName sqlName = this.sqlName; if (sqlName == null || sqlName.processing != processing) { diff --git a/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/DefaultSqlIdentifier.java b/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/DefaultSqlIdentifier.java index c2f5916fb7..973bf2ad9d 100644 --- a/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/DefaultSqlIdentifier.java +++ b/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/DefaultSqlIdentifier.java @@ -62,6 +62,7 @@ public SqlIdentifier transform(UnaryOperator transformationFunction) { @Override public String toSql(IdentifierProcessing processing) { + // using a local copy of volatile this.sqlName to ensure thread safety. CachedSqlName sqlName = this.sqlName; if (sqlName == null || sqlName.processing != processing) {