Commit Graph

28666 Commits

Author SHA1 Message Date
Sam Brannen 47cdc7c5f0 Update copyright headers
See gh-31738
2023-12-02 15:32:46 +01:00
dogglezz decb22a93d Polish Javadoc
Closes gh-31738
2023-12-02 15:31:39 +01:00
rstoyanchev d59b2924d3 Exclude any Java library type from nested constructor binding
Closes gh-31709
2023-12-01 17:04:49 +00:00
Sam Brannen c05b4ce776 Suppress warnings in Gradle build 2023-12-01 15:44:37 +01:00
Sam Brannen 3a53446a2b Upgrade to Gradle 8.5
Closes gh-31734
2023-12-01 15:37:55 +01:00
Arjen Poutsma d204dd2dbe Use IntrospectingClientHttpResponse in RestClient
This commit ensures that the RestClient uses the
IntrospectingClientHttpResponse to verify whether the response has a
body, and return null if it does not.

See gh-12671
Closes gh-31719
2023-12-01 14:22:58 +01:00
Stéphane Nicoll 0dbb0f5c14 Merge pull request #31731 from kilink
* pr/31731:
  Avoid byte array copy in getContentAsString

Closes gh-31731
2023-12-01 10:58:44 +01:00
Patrick Strawderman e452c2e89c Avoid byte array copy in getContentAsString
The getContentAsString method was originally added in d9b8826 to avoid
the extra copying inherent to calling ByteArrayOutputStream.toByteArray;
however, in f83c609 the class was updated to instead use
FastByteArrayOutputStream, and in the process the extra copy was brought
back when getContentAsString was changed to call toByteArray.

Switch to calling toByteArrayUnsafe, a method provided by
FastByteArrayOutputStream, which avoids the extra copy; since we
immediately pass the byte array to the String constructor, and it isn't
accessed anywhere else, the usage is safe.

See gh-31731
2023-12-01 10:47:38 +01:00
Sam Brannen 6ea9fdbf77 Polishing 2023-11-30 19:04:59 +01:00
Sébastien Deleuze 8ff687b68c Polish BeanDefinitionDsl.kt 2023-11-30 18:17:47 +01:00
Sébastien Deleuze bf1c179b7f Allow to set the order from Kotlin bean DSL
Closes gh-30849
2023-11-30 18:09:00 +01:00
Sébastien Deleuze 16ac495084 Introduce ORDER_ATTRIBUTE on AbstractBeanDefinition
This commit allows to define a bean order programmatically
at bean definition level (functional equivalent of
`@Order`).

If specified, the order attribute defined at bean
definition level overrides potential values set with
`@Order`.

