Commit Graph

1354 Commits

Author SHA1 Message Date
Sam Brannen e8ab53e76d Polishing 2023-06-01 14:57:50 +02:00
Sam Brannen ab253470f0 Update copyright headers 2023-05-23 15:12:32 +02:00
rstoyanchev 5236d17ac4 Re-enable flaky tests after bd66c70b
See gh-29287
2023-05-10 11:44:32 +01:00
rstoyanchev d9f659171b Merge branch '6.0.x' 2023-05-10 11:43:38 +01:00
rstoyanchev bd66c70b2b Potential fix for flaky STOMP integration tests
When ReactorNetty2StompBrokerRelayIntegrationTests fail, typically there
are multiple exceptions "Connection refused: /127.0.0.1:61613" that
appear after we've conneted, sent CONNECT, and expecting CONNECTED, but
that does not come within the 10 second timeout.

61613 is the default port for STOMP. However, in all integration tests
we start ActiveMQ with port 0 which results in a random port. Moreover,
the stacktrace is for Netty 4 (not 5), and the eventloop thread id's
are different than the one where the connection to the correct, random
port was established.

The suspicion is that these are log messages from
MessageBrokerConfigurationTests which focuses on testing configuration
but nevertheless as a bean starts and attempts to connect to the default
port and fails. Perhaps those attempts to connect on the default port
somehow affect the ActiveMQ server, and it stops responding.

This change adds a no-op TcpClient in MessageBrokerConfigurationTests
to avoid unnecessary attempts to connect that are not needed.

