Commit Graph

16751 Commits

Author SHA1 Message Date
Juergen Hoeller
c73b98cf33 Clarify destruction order effect in @DependsOn annotation javadoc
Issue: SPR-17384

(cherry picked from commit 00b7782b5f)
2018-10-24 21:24:42 +02:00
Brian Clozel
cf25efc7d3 Fix ResourceUrlEncodingFilter lifecycle
Prior to this commit, the `ResourceUrlEncodingFilter` would wrap the
response and keep a reference to the request. When
`HttpServletResponse.encodeURL` is later called during view rendering,
the filter looks at the request and extracts context mapping information
in order to resolve resource paths in views.

This approach is flawed, when the filter is used with JSPs - if the
request is forwarded to the container by the `InternalResourceView`,
the request information is overwritten by the container. When the view
is being rendered, the information available in the request is outdated
and does not allow to correctly compute that context mapping
information.

This commit ensures that that information is being extracted from the
request as soon as the `ResourceUrlProvider` is set as a request
attribute.

Issue: SPR-17421
(Cherry-picked from 50a4769162)
2018-10-24 21:19:33 +02:00
Rossen Stoyanchev
36510cf808 Server adapters release buffers on error/cancel
Review and update Servlet and Undertow adapters to release any data
buffers they be holding on to at the time of error or cancellation.

Also remove onDiscard hooks from Reactor and Undertow request body.
For Reactor we expect it to be handled. For Undertow there isn't
any Reactor Core upstream for the callback to be useful.

Issue: SPR-17410
2018-10-23 20:56:08 -04:00
Rossen Stoyanchev
d492d7b6a4 Update ref docs on ResponseEntity and reactive types
Issue: SPR-17400
2018-10-23 17:06:02 -04:00
Rossen Stoyanchev
bf4d00cb62 Upgrade to Reactor Bismuth snapshots
Towards SR13 to confirm fix for SPR-17306.
2018-10-23 15:49:09 -04:00
Rossen Stoyanchev
6ea3441adf Restore log level for resolved exceptions
The fix for SPR-17178 switched from debug to warn level warning for
all sub-classes of AbstractHandlerExceptionResolver where the request
concerned the DefaultHandlerExceptionResolver only.

This commit restores the original DEBUG level logging that was in
AbstractHandlerExceptionResolver from before SPR-17178. In addition
DefaultHandlerExceptionResolver registers a warnLogCategory by default
which enables warn logging and hence fulfilling the original goal
for SPR-17178.

Issue: SPR-17383
2018-10-22 12:18:33 -04:00
Sebastien Deleuze
73db2081cd Leverage Java reflection for Kotlin enums
As discussed in KT-25165, from a Kotlin POV enum constructors
have no parameter, this is an "implementation detail"
required for running on the JVM, so it seems relevant to skip
Kotlin reflection in that case and just delegate to Java
reflection.

Issue: SPR-16931
2018-10-16 16:42:31 +02:00
Spring Buildmaster
38490f13b1 Next Development Version 2018-10-15 08:01:59 +00:00
Rossen Stoyanchev
c8e320019f HttpRange validates requested ranges
Issue: SPR-17318
2018-10-14 22:53:33 -04:00
Juergen Hoeller
973eb5deb6 MethodValidationInterceptor excludes FactoryBean metadata methods
Issue: SPR-17374

(cherry picked from commit 5f2d47a17e)
2018-10-14 21:16:01 +02:00
Rossen Stoyanchev
b89cb20b1d Lenient date parsing in HeadersResultMatchers
Rather than formatting the expected value, and be susceptible to
minor formatting differences (e.g. 01 vs 1 for day of month), parse the
actual header value leniently with HttpHeaders and compare time values.

Issue: SPR-17330
2018-10-12 15:51:32 -04:00
Juergen Hoeller
52ed4226bd Tests for MockHttpServletRequestTests.setContent reset in 5.0.x
Issue: SPR-17373
2018-10-12 17:57:07 +02:00
volkovandr
b0433810da Updated Javadoc: date format patterns SPR-17366
(cherry picked from commit 61403e3bd3)
2018-10-12 17:56:58 +02:00
Christian Kulpa
db2c807515 Fix deprecated property in MBeanExporter documentation 2018-10-12 16:30:11 +02:00
Juergen Hoeller
a45bce1369 Polishing 2018-10-10 00:15:58 +02:00
Juergen Hoeller
8d1499e168 Comparators.nullsLow creates right kind of NullSafeComparator
Issue: SPR-17357
2018-10-10 00:15:50 +02:00
Juergen Hoeller
ff0afcff06 Resource.lastModified() propagates 0 value if target resource exists
Includes consistent use of getContentLengthLong over getContentLength.

Issue: SPR-17320
2018-10-10 00:15:27 +02:00
Juergen Hoeller
53430760f3 Consistent exposure of empty attribute arrays in AnnotationMetadata
Issue: SPR-17347

(cherry picked from commit 83909e6e1e)
2018-10-10 00:15:04 +02:00
Juergen Hoeller
d61a7ed1f0 AbstractApplicationContext.getApplicationListeners() exposes all statically registered listeners
Issue: SPR-17324

(cherry picked from commit c8c0737ce7)
2018-10-10 00:14:48 +02:00
Juergen Hoeller
ca0ce7d631 AbstractApplicationEventMulticaster pre-sorts singleton listeners
Issue: SPR-17307

(cherry picked from commit 9063e66c5d)
2018-10-10 00:14:39 +02:00
Rossen Stoyanchev
fc2f3ecf44 More defensive check for MockAsyncContext
Avoid automatically unwrapping the request in TestDispatcherServlet,
if we find the MockAsyncContext.

