Commit Graph

122 Commits

Author SHA1 Message Date
Juergen Hoeller
89d563097f Merge branch '6.1.x'
# Conflicts:
#	spring-core/src/main/java/org/springframework/core/convert/TypeDescriptor.java
2024-03-16 23:24:51 +01:00
Juergen Hoeller
eb8b7c4331 Remove superfluous @NonNull declarations 2024-03-16 14:22:17 +01:00
PhilKes
052b6357c8 Apply attributes to the underlying HTTP request
See gh-29958
2024-03-12 10:43:31 +00:00
Juergen Hoeller
f22a1eece4 Polishing 2024-02-28 19:14:37 +01:00
Juergen Hoeller
cfb29db278 Initial support for Servlet 6.1
Closes gh-31159
2024-02-28 18:54:36 +01:00
Sam Brannen
122372c580 Spring cleaning: update copyright headers 2024-02-23 12:21:22 +01:00
Sam Brannen
644887e094 Polish (Linked)HashSet usage
See gh-32291
2024-02-21 16:22:31 +01:00
Sam Brannen
b9c304b890 Polish contribution
See gh-32291
2024-02-21 16:19:53 +01:00
Patrick Strawderman
e1a32d4ba9 Avoid resizing of fixed-size HashSet/LinkedHashSet variants
Add helpers to CollectionUtils for building HashSets and LinkedHashSets
that can hold an expected number of elements without needing to
resize/rehash.

Closes gh-32291
2024-02-21 16:19:53 +01:00
Stéphane Nicoll
f5b0d9509d Polish 2024-01-17 18:41:15 +01:00
Brian Clozel
f846d9484c Add Javadoc to MockHttpServletResponse
This commit adds Javadoc to the `getContentLength` method of
`MockHttpServletResponse` to reflect that it gets its value from the
HTTP response header.

Closes gh-31833
2024-01-03 15:19:53 +01:00
Sam Brannen
c74d60b9fe Polishing 2023-12-05 16:14:13 +01:00
Sam Brannen
db48813181 Polish contribution
See gh-31757
2023-12-05 16:14:13 +01:00
Johnny Lim
64e9fcad53 Apply SingleSpaceSeparator Checkstyle module
This commit also fixes its violations.

Closes gh-31469
2023-10-22 14:09:57 +02:00
Sébastien Deleuze
20df52e543 Merge branch '6.0.x' 2023-09-15 18:16:26 +02:00
Sébastien Deleuze
ce0923b946 Remove Reactor Netty 2 from integration tests
Closes gh-31243
2023-09-15 18:15:26 +02:00
Arjen Poutsma
6597727c86 Upgrade to Jetty 12
This commit upgrades Spring Framework to Jetty 12.0.1, and Reactive HTTP
 Client 4.0.0.

Closes gh-30698
2023-09-04 14:03:29 +02:00
Sam Brannen
e737e6d9ba Update copyright headers 2023-08-25 17:07:17 +02:00
Sébastien Deleuze
21613eabf1 Properly use Reactor Netty 2 in AbstractHttpHandlerIntegrationTests
Closes gh-31095
2023-08-24 10:46:43 +02:00
Sam Brannen
58b4286216 Polish MockHttpServletRequest 2023-07-05 13:59:47 +02:00
Juergen Hoeller
6526e79eea Polishing 2023-06-26 19:28:38 +02:00
Sam Brannen
299b86bae3 Merge branch '6.0.x' 2023-07-05 14:02:49 +02:00
Juergen Hoeller
3f40452511 Merge branch '6.0.x' 2023-06-26 19:36:20 +02:00
Arjen Poutsma
49d688f99c Mark ClientHttpResponse::getRawStatusCode for removal 2023-05-30 15:37:58 +02:00
Sam Brannen
dfd74495bd Merge branch '6.0.x' 2023-04-28 16:09:15 +02:00
Sam Brannen
aabd685225 Update major/minor version properties in MockServletContext
ServletContext has sets of major/minor version properties that we have
not updated in MockServletContext in several years.