See gh-29287
2023-05-10 11:42:45 +01:00
rstoyanchev 73d30dd875 Polishing contribution
Closes gh-30403
2023-05-05 20:53:52 +01:00
Olga MaciaszekSharma 033548a760 Remove default blockTimeout on interface clients
See gh-30403
2023-05-05 20:53:52 +01:00
Sébastien Deleuze b7884ddd02 Disable flaky ReactorNetty2StompBrokerRelayIntegrationTests
See gh-29287
2023-05-04 16:37:17 +02:00
Sam Brannen d446de62a4 Update copyright headers 2023-04-19 15:55:11 +02:00
SW 59c65fa940
Replace `Collections.unmodifiableList(new ArrayList(..))` with `List.copyOf()` (#30166) 2023-04-12 13:07:20 +02:00
divcon 33ef9107e0 Minor refactoring in PayloadMethodArgumentResolver
Closes gh-30168
2023-04-11 11:36:41 +01:00
Krzysztof Krasoń 1734deca1e
Refactor AssertJ assertions into more idiomatic ones
This commit refactors some AssertJ assertions into more idiomatic and
readable ones. Using the dedicated assertion instead of a generic one
will produce more meaningful error messages. 

For instance, consider collection size:
```
// expected: 5 but was: 2
assertThat(collection.size()).equals(5);
// Expected size: 5 but was: 2 in: [1, 2]
assertThat(collection).hasSize(5);
```

Closes gh-30104
2023-04-04 17:34:07 +02:00
Sam Brannen 69c8f8e9c7 Update copyright headers 2023-04-03 16:45:49 +02:00
Johnny Lim 2184d4e80e Fix incomplete assertions
Closes gh-30209
2023-03-28 10:56:41 +02:00
Sam Brannen e17f5c50a8 Update copyright headers 2023-03-13 21:53:40 +01:00
Sam Brannen 00be19c647 Consistently declare Object::equals argument as @Nullable 2023-03-13 21:43:21 +01:00
Sam Brannen a6338fcc43 Update copyright headers 2023-03-06 17:20:42 +01:00
Sam Brannen 004a144bdc Apply "instanceof pattern matching" in remainder of spring-messaging module
See gh-30067
2023-03-06 16:23:10 +01:00
Juergen Hoeller a936a6a8ce Javadoc-only reference to SubscribeMapping from simp package (-> package dependency cycle)
See gh-30002
2023-03-02 13:57:17 +01:00
Sam Brannen edb4a3467a Update copyright headers 2023-02-26 18:37:18 +01:00
Sam Brannen 9305a64a50 Polish contribution
See gh-29994
2023-02-26 18:30:14 +01:00
divcon 40672c3715 Apply "instance of patten matching" in context and messaging modules
Closes gh-29994
2023-02-26 18:30:14 +01:00
Sébastien Deleuze 626a7fc52a Add native support for @SubscribeMapping and @MessageExceptionHandler
Closes gh-30002
2023-02-21 18:47:30 +01:00
Sam Brannen 2d56505ea9 Polishing 2023-02-20 16:49:27 +01:00
Sam Brannen 38a4f23f16 Polishing 2023-02-19 13:41:36 +01:00
rstoyanchev ccbb4bdd27 PayloadMethodArgumentResolver supports Optional
Closes gh-28945
2023-02-13 18:39:19 +00:00
rstoyanchev 5b79a57f14 Polishing
See gh-28945
2023-02-13 18:39:19 +00:00
Arjen Poutsma 3e2f58cdd2 Offer restricted access to DataBuffer's ByteBuffer
This commit introduces DataBuffer::readableByteBuffers and
DataBuffer::writableByteBuffers, allowing restricted access to the
ByteBuffer used internally by DataBuffer implementations.

Closes gh-29943
2023-02-13 15:28:29 +01:00
Sam Brannen 97e557c886 Update copyright headers 2023-02-07 16:37:18 +01:00
Sam Brannen ac6385025b Polishing 2023-02-02 15:02:10 +01:00
Olga Maciaszek-Sharma 4beb05ddb3 Add native support for RSocketExchange.
This commit introduces new AOT processors that look for
`@RSocketExchange` annotated methods on interfaces implemented by beans
and registers reachability metadata accordingly:

* JDK proxies for the beans themselves
* invocation reflection for annotated methods
* binding reflection for arguments and return types

This allows to compile such clients to Native Images.

Closes gh-29877
2023-02-01 18:22:33 +01:00
Juergen Hoeller 4d6249811e Explicit target ClassLoader for interface-based infrastructure proxies
Includes direct JDK Proxy usage instead of ProxyFactory where possible.

Closes gh-29913
2023-01-31 16:11:34 +01:00
Sam Brannen 0502d18e3d Update copyright headers 2023-01-19 16:20:03 +01:00
Sam Brannen c4c786596f Migrate to Mockito.mock(T...) where feasible 2023-01-19 16:20:02 +01:00
Sam Brannen a12c9a0430 Update copyright headers 2023-01-16 19:24:30 +01:00
Sam Brannen 8be542016b Apply "instanceof pattern matching" in spring-jms 2023-01-16 19:24:30 +01:00
Sam Brannen a4956dfe26 Update copyright headers 2023-01-11 13:52:20 +01:00
Sam Brannen 0415975dd1 Polish contribution and related code 2023-01-11 13:52:20 +01:00
Krzysztof Krason afb8a0d1b1 Use new Java features (switch expressions, text blocks, new JDK methods)
Closes gh-29747
2023-01-11 13:51:28 +01:00
Sam Brannen 5c28b56823 Remove duplicated words in Javadoc 2022-12-18 12:05:18 +01:00
Sam Brannen 46fc28fd1a Clean up Javadoc and source code regarding " ." typos 2022-12-12 16:31:14 +01:00
Sam Brannen ad60164911 Update copyright headers for source code changed since August 2022
The changes in this commit were performed using the newly introduced
update_copyright_headers.sh script.
2022-11-29 19:38:42 +01:00
Sam Brannen a88dbbec98 Apply project formatting rules for ternary operator
Discovered via RegEx: ^\s+\?
2022-11-29 17:51:13 +01:00
rstoyanchev a3c89092e1 Log connection info in StompBrokerRelayMessageHandler
See gh-29287
2022-11-23 13:58:37 +00:00
rstoyanchev 98c514ecbe Increase logging for spring-messaging tests
See gh-29287
2022-11-22 20:52:50 +00:00
Juergen Hoeller 459e8a1ea5 Deprecate LocalVariableTableParameterNameDiscoverer completely
LocalVariableTableParameterNameDiscoverer is not registered by default anymore now.
Java sources should be compiled with `-parameters` instead (available since Java 8).
Also retaining standard Java parameter names for all of Spring's Kotlin sources now.

Closes gh-29531
2022-11-22 19:26:15 +01:00
rstoyanchev 7e52b803be Temporarily re-enable ReactorNetty2StompBrokerRelayIntegrationTests
To see if it still fails on the CI server as it doesn't fail locally
for me, and if it does to get details to investigate.

See gh-29287
2022-11-22 16:42:57 +00:00
Sam Brannen 7fcd1de8e3 Use AssertJ's isEmpty() instead of hasSize(0)
Achieved via global search-and-replace.
2022-11-22 17:11:50 +01:00
Sam Brannen d5b0b2b1a1 User AssertJ's hasSize() for arrays
Achieved via global search-and-replace.
2022-11-22 17:03:45 +01:00
Sam Brannen 36f7597f25 Use AssertJ's hasSize() for collections and maps
Achieved via a global search-and-replace.
2022-11-22 16:50:10 +01:00
Sam Brannen 0c878d2d06 Apply additional 'instanceof pattern matching' in spring-web
See gh-29530
2022-11-21 15:57:53 +01:00
Arjen Poutsma 792371ac1f Generalize Jackson version numbers
This commit removes specific version info from Jackson codecs and
converters, in favor of generic info or removing the version information
all together.

See gh-29508
2022-11-17 16:56:38 +01:00
Sam Brannen abf3400c07 Use Assert.state() where appropriate 2022-11-15 12:31:10 +01:00
Sam Brannen eb91d21ada Polishing 2022-11-13 18:21:56 +01:00
Sam Brannen a9a78686ed Merge branch '5.3.x'
# Conflicts:
#	spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/StompDecoder.java
2022-11-08 18:13:26 +01:00
Christoph Dreis 55b258f2de Avoid unnecessary allocations in StompDecoder#unescape
Closes gh-29443
2022-11-08 18:10:54 +01:00
Sam Brannen 3438c47744 Polishing 2022-11-08 11:48:13 +01:00
rstoyanchev aeb35663d4 Remove deprecated methods in HttpServiceProxyFactory 2022-11-07 16:57:17 +00:00
Sam Brannen ac5eb9bfd3 Avoid String allocations with Assert.isTrue() 2022-11-05 14:51:36 +01:00
Sam Brannen 82823517fa Merge branch '5.3.x'
# Conflicts:
#	build.gradle
#	spring-messaging/src/main/java/org/springframework/messaging/rsocket/DefaultRSocketRequesterBuilder.java
#	spring-messaging/src/main/java/org/springframework/messaging/rsocket/MetadataEncoder.java
#	spring-messaging/src/main/java/org/springframework/messaging/simp/broker/OrderedMessageChannelDecorator.java
#	spring-messaging/src/main/java/org/springframework/messaging/simp/user/DefaultUserDestinationResolver.java
#	spring-test/src/main/java/org/springframework/test/web/servlet/request/MockHttpServletRequestBuilder.java
#	spring-web/src/main/java/org/springframework/http/HttpRange.java
#	spring-webflux/src/main/java/org/springframework/web/reactive/result/view/RedirectView.java
#	spring-webflux/src/main/java/org/springframework/web/reactive/socket/CloseStatus.java
#	spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/RedirectViewControllerRegistration.java
2022-11-05 14:50:18 +01:00
Sam Brannen 5f02323b9c Avoid String allocations with Assert.isTrue() 2022-11-05 14:40:45 +01:00
Sam Brannen 2afcf60566 Avoid String allocations with Assert.state() 2022-11-04 16:44:59 +01:00
Sam Brannen d849f9816a Merge branch '5.3.x'
# Conflicts:
#	build.gradle
#	spring-webflux/src/test/java/org/springframework/web/reactive/result/view/script/ScriptTemplateViewTests.java
#	spring-webmvc/src/main/java/org/springframework/web/servlet/view/script/ScriptTemplateView.java
#	spring-webmvc/src/test/java/org/springframework/web/servlet/view/script/ScriptTemplateViewTests.java
2022-11-04 16:29:54 +01:00
Sam Brannen a281d8c3fd Polishing 2022-11-04 16:24:59 +01:00
rstoyanchev 5aeafc0761 Fix ISE in [Http|RSocket]ServiceProxyFactory
Closes gh-29376
2022-10-25 12:27:53 +01: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
Sébastien Deleuze aa776e40f9 Ensure classpath checks can be evaluated at build-time
Closes gh-29352
2022-10-19 10:49:11 +02:00
Sam Brannen ae368a20b8 Merge branch '5.3.x'
# Conflicts:
#	spring-web/src/test/kotlin/org/springframework/http/codec/json/KotlinSerializationJsonDecoderTests.kt
#	spring-web/src/test/kotlin/org/springframework/http/codec/json/KotlinSerializationJsonEncoderTests.kt
2022-10-08 14:06:41 +02:00
Johnny Lim 1c1a0afbed Use AssertJ static imports consistently in 5.3.x
Closes gh-29282
2022-10-08 13:57:21 +02:00
Sam Brannen c1ff812d84 Disable flaky ReactorNetty2StompBrokerRelayIntegrationTests
See gh-29287
2022-10-08 13:43:09 +02:00
Violeta Georgieva b5adae2086 Switch to Reactor Netty 2 snapshots
Update to Reactor BOM 2022.0.0-SNAPSHOT.
Process package changes.
Adapt to new `HttpHeaders` API.
Adapt to new cookies API.

See gh-29247
2022-10-03 18:20:52 +01:00
Sam Brannen 321092ce6f Consistent use of @Deprecated(since = "6.0") 2022-09-20 14:34:24 +02:00
Sam Brannen b87d48b99b Merge branch '5.3.x' 2022-09-14 17:18:00 +02:00
Marc Wrobel ce49068ff9 Fix links in Javadoc and reference docs
- Fix broken links (by using a new URL, an alternative URL, or a
  Wayback Machine link)

- Use HTTPS where possible

- Remove https://issuetracker.springsource.com/browse/EBR-349: this
  link is dead and is also mentioned in
  https://jira.spring.io/browse/SPR-8093

- Clean up nohttp allowlist.lines

Closes gh-28876
2022-09-14 17:00:11 +02:00
Sam Brannen 8d92c57777 Merge branch '5.3.x'
# Conflicts:
#	spring-tx/src/main/java/org/springframework/jca/cci/core/support/CciDaoSupport.java
2022-09-14 16:52:55 +02:00
Marc Wrobel 92a231cf91 Fix typos in Javadoc, reference docs, and code
Closes gh-28822
2022-09-14 16:45:34 +02:00
rstoyanchev bbe5e91ebc Minor change in ReactorNetty2TcpClient
A follow-up on recent addition of ReactorNetty2TcpClient and switch to
Netty 5 Buffer.
2022-09-12 14:23:15 +01:00
rstoyanchev c854e35c9d Merge branch '5.3.x' 2022-09-12 12:27:31 +01:00
rstoyanchev 4e97776969 Polishing contribution
Closes gh-28715
2022-09-12 11:47:55 +01:00
Napster d42f950a36 Pass headers to STOMP receipt callbacks
See gh-28715
2022-09-12 10:55:12 +01:00
rstoyanchev 3a5f550a30 Support Reactor Netty 2 / Netty 5 in spring-messaging
Closes gh-28847
2022-09-12 09:37:11 +01:00
Brian Clozel 2b5ca63339 Fix serialization compiler warnings with Java 18
As of Java 18, the serial lint warning in javac has been expanded to
check for class fields that are not marked as `Serializable`.
See https://www.oracle.com/java/technologies/javase/18all-relnotes.html#JDK-8202056

In the Spring Framework codebase, this can happen with `Map`, `Set` or
`List` attributes which are often assigned with an unmodifiable
implementation variant. Such implementations are `Serializable` but
cannot be used as field types.

This commit ensures that the following changes are applied:
* fields are marked as transient if they can't be serialized
* classes are marked as `Serializable` if this was missing
* `@SuppressWarnings("serial")` is applied where relevant
2022-09-09 20:24:26 +02:00
Brian Clozel 1051fe7bee Improve InvocableHandlerMethod error handling
This commit improves the fix for gh-18491 for Java 18 as in this case
the exception message might not be null.
2022-09-09 20:20:29 +02:00
Sam Brannen b1654266a5 Get rid of warnings in tests 2022-09-08 13:20:29 +02:00
rstoyanchev f669e957a9 Polishing 2022-09-07 17:38:31 +01:00
rstoyanchev 8423b2cab7 Add support for RSocket interface client
See gh-24456
2022-09-07 15:01:40 +01:00
Sébastien Deleuze 9cfe79186d Stop using RuntimeHintsUtils
Due to gh-29053, we can stop using RuntimeHintsUtils to
register SynthesizedAnnotation proxies.

Closes gh-29059
2022-09-07 10:10:07 +02:00
Sébastien Deleuze b8c1fc9202 Revert "Remove RuntimeHintsUtils"
This reverts commit 3e327f5641.
2022-09-06 18:21:34 +02:00
Sébastien Deleuze 3e327f5641 Remove RuntimeHintsUtils
Due to gh-29053, we can stop using RuntimeHintsUtils to
register SynthesizedAnnotation proxies.

Closes gh-29058
Closes gh-29059
2022-09-06 15:31:02 +02:00
Sébastien Deleuze f6db2cc35f Use serializerOrNull in Kotlin Serialization support
Closes gh-29068
2022-09-04 16:05:37 +02:00
Sébastien Deleuze f50c301387 Change BindingReflectionHintsRegistrar package
Move it to org.springframework.aot.hint.

See gh-28979
2022-09-02 19:31:26 +02:00
Sébastien Deleuze aaffb8b27e Move BindingReflectionHintsRegistrar to spring-core
See gh-28979
2022-09-02 17:31:43 +02:00
Sam Brannen 69f23095b8 Deprecate SynthesizedAnnotation and related methods
Since Spring no longer adds the SynthesizedAnnotation interface to the
JDK dynamic proxy used to synthesize an annotation, this commit
officially deprecates SynthesizedAnnotation and related methods in
RuntimeHintsUtils.

See gh-29041, gh-29054
Closes gh-29053
2022-09-02 12:04:17 +02:00
Sébastien Deleuze 7214b1e03c Merge branch '5.3.x' 2022-09-02 11:19:55 +02:00
junsu bb3ada4a67 Fix Kotlin Serialization converter registration logic
This commit fixes Kotlin Serialization converter
registration logic in RestTemplate,
AbstractMessageBrokerConfiguration and
AllEncompassingFormHttpMessageConverter classes
to be similar to the one in
WebMvcConfigurationSupport.

Closes gh-29008
2022-09-02 11:17:51 +02:00
Phillip Webb 505da5c602 Migrate hint registration to shortcuts
Migrate code to make use of the `MemberCategory` and `FieldMode`
shortcuts.

See gh-29011
2022-09-01 17:26:06 -07:00
Sam Brannen b50415062b Clean up warnings and polish tests
This commit also modifies ResourceWebHandlerTests.getResourceFromFileSystem()
so that it passes in the IDE.
2022-08-26 15:20:16 +02:00
Arjen Poutsma 9c33d2707a Introduce support for Netty 5 Buffer
This commit introduces support for Netty 5's Buffer, in the form of
Netty5DataBuffer. Because of the new API offered by Buffer, several
changes have been made to the DataBuffer API:

- CloseableDataBuffer is a simpler alternative to PooledDataBuffer, and
  implemented by Netty5DataBuffer. DataBufferUtils::release can now
  handle CloseableDataBuffer as well as PooledDataBuffer.
- PooledDataBuffer::touch has been moved into a separate interface:
  TouchableDataBuffer, which is implemented by Netty5DataBuffer.
- The capacity of DataBuffers can no longer be reduced, they can only
  grow larger. As a consequence, DataBuffer::capacity(int) has been
  deprecated, but ensureWritable (formally ensureCapacity) still exists.
- DataBuffer::slice and retainedSlice have been deprecated in favor of
  split, a new method that ensures that memory regions do not overlap.
- DataBuffer::asByteBuffer has been deprecated in favor of toByteBuffer,
  a new method that returns a copy, instead of shared data.
- DataBufferFactory::allocateBuffer has been deprecated in favor of
  allocateBuffer(int).

Closes gh-28874
2022-08-25 11:00:22 +02:00
Stephane Nicoll 5aa8583159 Add shortcut to register an executable with a mode
See gh-29011
2022-08-24 19:32:02 +02:00
Stephane Nicoll c164b918c0 Apply consistent RuntimeHints defaults
This commit harmonizes the registration of an executable so that
the default method and the method that takes an empty customizer
produces the same hint. The same applies to the readable flag of
a field hint.

Rather than returning a list of executable modes, the "highest" mode
is retained.

See gh-29011
2022-08-24 19:32:01 +02:00
Stephane Nicoll 4f0c879778 Rationalize hints required for annotations
This commit updates RuntimeHintsUtils to focus on registering a JDK
proxy only as annotations of annotated elements that have at least
an introspection hints are visible out-of-the-box.

This commit also removes unnecessary hints and adapt `@Reflective` to
detect if a hint is required using the introduced
MergedAnnotation#isSynthesizable.

See gh-28967
2022-08-16 15:42:52 +02:00
Juergen Hoeller b31a15851e Support for pre-generated CGLIB proxy classes (in AOT scenarios)
Includes runtime storing of generated classes to a directory specified by the "cglib.generatedClasses" system property. Avoids lazy CGLIB fast-class generation and replaces generated Enhancer and MethodWrapper key classes with equivalent record types. Introduces support for early type determination in InstantiationStrategy, AopProxy and SmartInstantiationAwareBeanPostProcessor - in order to trigger CGLIB class generation in refreshForAotProcessing (through early determineBeanType calls for bean definitions).

Closes gh-28115
2022-08-10 23:30:19 +02:00
Stephane Nicoll cd2b7afc87 Avoid reflection on OptionalValidatorFactoryBean
Closes gh-28939
2022-08-08 16:53:53 +02:00
Sam Brannen e4395f2f8b Clean up warnings and polishing 2022-07-31 14:14:56 +03:00
Arjen Poutsma 2aa74c9121 Deprecate ListenableFuture in favor of CompletableFuture
This commit deprecates ListenableFuture in favor of CompletableFuture.
ListenableFuture was introduced in Spring Framework 4.0, when
CompletableFuture was not yet available. Spring now requires JDK 17, so
having our own type no longer seems necessary.

Major changes in this commit include:
- Deprecation of ListenableFuture and related types
  (ListenableFutureCallback, SettableListenableFuture, etc.)
- Deprecation of AsyncListenableTaskExecutor in favor of default methods
  in AsyncTaskExecutor (submitCompletable).
- AsyncHandlerMethodReturnValueHandler now has toCompletableFuture
  instead of toListenableFuture.
- WebSocketClient now has execute methods, which do the same as
  doHandshake, but return CompletableFutures (cf. the reactive
  WebSocketClient).

All other changes
- add an overloaded method that takes a CompletableFuture parameter
  instead of ListenableFuture, and/or
- add a method with a 'Async' suffix that returns a CompletableFuture
  instead of a ListenableFuture (connectAsync, sendAsync).

Closes gh-27780
2022-07-27 12:41:35 +02:00
Sam Brannen 0fb9de5d0e Merge branch '5.3.x' 2022-07-13 16:36:01 +02:00
Marc Wrobel bd3499671c Fix typos in test code
This commit fixes typos in test class names, test method names, and
test variable names.

Closes gh-28807
2022-07-13 16:24:11 +02:00
Sam Brannen 89f66ccf6a Merge branch '5.3.x'
# Conflicts:
#	spring-jms/src/main/java/org/springframework/jms/listener/endpoint/StandardJmsActivationSpecFactory.java
2022-07-13 14:06:53 +02:00
Sam Brannen 46db372951 Polishing 2022-07-13 14:01:47 +02:00
Marc Wrobel 82ca27e46f Fix and improve Javadoc in spring-messaging
See gh-28800
2022-07-13 14:01:29 +02:00
Stephane Nicoll 2c92d7da8f Harmonize RuntimeHintsRegistrar implementations
Closes gh-28801
2022-07-12 18:30:23 +02:00
Sébastien Deleuze bcb6f13fc4 Add native image support for STOMP messaging
This commit adds reflection hints for messaging
annotations as well as for classes and methods
annotated with @MessageMapping.

Closes gh-28754
2022-07-11 19:40:23 +02:00
Arjen Poutsma 9b739a2310 Update scheduling package to use java.time
This commit deprecates all methods in org.springframework.scheduling
that use

- Date, in favor of variants that take an Instant.
- long & TimeUnit, in favor of variants that take a Duration.

Closes: gh-28714
2022-07-08 16:25:27 +02:00
rstoyanchev a92b4279d7 Merge branch '5.3.x' 2022-07-04 16:52:16 +01:00
rstoyanchev 22cc6c5918 Polishing contribution
Closes gh-28736
2022-07-04 16:12:57 +01:00
CodeInDreams 461ba53b39 Qualify channelExecutor and taskScheduler in WebSocket config
See gh-28736
2022-07-04 15:51:40 +01:00
Arjen Poutsma 8eb660b03c Merge branch '5.3.x' 2022-06-01 15:24:05 +02:00
Arjen Poutsma c55606ed08 Recognize Kotlin coroutines in isAsyncVoidReturnType
This commit makes sure that Kotlin coroutines are correctly identified
by InvocableHandlerMethod::isAsyncVoidReturnType.

Closes gh-26829
2022-06-01 15:13:30 +02:00
Sam Brannen ee209de9cf Merge branch '5.3.x'
# Conflicts:
#	spring-beans/src/test/java/org/springframework/beans/factory/support/security/CallbacksSecurityTests.java
#	spring-context/src/test/java/org/springframework/ejb/access/LocalSlsbInvokerInterceptorTests.java
#	spring-context/src/test/java/org/springframework/ejb/access/SimpleRemoteSlsbInvokerInterceptorTests.java
#	spring-web/src/test/java/org/springframework/remoting/jaxws/JaxWsSupportTests.java
#	spring-webmvc/src/test/java/org/springframework/web/servlet/config/annotation/ViewResolutionIntegrationTests.java
2022-05-31 14:15:36 +02:00
Sam Brannen 1beb7068f6 Use new AssertJ exception assertions 2022-05-31 14:08:28 +02:00
Juergen Hoeller 8b6dcb9ccc Merge branch '5.3.x' 2022-05-11 08:52:05 +02:00
rstoyanchev dc2947c52d Ignore invalid connect frame
Closes gh-28443
2022-05-11 07:22:22 +01:00
lihan a892ce80c1 Polishing regarding JDK baseline upgrade
Closes gh-28440
2022-05-10 17:01:40 +02:00
Juergen Hoeller 7e1782ea22 Merge branch '5.3.x'
# Conflicts:
#	build.gradle
#	spring-core/src/main/java/org/springframework/core/convert/Property.java
2022-04-08 13:10:34 +02:00
Juergen Hoeller eefdd2c768 Avoid return value reference in potentially cached MethodParameter instance
Closes gh-28232
2022-04-08 13:03:13 +02:00
Stephane Nicoll 7be6816129 Merge branch '5.3.x' 2022-03-11 16:22:18 +01:00
Stephane Nicoll 9eec6d0834 Start building against Reactor 2020.0.17 snapshots
See gh-28064
2022-03-11 16:18:28 +01:00
Sam Brannen 8c6d59aaaf Polish contribution
See gh-28014
2022-02-19 14:43:26 +01:00
a.yazychyan c5c926726d Use enhanced switch expressions where feasible
Closes gh-28014
2022-02-19 14:34:05 +01:00
Sam Brannen bbd35ded91 Stop using SocketUtils in ActiveMQ STOMP broker tests
See gh-28052
2022-02-15 15:53:43 +01:00
Sam Brannen 7412625929 Merge branch '5.3.x'
# Conflicts:
#	spring-web/src/test/java/org/springframework/remoting/caucho/CauchoRemotingTests.java
#	spring-webflux/src/test/java/org/springframework/web/reactive/function/client/WebClientIntegrationTests.java
2022-02-15 14:35:25 +01:00
Sam Brannen 685a195ba1 Deprecate SocketUtils
SocketUtils was introduced in Spring Framework 4.0, primarily to assist
in writing integration tests which start an external server on an
available random port. However, these utilities make no guarantee about
the subsequent availability of a given port and are therefore
unreliable. Instead of using SocketUtils to find an available local
port for a server, it is recommended that users rely on a server's
ability to start on a random port that it selects or is assigned by the
operating system. To interact with that server, the user should query
the server for the port it is currently using.

SocketUtils is now deprecated in 5.3.16 and will be removed in 6.0.

Closes gh-28052
2022-02-15 14:28:58 +01:00
Sam Brannen b3f786728e Use modern language features in tests 2022-02-03 15:35:32 +01:00
Sam Brannen 54565e95b5 Merge branch '5.3.x' 2022-02-03 14:58:36 +01:00
Sam Brannen f8a5a8d7be Use modern language features in tests 2022-02-03 14:50:10 +01:00
rstoyanchev d61d0d41a3 Merge branch '5.3.x' into main 2022-01-12 09:02:07 +00:00
rstoyanchev 7665424ea8 Polishing contribution
Closes gh-27888
2022-01-12 08:55:32 +00:00
Max Demydenko f63a106c85 clear() method also clears argument resolver cache
See gh-27888
2022-01-12 08:55:32 +00:00
Sam Brannen d57bc176f2 Merge branch '5.3.x' 2022-01-10 14:21:25 +01:00
Sam Brannen df263d01b9 Use idiomatic AssertJ assertions for true, false, and null 2022-01-10 14:15:55 +01:00
Marten Deinum 948f5999c3 Replace use of StringBuffer with StringBuilder
With JDK 9, java.util.regex.Matcher received overloaded variants of
appendReplacement() and appendTail() that accept a StringBuilder,
allowing us to replace the use of StringBuffer with StringBuilder.

Closes gh-27822
2022-01-04 13:14:17 +01:00
Sébastien Deleuze a410f4c0f2 Upgrade Kotlin Coroutines to 1.6.0
Closes gh-27878
2022-01-03 15:45:37 +01:00
Rossen Stoyanchev b7cd049d7d Add "application/*+json" to MappingJackson2MessageConverter
Closes gh-20269
2021-12-14 21:59:22 +00:00
Rossen Stoyanchev 2db6795a1a Polishing contribution
Closes gh-27722
2021-12-13 21:03:58 +00:00
조현수(Hyunsoo Cho)/Platform Engineering팀/11ST 5d91560f92 Avoid unescape for CONNECT and CONNECTED frames
See gh-27722
2021-12-13 21:03:58 +00:00
Juergen Hoeller 4750a9430c Early removal of 5.x-deprecated code
Closes gh-27686
2021-11-18 09:18:06 +01:00
SungMin 32af39d6e6
Use 'toString(Charset)' instead of 'toString(String)' for encodings (#27646)
Co-authored-by: 홍성민(SungMin Hong)/Platform Engineering팀/11ST <devmonster@11stcorp.com>
2021-11-10 15:11:33 +01:00
Sam Brannen 1cd70bbe6b Apply "instanceof pattern matching" in spring-messaging
This commit also applies additional clean-up tasks such as the following.

- final fields
- diamond operator (<>) for anonymous inner classes
- for-each loop

This has only been applied to `src/main/java`.
2021-10-14 20:18:29 +02:00
Rossen Stoyanchev f14bd50033 Prune empty method adapter classes 2021-10-08 18:20:09 +01:00
Sam Brannen 2d1e0d5e38 Merge branch '5.3.x' 2021-10-06 12:13:21 +02:00