Commit Graph

29352 Commits

Author SHA1 Message Date
Juergen Hoeller 3ecbc4de13 Polishing 2024-02-06 17:57:47 +01:00
Juergen Hoeller 81c156eefb Replace public hasRestTemplateDefaults() method with hasBaseUri()
See gh-32180
2024-02-06 17:57:27 +01:00
Juergen Hoeller d8c4a33bea Upgrade to SLF4J 2.0.12, Jetty 12.0.6, Apache HttpClient 5.3.1, OpenPDF 1.3.39, Mockito 5.10, Checkstyle 10.13 2024-02-06 17:54:26 +01:00
Juergen Hoeller cfa47fa4fb Polishing 2024-02-06 16:46:16 +01:00
Juergen Hoeller 80949eb30f Store known attribute names in session (for distributed sessions)
Closes gh-30463
2024-02-06 16:46:11 +01:00
Juergen Hoeller 4ed337247c Avoid sendError call when response committed already (Tomcat 10.1.16)
Closes gh-32206
2024-02-06 16:46:04 +01:00
Sam Brannen 81cdfafa78 Polishing 2024-02-06 12:55:25 +01:00
Patrick Strawderman d5cb1d9adb Initialize Map with correct size in RequestPredicates
Prior to this commit, the `RequestPredicates` would add new attributes
to the existing request attributes by creating a new `LinkedHashMap`
with the total number of elements as its new initial capacity.

This would not achieve optimal performance as initial resize or rehash
operations could be expected. Consistently using
`CollectionUtils#newLinkedHashMap` avoids this problem.

Closes gh-32201
2024-02-06 10:54:00 +01:00
Juergen Hoeller 9698dbc232 Add javadoc and rename merge method to mergeProperties
See gh-32118
2024-02-06 09:13:09 +01:00
Stéphane Nicoll 9c15b3fa4c Upgrade to AssertJ 3.25.3 2024-02-06 08:33:22 +01:00
Andrei Bastun c559ec4dfb Refactor ReloadableResourceBundleMessageSource
This change allows subclasses to reuse collecting and merging
algorithm when overriding getMergedProperties method.
2024-02-06 08:23:51 +01:00
Juergen Hoeller 341ac76209 Rely on HashSet for uniqueness of mapped names
See gh-32199
2024-02-06 08:20:15 +01:00
Juergen Hoeller 8ff102115a Let BeanPropertyRowMapper subclasses customize mapped names
Closes gh-32199
2024-02-05 18:24:38 +01:00
Brian Clozel f50a262cf2 Polish
See gh-32189
2024-02-05 11:16:32 +01:00
Arjen Poutsma c570f3b2da Fix off-by-one error in PartEvent part count
This commit fixes an off-by-one error in the
PartEventHttpMessageReader,  so that it no longer counts empty windows.

Closes gh-32122
2024-02-05 11:04:24 +01:00
Patrick Strawderman 0fdf759896 Optimize Map methods in ServletAttributesMap
ServletAttributesMap inherited default implementations of the size
and isEmpty methods from AbstractMap which delegates to the Set returned
by entrySet. ServletAttributesMap's entrySet method made this fairly
expensive, since it would copy the attributes to a List, then use a
Stream to build the Set. To avoid the cost, add implementations of
isEmpty / size that don't need to call entrySet at all.

Additionally, change entrySet to return a Set view that simply lazily
delegates to the underlying servlet request for iteration.

Closes gh-32189
2024-02-05 10:33:14 +01:00
Stéphane Nicoll c04d4da9a3 Polish 2024-02-05 09:11:04 +01:00
Sam Brannen b737f36f39 Upgrade to JUnit 5.10.2 2024-02-04 14:00:56 +01:00
Stéphane Nicoll 8d601384d3 Upgrade to Gradle 8.6
Closes gh-32192
2024-02-03 11:38:56 +01:00
Stéphane Nicoll ea52ecc5e0 Polish 2024-02-02 18:56:41 +01:00
Sam Brannen 9b5febea20 Document SpEL limitations for minimum values for numeric literals
Closes gh-20779
2024-02-02 15:43:42 +01:00
Sam Brannen 7627d8c6fc Improve layout for Literal Expressions section 2024-02-02 15:43:42 +01:00
Sam Brannen 20f91b7dc3 Fix tabs in SpEL "Classes Used in the Examples" section 2024-02-02 15:43:42 +01:00
Arjen Poutsma e15c150696 Only copy UriBuilderFactory when customized
This commit ensures that, when creating a RestClient.Builder from a
RestTemplate, the UriBuilderFactory is only copied if it has been
changed from the default values.
Before this commit, the UriBuilderFactory was effectively alway copied,
resulting in not being able to use a baseUrl.

This commit also introduces a small memory optimization in
DefaultUriBuilderFactory, so that default environment variables are
created lazily.

