Commit Graph

25526 Commits

Author SHA1 Message Date
Juergen Hoeller
7f1990e64e Merge branch '5.3.x' 2022-10-19 16:27:03 +02:00
rstoyanchev
d4f7484252 Add Builder to RSocketServiceProxyFactory
RSocketServiceProxyFactory now support programmatic initialization
through a builder, while bean-style initialization is deprecated.

Closes gh-29296
2022-10-19 14:36:45 +01:00
Juergen Hoeller
4c38777064 Explain logger name semantics (see AbstractTraceInterceptor.setLoggerName)
See gh-28678
2022-10-19 14:49:27 +02:00
rstoyanchev
bd59c7a691 Polishing contribution
Closes gh-29310
2022-10-19 13:22:38 +01:00
Vedran Pavic
fb291379e4 Avoid use of Commons Logging in LoggingCacheErrorHandler public API
At present, creating LoggingCacheErrorHandler with custom logger requires use of Commons Logging API, as the appropriate constructor expects org.apache.commons.logging.Log instance. As Commons Logging is rarely the logging framework of choice in applications these days, interaction with its API might not be desirable.

This commit adds LoggingCacheErrorHandler constructor that accepts logger name and thus avoids leaking out any details about the underlying logging framework.
2022-10-19 13:48:59 +02:00
Violeta Georgieva
997d1b3d7e Enable leak detection in Netty 5 tests
See gh-29310
2022-10-19 12:07:40 +01:00
Brian Clozel
57bbc09fca Do not set response status in ServerHttpObservationFilter
Prior to this commit, the `ServerHttpObservationFilter` would set the
response status (and possibly overwrite it) in case an exception is
found as an attribute.
While the exception itself should be used in the observation, the filter
should have no side effect on the response.

Fixes gh-29353
2022-10-19 12:11:00 +02:00
Arjen Poutsma
f99c02fc94 Upgrade to Jackson 2.14.0-rc2
This commit upgrades Jackson to 2.14.0-rc2, and uses the new
ByteBufferFeeder in Jackson2Tokenizer.

Unfortunately, because of https://github.com/FasterXML/jackson-core/issues/478,
we had to change the CompilerConventions to suppress class file warnings.

Closes gh-29343
2022-10-19 11:05:40 +02:00
Sébastien Deleuze
aa776e40f9 Ensure classpath checks can be evaluated at build-time
Closes gh-29352
2022-10-19 10:49:11 +02:00
Juergen Hoeller
6b6cf1b4a2 Avoid decorated definition bypass for scoped proxy determination
GenericApplicationContext registers proxy hints without any SmartInstantiationAwareBeanPostProcessor involved as well.

Closes gh-29335
2022-10-19 09:55:47 +02:00
Johnny Lim
5dca43ebd6 Use KeyValue.NONE_VALUE where possible
See https://github.com/micrometer-metrics/micrometer/issues/3458

Closes gh-29342
2022-10-19 09:32:57 +02:00
Juergen Hoeller
b7ee7975dc Merge branch '5.3.x'
# Conflicts:
#	build.gradle
#	spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/NamedParameterUtils.java
#	spring-jdbc/src/test/java/org/springframework/jdbc/core/namedparam/NamedParameterUtilsTests.java
#	spring-r2dbc/src/main/java/org/springframework/r2dbc/core/NamedParameterUtils.java
#	spring-r2dbc/src/test/java/org/springframework/r2dbc/core/NamedParameterUtilsUnitTests.java
2022-10-18 23:11:06 +02:00
Juergen Hoeller
182ba4ac29 Upgrade to Checkstyle 10.3.4 2022-10-18 23:05:10 +02:00
Juergen Hoeller
dbcfeb8f4f Aligned with PathMatchingResourcePatternResolverTests on main
See gh-29333
2022-10-18 23:04:44 +02:00
Juergen Hoeller
6f64cfd1e5 Test square brackets with index/key expressions
See gh-27925
2022-10-18 23:04:23 +02:00
Sébastien Deleuze
e0129a3631 Register reflection hints for JPA persistence callbacks
Closes gh-29348
2022-10-18 22:52:47 +02:00
Juergen Hoeller
d4fac82d68 Preserve square brackets for index/key expressions
Closes gh-27925
2022-10-18 22:39:53 +02:00
Phillip Webb
327eec09ae Allow TestCompiler DynamicClassLoader to resolve '.class' resources
Update `DynamicClassLoader` so that `findResource(...)` also considered
compiled class bytecode.