See gh-30849
2023-11-30 18:09:00 +01:00
Sam Brannen a506238ef6 Polishing 2023-11-30 17:59:58 +01:00
Sam Brannen 33af98b6d6 Document need for -parameters flag in cache key generation exception messages
Closes gh-31675
2023-11-30 17:51:54 +01:00
Juergen Hoeller edfe179291 Polishing 2023-11-30 16:36:45 +01:00
Juergen Hoeller 5f9702b2a4 Introduce rollbackBeforeClose property and AutoCloseable implementation
Closes gh-27249
2023-11-30 16:36:32 +01:00
Juergen Hoeller c56c304536 PathEditor considers single-letter URI scheme as NIO path candidate
Closes gh-29881
2023-11-30 14:16:05 +01:00
rstoyanchev 8090a52f5c ForwardedHeaderFilter supports ERROR requestUri attribute
Closes gh-30828
2023-11-30 13:10:17 +00:00
rstoyanchev 19bca03aa2 Polishing in ForwardedHeaderFilter
See gh-30828
2023-11-30 13:10:17 +00:00
rstoyanchev 0e6e225fb9 Implement messageSize methods in JettyWebSocketSession
Closes gh-28325
2023-11-30 13:10:17 +00:00
rstoyanchev 8ca82120e0 Add missing exception name to DisconnectedClientHelper
Closes gh-31717
2023-11-30 13:10:17 +00:00
rstoyanchev 9ade52dbe2 Exclude Part and MultipartFile from nested constructor binding
Closes gh-31669
2023-11-30 13:10:17 +00:00
Yanming Zhou feef98b73c Correct conversion from Resource[] with length 1 to Collection<Resource>
Fix GH-31693
2023-11-30 14:05:13 +01:00
Juergen Hoeller 4a6c3e8f5d Fix reactive retrieval of cached null value for empty Mono
Closes gh-31722
2023-11-30 12:05:16 +01:00
Sébastien Deleuze f77713b7e0 Document testing automatic checkpoint/restore at startup
Closes gh-31724
2023-11-30 11:35:01 +01:00
Stéphane Nicoll dc5bef16b4 Polish Default Profile section
Closes gh-30319
2023-11-29 17:47:27 +01:00
Juergen Hoeller f3b1f37000 Process URL path for filename extraction if URI does not expose path
Closes gh-31718
2023-11-29 17:08:59 +01:00
Sébastien Deleuze df00aafdff Add a nested generics test for GenericTypeResolver
Closes gh-31690
2023-11-29 15:12:07 +01:00
Sébastien Deleuze 7cf124b696 Revert "Support WildcardType resolution in GenericTypeResolver"
This reverts commit f075120675.

See gh-22313
See gh-31690
2023-11-29 15:09:57 +01:00
Brian Clozel 35fcbae8c6 Fix reactive HTTP server Observation instrumentation
Prior to this commit, regressions were introduced with gh-31417:

1. the observation keyvalues would be inconsistent with the HTTP response
2. the observation scope would not cover all controller handlers, causing
  traceIds to be missing

The first issue is caused by the fact that in case of error signals, the
observation was stopped before the response was fully committed, which
means further processing could happen and update the response status.
This commit delays the stop event until the response is committed in
case of errors.

The second problem is caused by the change from a `contextWrite`
operator to using the `tap` operator with a `SignalListener`. The
observation was started in the `doOnSubscription` callback, which is too
late in some cases. If the WebFlux controller handler is synchronous
non-blocking, the execution of the handler is performed before the
subscription happens. This means that for those handlers, the
observation was not started, even if the current observation was
present in the reactor context. This commit changes the
`doOnSubscription` to `doFirst` to ensure that the observation is
started at the right time.

Fixes gh-31703
Fixes gh-31706
2023-11-29 14:39:56 +01:00
Stéphane Nicoll c8e6315a67 Polish 2023-11-29 10:08:20 +01:00
Stéphane Nicoll 61be452402 Quote name attribute if necessary
This commit updates MetadataNamingStrategy to quote an ObjectName
attribute value if necessary. For now, only the name attribute is
handled as it is usually a bean name, and we have no control over
its structure.

Closes gh-23608
2023-11-28 17:05:06 +01:00
Sam Brannen 0cbbd3a0d5 Polishing 2023-11-28 16:21:58 +01:00
Stéphane Nicoll c92a0bd493 Prevent AotDetector to be initialized at build-time
This commit moves the condition used by `@DisabledInAotMode` to a
concrete implementation rather than using `@DisabledIf` as it causes
build initialization in a native image.

Closes gh-31705
2023-11-28 15:46:31 +01:00
Stéphane Nicoll 755fd75512 Merge pull request #31694 from quaff
* pr/31694:
  Upgrade copyright year of changed file
  Use AssertJ isInstanceOf where feasible