Since we upgraded the baseline to Servlet 6.0 in Spring Framework 6.0,
now seems like a good time to update those version properties.

Closes gh-30395
2023-04-28 15:43:29 +02:00
Arjen Poutsma
54853ee239 Support setCharacterEncoding(null) in MockHttpServletResponse
Closes gh-30341
2023-04-25 10:53:44 +02:00
Kai Zander
5b2aa0be81 Fix link in Javadoc of PassThroughFilterChain
Closes gh-30365
2023-04-23 15:50:14 +02:00
Sam Brannen
7df2e2a8d2 Remove APIs deprecated for removal in 6.1
This is the first commit that removes deprecated APIs.

Subsequent commits will remove additional deprecated APIs.

See gh-29449
2023-04-19 17:23:49 +02:00
Sam Brannen
9fb61c57ae Sync MockCookie implementations
See gh-30263
2023-04-04 16:32:30 +02:00
Arjen Poutsma
37a4e84450 Cache ServerHttpRequest::getMethod in AbstractServerHttpRequest
This commit ensures that the HttpMethod, exposed through
ServerHttpRequest::getMethod, is cached in AbstractServerHttpRequest so
that potentially expensive HTTP method lookups are only done once.

Closes gh-30139
2023-03-21 11:29:32 +01: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
rstoyanchev
9c0b28ffdc Fix StringIndexOutOfBoundsException
Closes gh-29588
2023-02-07 20:17:07 +00:00
Sam Brannen
23a60aeb27 Sync MockHttpServletRequest implementations 2023-02-01 16:28:38 +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
58872c79ee Update copyright headers 2023-01-20 14:17:53 +01:00
Sam Brannen
24f18275dd Stop referring to "Spring 3.x" features in documentation and code 2023-01-20 14:13:18 +01:00
Sam Brannen
2b6f3caff4 Remove dead code in MockClientHttpRequest 2022-12-09 15:57:35 -05:00
Sam Brannen
83eb8ac0ea Introduce additional constructors in MockClientHttp[Request|Response]
This commit introduces additional constructors in MockClientHttpRequest
and MockClientHttpResponse that were previously only present in the
internal "test fixtures" in spring-web.

This commit also aligns the mocks in spring-test with the test fixtures
in spring-web to simplify continued maintenance of the mocks and test
fixtures.

Closes gh-29670
2022-12-09 15:46:08 -05:00
Sam Brannen
1b57f2bda5 Use URI#create instead of URI constructor where feasible in spring-web 2022-12-09 13:26:01 -05:00
Sam Brannen
485c80fcf3 Apply 'instanceof pattern matching' in spring-test and Servlet mocks 2022-12-09 11:56:14 -05: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
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
Sam Brannen
95f3337bb5 Revise contribution
This commit reverts changes to AbstractCacheManager since iterating
over the caches in a for-loop and a stream is duplicated effort.

This commit reverts changes to DefaultRenderingResponseBuilder,
RouterFunctions, and OriginHandshakeInterceptor since order matters for
those use cases: they were originally based on the semantics of
LinkedHashSet or LinkedHashMap; whereas, Set.copyOf() and Map.copyOf()
do not provide any guarantees regarding ordering.

This commit also applies analogous changes to "sibling" implementations
across Servlet mocks as well as Web MVC and WebFlux.

See gh-29321
2022-11-08 14:14:29 +01:00
Sam Brannen
3438c47744 Polishing 2022-11-08 11:48:13 +01:00
Juergen Hoeller
19cf503534 Align with Servlet 6.0 and introduce support for Jakarta WebSocket 2.1
Includes corresponding build upgrade to Tomcat 10.1.1 and Undertow 2.3.0
(while retaining runtime compatibility with Tomcat 10.0 and Undertow 2.2)

Closes gh-29435
Closes gh-29436
2022-11-06 16:08:30 +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
Johnny Lim
ba99672fd6 Suppress removal warnings
Closes gh-29325
2022-10-19 18:44:59 +02:00