Simon Baslé
7f0ab22c47
Merge branch '6.1.x'
2024-03-07 12:10:07 +01:00
Simon Baslé
6d9a2eb9b8
Improve fix of duplicate upstream subscription during reactive cache put
...
This commit fixes an issue where a Cacheable method which returns a
Flux (or multi-value publisher) will be invoked once, but the returned
publisher is actually subscribed twice.
The previous fix 988f3630c
would cause the cached elements to depend on
the first usage pattern / request pattern, which is likely to be too
confusing to users. This fix reintroduces the notion of exhausting the
original Flux by having a second subscriber dedicated to that, but uses
`refCount(2)` to ensure that the original `Flux` returned by the cached
method is still only subscribed once.
Closes gh-32370
2024-03-07 12:08:28 +01:00
Juergen Hoeller
dc6c96de0a
Merge branch '6.1.x'
...
# Conflicts:
# spring-context-support/src/main/java/org/springframework/cache/jcache/interceptor/AbstractFallbackJCacheOperationSource.java
# spring-context/src/main/java/org/springframework/cache/interceptor/AbstractFallbackCacheOperationSource.java
# spring-tx/src/main/java/org/springframework/transaction/interceptor/AbstractFallbackTransactionAttributeSource.java
2024-03-04 22:50:22 +01:00
Juergen Hoeller
e9110c0729
Polishing
2024-03-04 22:48:52 +01:00
Juergen Hoeller
3d7ef3ebfc
Avoid storage of null marker per method for proxy decision purposes
...
Includes missing isCandidateClass support on JCacheOperationSource.
Closes gh-20072
2024-03-04 12:55:33 +01:00
Sam Brannen
a85bf3185e
Remove APIs deprecated for removal in 6.2
...
This commit removes the following obsolete and deprecated APIs.
- org.springframework.util.Base64Utils
- org.springframework.cache.jcache.interceptor.JCacheOperationSourcePointcut
- org.springframework.http.client.AbstractClientHttpResponse
- org.springframework.http.client.ClientHttpResponse.getRawStatusCode()
- org.springframework.http.client.observation.ClientHttpObservationDocumentation.HighCardinalityKeyNames.CLIENT_NAME
- org.springframework.web.reactive.function.client.ClientHttpObservationDocumentation.HighCardinalityKeyNames.CLIENT_NAME
- org.springframework.web.filter.reactive.ServerWebExchangeContextFilter.get(Context)
- org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler.handleBindException(...)
- org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver.handleBindException(...)
Closes gh-30608
2024-02-16 16:45:18 +01:00
Stéphane Nicoll
11c8b22c5a
Polish
2024-01-20 14:26:48 +01:00
Stéphane Nicoll
f5b0d9509d
Polish
2024-01-17 18:41:15 +01:00
Stéphane Nicoll
0c42965fc3
Polish
2024-01-15 11:17:19 +01:00
Stéphane Nicoll
4f599b7396
Polish
2024-01-04 14:49:45 +01:00
Yanming Zhou
3cddb0434d
Add missing @Test
...
See gh-31914
2023-12-28 11:38:03 +01:00
Juergen Hoeller
5f8a031c22
Introduce "spring.cache.reactivestreams.ignore" escape hatch
...
Closes gh-31861
2023-12-21 11:14:33 +01:00
Sam Brannen
c0683cd30b
Update copyright headers
2023-12-12 14:51:03 +01:00
Yanming Zhou
7b16ef90f1
Replace assertThat(x.equals(y)) with assertThat(x).isEqualTo(y)
...
Search for : assertThat\((.+)\.equals\((\w+)\)\)\.isTrue\(\)
Replace with : assertThat($1).isEqualTo($2)
Search for : assertThat\((.+)\.equals\((\w+)\)\)\.isFalse\(\)
Replace with : assertThat($1).isNotEqualTo($2)
Closes gh-31763
2023-12-06 09:50:15 +01:00
Yanming Zhou
e2852e7355
Replace assertThat(x.contains(y)).isTrue() with assertThat(x).contains(y)
...
Search for : assertThat\((.+)\.contains\((.+)\)\)\.isTrue\(\)
Replace with : assertThat($1).contains($2)
Search for : assertThat\((.+)\.contains\((.+)\)\)\.isFalse\(\)
Replace with : assertThat($1).doesNotContain($2)
Closes gh-31762
2023-12-06 09:48:49 +01:00
Yanming Zhou
785ad399e9
Replace assertThat(x.iterator().next()) with assertThat(x).element(0)
...
Search for : assertThat\((.+).iterator\(\).next\(\)\)
Replace with : assertThat($1).element(0)
2023-12-06 10:52:39 +08:00
Stéphane Nicoll
1da40b84e7
Polish "Use idiomatic AssertJ map assertions"
...
See gh-31752
2023-12-05 10:39:33 +01:00
Sam Brannen
6ea9fdbf77
Polishing
2023-11-30 19:04:59 +01:00
Juergen Hoeller
824bc09d11
Actual caching of null values in retrieve(key, valueLoader)
...
See gh-31637
2023-11-22 15:56:26 +01:00
Juergen Hoeller
e64b81eec4
Revised handling of allowNullValues for asynchronous retrieval
...
Includes revised cacheNames javadoc and equals/hashCode for SimpleValueWrapper.
See gh-31637
2023-11-22 12:22:13 +01:00
Juergen Hoeller
1410c466b7
Support for late-determined cache misses from retrieve(key)
...
Closes gh-31637
2023-11-21 23:11:34 +01:00
Stéphane Nicoll
dd97dee7fd
Polish
2023-11-13 19:33:09 +01:00
Johnny Lim
64e9fcad53
Apply SingleSpaceSeparator Checkstyle module
...
This commit also fixes its violations.
Closes gh-31469
2023-10-22 14:09:57 +02:00
Stéphane Nicoll
2fbcff8919
Prevent ValueLoaderEntryProcessor to be created for each get call
...
Closes gh-31250
2023-09-18 09:27:16 +02:00
Stéphane Nicoll
f79bc7b14d
Implement JCacheCache#putIfAbsent as atomic operation
...
This commit modifies putIfAbsent to use an EntryProcessor that
guarantees that the operation is atomic.
Closes gh-21591
2023-09-18 09:09:47 +02:00
Stéphane Nicoll
978c409d85
Polish contribution
...
See gh-23651
2023-09-15 10:25:16 +02:00
Rune Flobakk
f67fad4c14
Add default methods to MailSender and JavaMailSender when appropriate
...
send(..) -methods of JavaMailSenderImpl which is only delegating to
other methods are pulled up as default methods in the interfaces
JavaMailSender and MailSender, to make these interfaces require fewer
methods to implement.
See gh-23651
2023-09-15 10:25:06 +02:00
Stephane Nicoll
01f717375b
Introduce ObjectUtils#nullSafeHash(Object... element)
...
This commit deprecates the various nullSafeHashCode methods taking array
types as they are superseded by Arrays.hashCode now. This means that
the now only remaining nullSafeHashCode method does not trigger a
warning only if the target type is not an array. At the same time, there
are multiple use of this method on several elements, handling the
accumulation of hash codes.
For that reason, this commit also introduces a nullSafeHash that takes
an array of elements. The only difference between Objects.hash is that
this method handles arrays.
The codebase has been reviewed to use any of those two methods when it
is possible.
Closes gh-29051
2023-09-13 15:14:34 +02:00
Stephane Nicoll
2b76c4d847
Polish "Wrap ternary operator within parentheses"
...
See gh-31076
2023-08-22 15:40:16 +02:00
Juergen Hoeller
45c20e34e4
Merge branch '6.0.x'
...
# Conflicts:
# spring-context/src/test/java/org/springframework/context/annotation/PropertySourceAnnotationTests.java
2023-08-14 19:29:14 +02:00
Juergen Hoeller
2ce75dc415
Polishing
2023-08-14 19:28:19 +02:00
Juergen Hoeller
3804b1c602
Merge branch '6.0.x'
...
# Conflicts:
# spring-context/src/main/java/org/springframework/context/annotation/ClassPathBeanDefinitionScanner.java
# spring-core/src/main/java/org/springframework/core/ReactiveAdapterRegistry.java
# spring-r2dbc/src/test/java/org/springframework/r2dbc/connection/R2dbcTransactionManagerUnitTests.java
2023-08-06 14:26:55 +02:00
Juergen Hoeller
6e5af9dccb
Polishing
2023-08-06 14:25:39 +02:00
Sam Brannen
7c5b2db5bf
Suppress warnings in tests
2023-08-02 11:09:56 +03:00
Juergen Hoeller
d250a5155a
Consistent dependency declarations
2023-08-02 00:56:50 +02:00
Juergen Hoeller
3b1af692cc
Merge branch '6.0.x'
...
# Conflicts:
# spring-beans/spring-beans.gradle
# spring-context/spring-context.gradle
# spring-orm/spring-orm.gradle
# spring-test/spring-test.gradle
# spring-web/spring-web.gradle
# spring-webflux/spring-webflux.gradle
2023-08-02 01:04:31 +02:00
Sam Brannen
170d6bfdad
Clean up warnings in tests
2023-07-31 16:17:48 +03:00
Sam Brannen
81181c346a
Assert SimpleTriggerFactoryBean.setMisfireInstruction() values
...
See gh-30851
2023-07-31 16:08:47 +03:00
Sam Brannen
1378cce9fb
Assert CronTriggerFactoryBean.setMisfireInstruction() values
...
See gh-30851
2023-07-31 16:08:47 +03:00
Juergen Hoeller
3a9e0ea8a7
Polishing
2023-07-22 00:31:09 +02:00
Juergen Hoeller
ba46d2bf21
Polishing
2023-07-21 23:57:20 +02:00
Juergen Hoeller
4ce1ac0dcb
Polishing
2023-07-21 20:36:43 +02:00
Juergen Hoeller
f99faac073
Add caching annotation support for CompletableFuture and reactive return values
...
Includes CompletableFuture-based retrieve operations on Spring's Cache interface.
Includes support for retrieve operations on CaffeineCache and ConcurrentMapCache.
Includes async cache mode option on CaffeineCacheManager.
Closes gh-17559
Closes gh-17920
Closes gh-30122
2023-07-21 20:27:23 +02:00
Juergen Hoeller
25ea1f4c0f
Merge branch '6.0.x'
...
# Conflicts:
# spring-context/src/main/java/org/springframework/scheduling/support/CronSequenceGenerator.java
2023-07-19 00:37:06 +02:00
Juergen Hoeller
2f33e77ab4
Consistent equals/hashCode style (and related polishing)
2023-07-19 00:35:19 +02:00
Sam Brannen
28e63e9279
Polishing
2023-07-16 14:35:22 +02:00
Sam Brannen
11de70ed08
Update Javadoc for SimpleTriggerFactoryBean.setMisfireInstructionName()
...
org.quartz.Trigger#MISFIRE_INSTRUCTION_IGNORE_MISFIRE_POLICY is also
supported.
2023-07-16 14:34:42 +02:00
Sam Brannen
9283fd2162
Update Javadoc for CronTriggerFactoryBean.setMisfireInstructionName()
...
org.quartz.Trigger#MISFIRE_INSTRUCTION_IGNORE_MISFIRE_POLICY is also
supported.
2023-07-16 14:05:24 +02:00
Sam Brannen
d6230824cb
Stop using Constants utility in SimpleTriggerFactoryBean
...
See gh-30851
2023-07-16 15:00:11 +02:00
Sam Brannen
edba535c8b
Stop using Constants utility in CronTriggerFactoryBean
...
See gh-30851
2023-07-16 15:00:11 +02:00