Commit Graph

25714 Commits

Author SHA1 Message Date
Sam Brannen abf3400c07 Use Assert.state() where appropriate 2022-11-15 12:31:10 +01:00
Sam Brannen 2aa78889d2 Use consistent wording in precondition error messages 2022-11-15 12:31:01 +01:00
Stephane Nicoll 711a63adca Polish
See gh-29391
2022-11-15 11:53:01 +01:00
Juergen Hoeller 9235e3996f Equivalent code without java.net.URL constructor in comment blocks
See gh-29486
See gh-29481
2022-11-15 00:33:48 +01:00
Juergen Hoeller 7d2543ed82 Extract filename from cleaned path (for consistent separator handling)
See gh-29486
2022-11-14 23:53:39 +01:00
Juergen Hoeller 588a70218a Merge branch '5.3.x'
# Conflicts:
#	spring-beans/src/main/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessor.java
2022-11-14 23:38:10 +01:00
Juergen Hoeller ec3f59e6fe Allow AutoCloseable dereferences on original AutoCloseable beans
Closes gh-29480
2022-11-14 23:37:05 +01:00
Juergen Hoeller 49ee4a4fdf Deprecated unused findAutowireCandidates template method (removed in 6.0)
See gh-29487
2022-11-14 23:35:47 +01:00
Juergen Hoeller 28cd39abf9 Remove unused AutowiredAnnotationBeanPostProcessor template methods
Closes gh-29487
2022-11-14 23:23:39 +01:00
Juergen Hoeller aaeb5eb0d2 Avoid direct URL construction and URL equality checks
Closes gh-29486
2022-11-14 23:23:12 +01:00
Sam Brannen 0b21c16fa8 Suppress unused warning in test code 2022-11-14 20:41:47 +01:00
Sam Brannen 7d731ee754 Merge branch '5.3.x'
# Conflicts:
#	spring-core/src/test/java/org/springframework/util/SocketUtilsTests.java
2022-11-14 20:31:26 +01:00
Sam Brannen 698f8995f7 Revise TestSocketUtils and tests
Closes gh-29132
2022-11-14 20:26:58 +01:00
Chris Bono ee51dab1f3 Introduce TestSocketUtils as a replacement for SocketUtils
SocketUtils was officially deprecated in 5.3.16 (gh-28052) and removed
in 6.0 M3 (gh-28054); however, there is still need for a subset of this
functionality in integration tests for testing scenarios in which it is
not possible for the system under test to select its own random port
(or rely on the operating system to provide an ephemeral port).

This commit therefore introduces a scaled down version in the
spring-test module called TestSocketUtils which supports retrieval of a
single TCP port.

See gh-29132
2022-11-14 20:26:58 +01:00
Sam Brannen 743a96b75e Polish SocketUtilsTests 2022-11-14 20:26:58 +01:00
Sam Brannen 6efc3dadf1 Apply "instance pattern matching" 2022-11-14 17:12:20 +01:00
Sam Brannen 07ba13c9ca Remove superfluous method override 2022-11-14 17:11:58 +01:00
Stephane Nicoll 5421a36c8f Add section on runtime hints
See gh-29350
2022-11-14 14:54:27 +01:00
Brian Clozel 3573022b96 Fix version change in previous commit 2022-11-14 13:23:05 +01:00
Brian Clozel 1ad7cc3702 Reorganize server observability packages
Prior to this commit, the server observability support would create a
cycle in Java packages.

This commit refactors the current arrangement to solve this by:

* "flattening" the reactive HTTP instrumentation; this removes the
  dependency to the `ServerWebExchange` and `PathPattern` types
* moving the `observation` package under
  `org.springframework.http.server` and
  `org.springframework.http.server.reactive`

See gh-29477
2022-11-14 12:59:45 +01:00
Sébastien Deleuze 91c6fac18a Update outdated WebClientAdapter.createHttpServiceProxyFactory documentation 2022-11-14 11:16:16 +01:00
Brian Clozel f50b472ceb Ignore HttpComponents Javadoc
Closes gh-29479
2022-11-14 10:42:34 +01:00
Sébastien Deleuze 7a9bd3fed9 Merge branch '5.3.x' 2022-11-13 19:08:28 +01:00
Sébastien Deleuze b766a49a4d Support suspending functions returning Unit in WebFlux
Closes gh-27629
2022-11-13 19:05:29 +01:00
Sam Brannen eb91d21ada Polishing 2022-11-13 18:21:56 +01:00
Sam Brannen 1f0a35bacc Remove outdated documentation in @Reflective 2022-11-13 16:57:54 +01:00
Sam Brannen ae3bec5d57 Allow test classes to provide runtime hints via declarative mechanisms
Prior to this commit, it was possible to register hints for individual
test classes programmatically via the
org.springframework.test.context.aot.TestRuntimeHintsRegistrar SPI;
however, that requires that a custom TestRuntimeHintsRegistrar be
registered via "META-INF/spring/aot.factories". In addition,
implementing a TestRuntimeHintsRegistrar is more cumbersome than using
the core mechanisms such as @Reflective, @ImportRuntimeHints, and
@RegisterReflectionForBinding.

This commit address this by introducing support for @Reflective and
@ImportRuntimeHints on test classes. @RegisterReflectionForBinding
support is available automatically since it is an extension of the
@Reflective mechanism.

