You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Introduce caching for commonly used model computations.
We now cache the outcome for column types, AnnotatedType lookuop by annotation and bypass the conversion service by considering primitive type wrappers in the assignability check.
Closes#1218
Copy file name to clipboardExpand all lines: spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/convert/DefaultColumnTypeResolver.java
+26-1
Original file line number
Diff line number
Diff line change
@@ -22,6 +22,7 @@
22
22
importjava.util.Map;
23
23
importjava.util.Optional;
24
24
importjava.util.Set;
25
+
importjava.util.concurrent.ConcurrentHashMap;
25
26
importjava.util.function.Supplier;
26
27
importjava.util.stream.StreamSupport;
27
28
@@ -76,6 +77,8 @@ class DefaultColumnTypeResolver implements ColumnTypeResolver {
Copy file name to clipboardExpand all lines: spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/convert/MappingCassandraConverter.java
Copy file name to clipboardExpand all lines: spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/mapping/BasicCassandraPersistentProperty.java
+3-1
Original file line number
Diff line number
Diff line change
@@ -113,7 +113,9 @@ public CqlIdentifier getColumnName() {
113
113
this.columnName = determineColumnName();
114
114
}
115
115
116
-
Assert.state(this.columnName != null, () -> String.format("Cannot determine column name for %s", this));
116
+
if (columnName == null) {
117
+
thrownewIllegalStateException(String.format("Cannot determine column name for %s", this));
Copy file name to clipboardExpand all lines: spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/mapping/CachingCassandraPersistentProperty.java
0 commit comments