Issue: SPR-17353
2018-10-09 11:57:34 -04:00
Rossen Stoyanchev
d551710c32 Restore calls to setLocale in MockHttpServletResponse
Issue: SPR-17284
2018-10-05 13:53:19 -04:00
Rossen Stoyanchev
6fe8cb949f Workaround for Synchronoss content-length limitation
Issue: SPR-17345
2018-10-05 13:52:58 -04:00
dmrachkovskyi
842297699d Defer obtaining argument resolver default value
Issue: SPR-17338
2018-10-05 13:52:28 -04:00
Juergen Hoeller
d90d65bad2 Polishing 2018-09-29 17:36:15 +02:00
Juergen Hoeller
a21ce42558 MockHttpServletRequest allows for removing registered header entries
Issue: SPR-17295
2018-09-29 17:36:03 +02:00
Juergen Hoeller
e54eb56cb9 Revised javadoc for up-to-date constructor autowiring semantics
Issue: SPR-17299

(cherry picked from commit 333e327289)
2018-09-29 17:35:55 +02:00
Juergen Hoeller
f5e6c707ae Polishing 2018-09-19 22:51:35 +02:00
Juergen Hoeller
c0b0ee6db7 Polishing 2018-09-18 21:54:48 +02:00
Juergen Hoeller
4642c32c0f Defensively expect concurrent registration of BeanPostProcessors
Declaring beanPostProcessors (and also embeddedValueResolvers) as CopyOnWriteArrayList prevents ConcurrentModificationExceptions in case of concurrent registration/access attempts.

Issue: SPR-17286
2018-09-18 21:54:33 +02:00
Juergen Hoeller
a55261f82d Polishing 2018-09-17 15:00:33 +02:00
Juergen Hoeller
5ca2c56cf0 Polishing 2018-09-17 14:39:54 +02:00
Juergen Hoeller
702d533e6f Polishing 2018-09-14 23:59:45 +02:00
Juergen Hoeller
1535f985be Polishing 2018-09-14 14:30:03 +02:00
Juergen Hoeller
94ae933122 Upgrade to Rhino 1.7.10 and Apache Johnzon 1.1.9
Includes reordering of web dependency declarations.
2018-09-14 14:29:57 +02:00
Arjen Poutsma
952315c333 DataBufferUtils does not release DataBuffer on error cases
This commit makes sure that in DataBufferUtils.write, any received data
buffers are returned as part of the returned flux, even when an error
occurs or is received.

Issue: SPR-16782

(cherry picked from commit 1a0522b805)
2018-09-12 14:58:37 +02:00
Arjen Poutsma
a00607348c Fixed DataBufferUtils.join leak for error in source
This commit fixes an issue where DataBufferUtils.join() would not
release databuffers that preceded an error signal.

Issue: SPR-17025

(cherry picked from commit 196c0adf47)
2018-09-12 14:45:45 +02:00
Juergen Hoeller
1d58fac54d UriComponentsBuilder copies query params through MultiValueMap.addAll
Issue: SPR-17256
2018-09-11 15:15:15 +02:00
Juergen Hoeller
658bd7a686 Correct linkplain javadoc in BufferingClientHttpRequestFactory
Issue: SPR-17261

(cherry picked from commit e47355078c)
2018-09-11 15:15:00 +02:00
Juergen Hoeller
717e6dd2d9 Revise ServletUriComponentsBuilder javadoc
Issue: SPR-17255
2018-09-07 18:21:25 +02:00
Spring Buildmaster
7f82c192f5 Next Development Version 2018-09-07 12:16:08 +00:00
Juergen Hoeller
dcdd08c432 Remove declaration for snapshot repository 2018-09-07 13:13:06 +02:00
Juergen Hoeller
06ed818f4c Fix SpEL compilation for non trivial elvis operand
Issue: SPR-17214
2018-09-07 13:12:53 +02:00
Juergen Hoeller
ad5447253c ConfigurationClassParser consistently uses ClassUtils.forName
Issue: SPR-17253

(cherry picked from commit c803ad7998)
2018-09-07 13:12:26 +02:00
Juergen Hoeller
7653762240 XMLEventReader.getElementText() properly checks for start element
Issue: SPR-17233

(cherry picked from commit 84ec382201)
2018-09-07 13:12:10 +02:00
Sebastien Deleuze
89fca1b949 Fix Kotlin inner class nested configuration handling
Before this commit, Kotlin inner class nested configuration
handling thrown an IndexOutOfBoundsException due to bogus filtering
of its constructor parameter reference to an instance of the outer
class.

This commit keep constructor parameter of type INSTANCE in order to
throw a more meaningful NoSuchBeanDefinitionException.

Issue: SPR-17222
2018-09-07 11:42:23 +02:00
Rossen Stoyanchev
92bb76f3cd Disable Jackson's buffer recyling feature for WebFlux
Issue: SPR-17193
2018-09-06 16:21:27 -04:00
Stephane Nicoll
4b6a5fbd13 Upgrade to Reactor Bismuth SR11 2018-09-06 15:38:15 +02:00
Rossen Stoyanchev
b17e7c321a Use random id for WebSocket sessions
Issue: SPR-17228
2018-09-05 19:49:50 -04:00
Toshiaki Maki
ee559bb2c8 Use long for expires and lastModified in HeaderAssertions
This commit changes the type of parameters so that HeaderAssertions
can assert expires and lastModified properly.

Issue: SPR-17194
2018-09-05 17:26:42 -04:00