Closes gh-29347
2022-10-18 11:14:57 -07:00
Juergen Hoeller
d17cdf98bb Restore directory matching (explicitly excluding root path itself)
Closes gh-29333
2022-10-18 19:29:29 +02:00
Sébastien Deleuze
d89865ad67 Check @RegisterReflectionForBinding specifies at least one class
Closes gh-29346
2022-10-18 19:07:54 +02:00
Sébastien Deleuze
03039fcc00 Refine @RegisterReflectionForBinding Javadoc
Provide a better Javadoc to clarify that @RegisterReflectionForBinding
should annotate a bean and that the types where reflection is needed
should be specified in the annotation attributes.

Closes gh-29345
2022-10-18 19:07:54 +02:00
Juergen Hoeller
a3a48a241c Disable array allocation in case of no constructor resolution
Closes gh-28808
2022-10-18 18:59:37 +02:00
Juergen Hoeller
311048726e Upgrade to Derby 10.16
Closes gh-29344
2022-10-18 18:29:15 +02:00
Stephane Nicoll
82a0154bd1 Expose a system property when AOT processing is running
This commit exposes a "spring.aot.processing" system property when the
AOT engine is running. This can be used by code that need to react
differently when the application is being refreshed for AOT processing.

Closes gh-29340
2022-10-18 18:18:43 +02:00
Sam Brannen
004875670b Merge branch '5.3.x'
# Conflicts:
#	spring-core/src/test/java/org/springframework/core/io/support/PathMatchingResourcePatternResolverTests.java
2022-10-18 18:00:44 +02:00
Sam Brannen
652781c4a1 Test status quo in 5.3.x for PathMatchingResourcePatternResolver
See gh-29333
2022-10-18 17:51:29 +02:00
Sam Brannen
eadb003a8d Introduce builder API for AOT processor Settings
Closes gh-29341
2022-10-18 16:33:16 +02:00
Juergen Hoeller
cb44e09694 Merge branch '5.3.x' 2022-10-18 16:24:35 +02:00
Juergen Hoeller
8e25e32eb8 Polishing 2022-10-18 16:17:30 +02:00
Juergen Hoeller
4b0bf16389 Select ambiguous write method based on read method (matching its return type)
Also avoids unnecessary checks in name-based PropertyDescriptor constructor.

See gh-29320
2022-10-18 16:17:03 +02:00
Stephane Nicoll
6d688e196d Restore support of list of inner bean definitions
This commit restores the support of multiple bean definitions being
specified in a `List` as a property value or constructor argument.

Rather than handling inner bean definitions externally, there are now
supported by BeanDefinitionPropertiesCodeGenerator, and list of such
type is handled transparently.

Closes gh-29075
2022-10-18 15:28:18 +02:00
Sam Brannen
6bdf0bcc4a Introduce ApplicationContextFailureProcessor SPI in the TCF
This commit introduces an ApplicationContextFailureProcessor SPI in the
Spring TestContext Framework that allows third parties to process
failures that occur while a SmartContextLoader attempts to load an
ApplicationContext.

SmartContextLoader implementations must introduce a try-catch block
around the loading code and throw a ContextLoadException that wraps
the failed ApplicationContext and the cause of the failure.

Extensions of AbstractTestContextBootstrapper can configure an
ApplicationContextFailureProcessor by overriding the new protected
getApplicationContextFailureProcessor() method.

DefaultCacheAwareContextLoaderDelegate unwraps any ContextLoadException
and delegates to the configured ApplicationContextFailureProcessor for
processing.