Closes gh-29455
2022-11-12 14:41:09 +01:00
Sam Brannen 1b61217705 Polishing 2022-11-12 14:40:55 +01:00
Juergen Hoeller ffd45c0e7b Move reflection hints for ObjectToObjectConverter conventions to aot.hint.support
Avoids an accidental package cycle between aot and core (only aot->core allowed).

See gh-29429
2022-11-12 11:23:40 +01:00
Sam Brannen 049eb98e00 Merge branch '5.3.x' 2022-11-11 17:12:28 +01:00
67 3ff308403a Fix two typos in integration.adoc and webflux.adoc
- Change "you ca" to "you can" in webflux.adoc

- English names can be used in "month" field instead of "day-of-month"
  field in cron expressions in integration.adoc

Closes gh-29469
2022-11-11 17:11:16 +01:00
Sam Brannen 27f3feea1a Ensure SpEL ternary and Elvis expressions are enclosed in parentheses in toStringAST()
Prior to this commit, ternary and Elvis expressions enclosed in
parentheses (to account for operator precedence) were properly parsed
and evaluated; however, the corresponding toStringAST() implementations
did not enclose the results in parentheses. Consequently, the string
representation of the ASTs did not reflect the original semantics of
such expressions.

For example, given "(4 % 2 == 0 ? 1 : 0) * 10" as the expression to
parse and evaluate, the result of toStringAST() was previously
"(((4 % 2) == 0) ? 1 : 0 * 10)" instead of
"((((4 % 2) == 0) ? 1 : 0) * 10)", implying that 0 should be multiplied
by 10 instead of multiplying the result of the ternary expression by 10.

This commit addresses this by ensuring that SpEL ternary and Elvis
expressions are enclosed in parentheses in toStringAST().

Closes gh-29463
2022-11-11 17:11:07 +01:00
Sam Brannen b42b785cd1 Polish ParsingTests 2022-11-11 17:10:57 +01:00
rstoyanchev e0b405869f Merge branch '5.3.x' 2022-11-11 15:16:26 +00:00
rstoyanchev 479a53b132 Update docs on DispatcherHandler exception handling
See gh-22991
2022-11-11 13:51:21 +00:00
rstoyanchev 0348a7bf2e Improve API for RFC 7807 in functional endpoints
Closes gh-29462
2022-11-11 13:34:35 +00:00
rstoyanchev f9d8367379 Exclude URL query from checkpoint in DefaultWebClient
Closes gh-29148
2022-11-11 13:29:36 +00:00
rstoyanchev 09b19d7aa6 Update RestTemplate Javadoc
Closes gh-29311
2022-11-11 12:16:02 +00:00
rstoyanchev 8ade083a05 Filter out null WebSocketSession attributes
Closes gh-29315
2022-11-11 11:20:18 +00:00
rstoyanchev db9e89fba9 Update docs on web controller method return values
Closes gh-29349
2022-11-11 11:03:24 +00:00
Juergen Hoeller 9d1dfc733d Upgrade to R2DBC H2 1.0.0
See gh-28787
2022-11-11 09:39:05 +01:00
Juergen Hoeller ddbbe67361 Upgrade to Reactor 2022.0.0
Includes Netty 4.1.85, Jetty Reactive HttpClient 3.0.7, SmallRye Mutiny 1.8, SLF4J 2.0.3, OpenPDF 1.3.30, Mockito 4.8.1, HtmlUnit 2.66

Closes gh-29465
2022-11-10 18:55:00 +01:00
Juergen Hoeller 0e4ab2c63a Merge branch '5.3.x'
# Conflicts:
#	build.gradle
#	spring-test/src/main/java/org/springframework/mock/web/MockHttpServletRequest.java
#	spring-test/src/main/java/org/springframework/mock/web/MockHttpServletResponse.java
#	spring-web/src/testFixtures/java/org/springframework/web/testfixture/servlet/MockHttpServletRequest.java
#	spring-web/src/testFixtures/java/org/springframework/web/testfixture/servlet/MockHttpServletResponse.java
2022-11-10 18:29:05 +01:00
Juergen Hoeller d7d44c6c51 Polishing 2022-11-10 18:26:49 +01:00
Juergen Hoeller 330d2a5982 Upgrade to Reactor 2020.0.24
Includes Netty 4.1.85, Tomcat 9.0.68, Jetty 9.4.49, Jetty Reactive HttpClient 1.1.13, Undertow 2.2.21, SmallRye Mutiny 1.8, Log4J 2.19, OpenPDF 1.3.30, Mockito 4.8.1, HtmlUnit 2.66, Checkstyle 10.4

Closes gh-29464
2022-11-10 18:25:55 +01:00
Juergen Hoeller 86fbb8678a Use unquoted value in assertion message in MediaType.checkParameters()
Closes gh-29461
2022-11-10 18:24:57 +01:00
Sam Brannen 1443669091 Polishing 2022-11-10 17:25:20 +01:00
Johnny Lim 4c2072d20c Use unquoted value in assertion message in MediaType.checkParameters() 2022-11-10 15:48:39 +01:00
rstoyanchev fb22044c10 Polishing
See gh-22991
2022-11-09 11:34:32 +00:00
Stephane Nicoll da4b539f20 Stop generating generic type as Object for unresolved generics
Closes gh-29454
2022-11-09 12:00:34 +01:00