Commit Graph

28672 Commits

Author SHA1 Message Date
Sam Brannen e870912fa2 Polish Javadoc for MockRestServiceServer
See gh-31741
2023-12-03 19:24:46 +01:00
Donghun Shin 99f50ebeb4 Fix Javadoc for MockRestServiceServer.bindTo(RestClient.Builder)
Closes gh-31741
2023-12-03 19:15:35 +01:00
Sam Brannen cd62dfe3a9 Polish FastByteArrayOutputStream[Tests]
See gh-31737
2023-12-02 16:31:28 +01:00
Patrick Strawderman 7cdacf3083 Introduce toString(Charset) in FastByteArrayOutputStream
This commit introduces a toString() overload in
FastByteArrayOutputStream that accepts a Charset in order to mirror the
method that was introduced in ByteArrayOutputStream in JDK 10,
including a special case for when a single buffer is in use internally
to avoid the need to resize.

This commit also updates getContentAsString() in
ContentCachingRequestWrapper to use this new toString(Charset) method.

Closes gh-31737
2023-12-02 16:31:28 +01:00
Stéphane Nicoll 0bec8125a4 Merge pull request #31736 from tylerbertrand
* pr/31736:
  Use relative path for javadoc overview

Closes gh-31736
2023-12-02 16:22:19 +01:00
Tyler Bertrand da32e3d39e Use relative path for javadoc overview
See gh-31736
2023-12-02 16:19:17 +01:00
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