Closes gh-28826
2022-10-18 14:40:35 +02:00
Sam Brannen
19f795a75a Suppress deprecation warnings in tests 2022-10-18 14:31:57 +02:00
Sam Brannen
bfdf070232 Suppress deprecation warnings in tests 2022-10-18 14:21:57 +02:00
Sam Brannen
b2cf2b9d48 Remove unused logger field 2022-10-18 14:19:45 +02:00
Sam Brannen
9dfa46f690 Remove GraalVM workaround in PathMatchingResourcePatternResolver
Tested successfully using the following locally built GraalVM dev build.

OpenJDK Runtime Environment GraalVM 22.3.0-dev (build 17.0.5+5-jvmci-22.3-b07)

Closes gh-29214
2022-10-18 14:18:05 +02:00
Stephane Nicoll
ca5e453f87 Merge pull request #29313 from izeye
* pr/29313:
  Make RestTemplate.createResourceAccessException() private

Closes gh-29313
2022-10-18 13:06:25 +02:00
Johnny Lim
d0a99c15c4 Make RestTemplate.createResourceAccessException() private
See gh-29313
2022-10-18 13:05:25 +02:00
Stephane Nicoll
d19f63fc2b Merge pull request #29326 from izeye
* pr/29326:
  Add missing since on setCurrentlyInvokedFactoryMethod()

Closes gh-29326
2022-10-18 13:03:40 +02:00
Johnny Lim
1ea3f49eba Add missing since on setCurrentlyInvokedFactoryMethod()
See gh-29326
2022-10-18 13:03:13 +02:00
Juergen Hoeller
f4dfe94702 Fallback to ISO-based default java.time type parsing
Closes gh-26985
2022-10-18 12:49:14 +02:00
Sébastien Deleuze
3d83db6abb Mention @ImportRuntimeHints in RuntimeHintsRegistrar Javadoc
Closes gh-29337
2022-10-18 12:24:46 +02:00
Johnny Lim
7df8b59a7f Polish "Reorganize HTTP Observation types"
See gh-29334
2022-10-18 09:11:07 +09:00
Brian Clozel
001b2636d6 Reorganize HTTP Observation types
Closes gh-29334
2022-10-17 21:54:53 +02:00
Sam Brannen
4d44aaf81b Omit deprecation warning for Bean Validation constraint annotations
Prior to this commit, AnnotationTypeMapping logged a warning for the use
of convention-based annotation attribute overrides in composed Bean
Validation constraint annotations, even though those attribute overrides
are not related to Spring.

For example, Hibernate's @URL constraint annotation is meta-annotated
with Bean Validation's @Pattern constraint annotation, and we should not
log a warning in such scenarios.

This commit addresses that by not logging a warning if convention-based
annotation attribute overrides are detected for a composed @Constraint
annotation.

Closes gh-29206
2022-10-17 19:39:02 +02:00
Sam Brannen
0e861af050 Log warning for convention-based attribute overrides once per annotation type
See gh-28760, gh-29206
2022-10-17 16:52:17 +02:00
rstoyanchev
5cb3af708c Add Builder to HttpServiceProxyFactory
HttpServiceProxyFactory now support programmatic initialization through
a builder, while bean-style initialization is deprecated.

See gh-29296
2022-10-17 12:23:58 +01:00
Juergen Hoeller
e03abc94ff Merge branch '5.3.x'
# Conflicts:
#	spring-beans/src/main/java/org/springframework/beans/CachedIntrospectionResults.java
#	spring-beans/src/main/java/org/springframework/beans/PropertyDescriptorUtils.java
#	spring-beans/src/main/java/org/springframework/beans/SimpleBeanInfoFactory.java
#	spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractBeanFactory.java
2022-10-17 12:56:19 +02:00
Sébastien Deleuze
69cb68f7d6 Add Kotlin data class components support to BindingReflectionHintsRegistrar
Closes gh-29316
2022-10-17 12:26:45 +02:00
Juergen Hoeller
33023b240f Provide optional SimpleBeanInfoFactory for better introspection performance
Closes gh-29330
2022-10-17 12:25:53 +02:00