Closes gh-31694
2023-11-28 12:58:14 +01:00
Stéphane Nicoll f8a40555af Upgrade copyright year of changed file
See gh-31694
2023-11-28 12:53:54 +01:00
Yanming Zhou 64d5e904e8 Use AssertJ isInstanceOf where feasible
See gh-31694
2023-11-28 12:49:32 +01:00
Stéphane Nicoll 4e2d357318 Remove list of supported websocket servers
This commit removes a list of hardcoded servers and version as this is
bound to get outdated and the reference guide/wiki is a more suitable
place for this.
2023-11-27 16:31:09 +01:00
Stéphane Nicoll 264ec517f2 Polish 2023-11-27 16:31:09 +01:00
Stéphane Nicoll b2e3be10d4 Add test to reproduce behavior
See gh-24502
2023-11-27 16:31:09 +01:00
Sam Brannen 246833329f Register runtime hints for skipped exceptions in the TestContext framework
Closes gh-31479
2023-11-27 15:42:20 +01:00
rstoyanchev 43700302c6 RequestMappingInfo defaults to PathPatternParser
This changes ensures RequestMappingInfo uses PathPatternParser by default
as all AbstractHandlerMapping implementations do as of 6.0.

RequestMappingInfo instances are typically created internally and aligned with
the RequestMappingHandlerMapping in terms of path mapping options.
If a RequestMappingInfo is registered programmatically, the caller needs to also
ensure they are aligned. However, if the two should be aligned by default.

Closes gh-31662
2023-11-27 10:28:14 +00:00
rstoyanchev 54ecbb2bc8 Update link to stompjs library
Closes gh-28409
2023-11-27 10:28:14 +00:00
Stéphane Nicoll 9eb2f29d4a Move sample to unit test
See gh-28904
2023-11-27 07:58:19 +01:00
Sam Brannen 97264c77dd Consistently log exceptions from TestExecutionListeners at WARN level
Prior to this commit, the TestContextManager logged an exception from a
TestExecutionListener at WARN level except in prepareTestInstance()
where such an exception was logged at ERROR level (except for a skipped
exception which is logged at INFO level).

For consistency, this commit modifies TestContextManager so that it
always logs non-skipped exceptions from TestExecutionListeners at WARN
level.

Closes gh-31688
2023-11-26 12:44:13 +01:00
Sam Brannen b17f3bc07b Polishing 2023-11-26 12:31:15 +01:00
Sam Brannen a15f472898 Include scroll() in SharedEntityManagerCreator's queryTerminatingMethods
This commit supports the scroll() and scroll(ScrollMode) methods from
Hibernate's Query API in SharedEntityManagerCreator's query-terminating
methods set.

Closes gh-31682
2023-11-26 12:12:54 +01:00
Stéphane Nicoll 0785256b2f Match HandlerMapping lookup to bean signature
This commit makes sure to initialize any HandlerMapping defined in the
context when searching for resource handlers. Previously, the detection
algorithm was looking up for `SimpleUrlHandlerMapping` while the
declared target type in WebMvcConfigurationSupport is HandlerMapping.
If the application uses lazy initialization, the lookup algorithm would
not force that bean to be initialized.

Closes gh-25488
2023-11-26 09:59:12 +01:00
Sam Brannen 95e250d4bd Log test aborted exceptions at INFO level in the TestContext framework
Prior to this commit, any time an aborted/skipped exception was thrown
by a TestExecutionListener, the TestContextManager unconditionally
logged the exception at WARN level -- or ERROR level for
prepareTestInstance() callbacks.

Regarding the latter, an aborted/skipped exception is certainly not an
ERROR, and in general the associated log output is very verbose
(including a stack trace) and not something the user should be warned
about it.

To improve the user experience, this commit revises TestContextManager
so that it logs such exceptions at INFO level.

Specifically, the following types of exceptions are considered
aborted/skipped exceptions.

- JUnit Jupiter: org.opentest4j.TestAbortedException
- JUnit 4 org.junit.AssumptionViolatedException
- TestNG: org.testng.SkipException

Closes gh-31479
2023-11-25 18:12:43 +01:00
Sam Brannen dbad9fd208 Update copyright headers 2023-11-25 14:59:40 +01:00