Skip to content

Commit 53d1ed2

Browse files
ryanrupprwinch
authored andcommitted
Micro-optimization to try to right size the array
1 parent e670e13 commit 53d1ed2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spring-session-jdbc/src/main/java/org/springframework/session/jdbc/JdbcIndexedSessionRepository.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -907,7 +907,7 @@ private void save() {
907907
});
908908
}
909909
else {
910-
List<Runnable> deltaActions = new ArrayList<>();
910+
List<Runnable> deltaActions = JdbcSession.this.changed ? new ArrayList<>(4) : new ArrayList<>();
911911
if (JdbcSession.this.changed) {
912912
deltaActions.add(() -> {
913913
Map<String, String> indexes = JdbcIndexedSessionRepository.this.indexResolver

0 commit comments

Comments
 (0)