Closes gh-32180
2024-02-02 15:16:10 +01:00
Sam Brannen 7025b7aac2 Provide example for calculating Integer.MIN_VALUE with SpEL's power operator 2024-02-02 14:43:56 +01:00
Sam Brannen 1e432ff95d Improve documentation for overloaded operators in SpEL
See gh-32182
2024-02-02 14:39:09 +01:00
Juergen Hoeller ae17b11b70 Preserve overridden toString result in HandlerMethod copy constructor
Closes gh-32184
2024-02-01 19:14:11 +01:00
Juergen Hoeller 1a783f41aa Use target class for candidate retrieval but not for method matching
Closes gh-32181
See gh-21843
2024-02-01 18:59:45 +01:00
Sam Brannen 521fbfdb85 Update copyright headers in contribution 2024-02-01 17:58:06 +01:00
Siddik ACIL 87377d6f3e Fix modelAttribitePredicate typos
This commit replaces occurrences of modelAttribitePredicate with modelAttributePredicate
in HandlerMethodValidationException and the associated validator.

Closes gh-32183
2024-02-01 17:56:07 +01:00
Sam Brannen af2934c09b Document support for overloading operators in SpEL in reference manual
Closes gh-32182
2024-02-01 17:24:25 +01:00
Sam Brannen 17ee82e004 Organize and clean up SpEL documentation tests 2024-02-01 16:22:14 +01:00
Sam Brannen a82108ec73 Clarify semantics of SpEL's between operator
See gh-32140
2024-02-01 14:58:21 +01:00
Stéphane Nicoll d4401cc69a Polish 2024-02-01 14:40:02 +01:00
Sam Brannen 2367314b52 Polish SpEL chapter 2024-02-01 13:57:25 +01:00
Sam Brannen 80a3c1923f Link to Jakarta EL instead of mentioning Unified EL in SpEL overview
As a bit of trivia, Jakarta EL was originally Unified EL, which was
originally JSP EL, which was originally SPEL.

SPEL: Simplest Possible Expression Language
SpEL: Spring Expression Language

So one could say that SPEL inspired SpEL.
2024-02-01 13:50:14 +01:00
Sam Brannen c989cba963 Add Checkstyle rule to enforce use of class literals for primitives & void
This commit introduces a globally applied Checkstyle rule which
enforces the use of class literals for primitive types and void by
forbidding the use of the TYPE constants in Boolean, Character, Byte,
Short, Integer, Long, Float, Double, and Void.

For example, if MyClass uses one of the TYPE constants, the build will
now fail with a message similar to the following.

[ERROR] <...>/MyClass.java:39: Please use class literals for primitives and void -- for example, int.class instead of Integer.TYPE.
2024-02-01 12:51:35 +01:00
Juergen Hoeller 3d4d68c26f Run listener/send task locally as fallback on RejectedExecutionException
Closes gh-32171
2024-02-01 11:07:02 +01:00
Stéphane Nicoll b61552b9df Merge pull request #32176 from quaff
* pr/32176:
  Fix assertion in BeanWrapperAutoGrowingTests

Closes gh-32176
2024-02-01 09:35:01 +01:00
Yanming Zhou 615973cce4 Fix assertion in BeanWrapperAutoGrowingTests
See gh-32176
2024-02-01 09:34:32 +01:00
Juergen Hoeller 00577ed80a Polishing 2024-01-31 17:12:20 +01:00
Juergen Hoeller 9b2b485444 Disabled test for auto-growing nested map values
See gh-32154
2024-01-31 17:12:12 +01:00
Juergen Hoeller d586513d66 Introduce SqlBinaryValue/SqlCharacterValue as alternative to SqlLobValue
Includes direct byte array support via setBytes in StatementCreatorUtils.

Closes gh-32161
2024-01-31 17:12:05 +01:00
Sam Brannen 2b52582dff Polishing 2024-01-31 16:41:15 +01:00
Stéphane Nicoll 67958656e4 Polish 2024-01-31 15:01:03 +01:00
Stéphane Nicoll a4db0e7448 Merge pull request #32164 from quaff
* pr/32164:
  Polish contribution
  Polish StatementCreatorUtilsTests

Closes gh-32164
2024-01-31 08:57:53 +01:00
Stéphane Nicoll ef2cae36ac Polish contribution
See gh-32164
2024-01-31 08:57:11 +01:00
Yanming Zhou efaf41862c Polish StatementCreatorUtilsTests
See gh-32164
2024-01-31 08:56:59 +01:00
Juergen Hoeller af5acb6d34 Avoid pre-conversion attempt in case of overloaded write methods
Closes gh-32159
See gh-31872
2024-01-30 21:57:14 +01:00
Sam Brannen 067638ae6e Introduce ClassUtils.isVoidType() utility method 2024-01-30 16:27:34 +01:00