Commit Graph

14136 Commits

Author SHA1 Message Date
Juergen Hoeller 1b2dc3638f Revisit Assert to avoid single-arg assert methods (with refined messages)
Issue: SPR-15196
2017-01-30 22:15:55 +01:00
Juergen Hoeller 768802fa96 ResourceHttpMessageConverter reads Content-Disposition header to expose filename through Resource
Issue: SPR-15191
2017-01-30 22:15:30 +01:00
Juergen Hoeller f51b896bd9 Latest dependency updates (OkHttp 3.6, Apache HttpClient 4.5.3, Log4J 2.8) 2017-01-30 22:13:54 +01:00
Toshiaki Maki f2fa74055e Fix missing uriVariables 2017-01-30 12:10:51 -05:00
Rossen Stoyanchev cd476832cc Add check for Long.MAX_VALUE
Issue: SPR-15203
2017-01-30 10:03:20 -05:00
Rossen Stoyanchev 74a3013174 Replace use of deprecated Reactor Operators#getAndAdd 2017-01-30 09:14:05 -05:00
Arjen Poutsma 69c16f3821 Add headers in InterceptingClientHttpRequest
This commit *adds* the "intercepted" headers to the ClientHttpRequest,
as opposed to replacing them, which is what happened before this commit.

Issue: SPR-15166
2017-01-30 14:18:50 +01:00
Rossen Stoyanchev b487ed6748 Fix trailing slash issue
Issue: SPR-15201
2017-01-28 12:38:44 -05:00
Rossen Stoyanchev ee861e8001 Fix compiler deprecation-related errors 2017-01-27 17:26:14 -05:00
Rossen Stoyanchev ecb2e97ab4 Merge changes for SPR-15124 2017-01-27 16:46:51 -05:00
Rossen Stoyanchev d057c3d981 Deprecate DefaultUriTemplate handler
Following on the introduction of the UriBuilderFactory and its
DefaultUriBuilderFactory implementation, this commit deprecates
DefaultUriTemplate (and AbstractUriTemplateHandler).

The new DefaultUriBuilderFactory has comparable functionality and is
more flexible but cannot be merged  into the existing hierarchy and
be backwards compatible with regards to protected methods.

Issue: SPR-15124
2017-01-27 16:38:16 -05:00
Rossen Stoyanchev 8edc680957 Scale back static factory methods in ClientRequest
Following on the introduction of WebClientOperations in the last commit
this commit removes the HTTP method specific factory methods and also
scales back the builder options in ClientRequest.

ClientRequest is now expected to be used mainly from an
ExchangeFilterFunction which may modify the ClientRequest using the
from(ClientRequest) entry point rather creating from scratch.

Issue: SPR-15124
2017-01-27 15:59:03 -05:00
Rossen Stoyanchev f6ec35394f Introduce WebClientOperations
Issue: SPR-15124
2017-01-27 15:04:10 -05:00
Rossen Stoyanchev 7b67b5bc2a Introduce UriBuilderFactory and UriBuilder
Issue: SPR-15124
2017-01-27 14:07:55 -05:00
Rossen Stoyanchev cb0d992303 Refactor test HttpServer implementations
Due to the static nature of JUnit parameterized test inputs, an
HttpServer instance is re-used for all tests per test class.

This commit adds lifecycle handling to AbstractHttpServer with a
lifecycle monitor to ensure test server fields are properly
initialized and reset after each test .
2017-01-27 10:31:08 -05:00
Stephane Nicoll 33f0995b42 Merge pull request #1307 from Shredder121:assert-message
* pr/1307:
  Polish contribution
  Check for null on the argument instead of the message
2017-01-27 14:17:33 +01:00
Stephane Nicoll d550eb152c Polish contribution
Closes gh-1307
2017-01-27 14:17:13 +01:00
Ruben Dijkstra f1c7e0f5b2 Check for null on the argument instead of the message
See gh-1307
Issue: SPR-15196
2017-01-27 14:15:24 +01:00
Brian Clozel 944d17f237 Harmonize Tomcat dependencies
Use `tomcat-embed-core` instead of `tomcat-catalina`
for tomcat internal classes.
2017-01-26 18:31:11 +01:00
Sebastien Deleuze 7ff257c0ea Prevent NPE in ScriptTemplateView when no view is found
Issue: SPR-15064
2017-01-26 15:29:55 +01:00
Sebastien Deleuze 2a5d1b086f Fix Spring MVC ScriptTemplateView locale support
The locale should be set in resolveViewName() instead of
createView() in order to be taken in account with cached
views.

Issue: SPR-15064
2017-01-26 14:33:21 +01:00
Rossen Stoyanchev 4aac7c2ee2 Minor refactoring in Tomcat/Jetty adapters 2017-01-26 07:37:46 -05:00
Rossen Stoyanchev a2aaa05592 Polish 2017-01-26 07:25:22 -05:00
Violeta Georgieva 383375c35f Use separate reactive HttpHandler for Tomcat/Jetty
Introduce separate adapters TomcatHttpHandlerAdapter/JettyHttpHandlerAdapter
so that each adapter can use the Tomcat/Jetty APIs for reading/writing
with ByteBuffer.
2017-01-26 06:21:44 -05:00
Rossen Stoyanchev ea67a637ae Align setup of SockJS and WebSocket integration tests
Failures in JettySockJsIntegrationTests after the upgrade to 9.4 were
hidden due to the PERFORMANCE test group but were failing on the CI
performance build with IllegalStateException inside Jetty on
"Failure find the required ServletContext attribute
org.eclipse.jetty.util.DecoratedObjectFactory".
2017-01-26 06:17:03 -05:00
Sam Brannen 871f5efeaa Clean up warnings in spring-test 2017-01-26 01:27:15 +01:00
Rossen Stoyanchev ae034e9afe Polish content disposition 2017-01-25 17:19:30 -05:00
Rossen Stoyanchev eabd8a2964 Support Servlet Part in Spring MVC Test
Issue: SPR-14253
2017-01-25 17:05:30 -05:00
Rossen Stoyanchev c8f98ecd8d Add MockPart to spring-test
Issue: SPR-14252
2017-01-25 17:05:25 -05:00
Sam Brannen 3bc819799b Polishing 2017-01-25 19:40:08 +01:00
Rossen Stoyanchev f5d2b88e3f "sharedHttpSession" shortcut for MockMvc builders
Issue: SPR-13820
2017-01-25 12:33:11 -05:00
Rossen Stoyanchev 1d35c7c55a Polish MockMvc setup classes 2017-01-25 12:33:11 -05:00
Sebastien Deleuze 2d95199466 Support i18n and nested templates in ScriptTemplateView
This commit changes the 3rd parameter passed to the rendering
function from String url to RenderingContext renderingContext.

RenderingContext contains 4 properties:
 - ApplicationContext applicationContext
 - Locale locale
 - Function<String, String> templateLoader
 - String url

Issue: SPR-15064
2017-01-25 17:23:20 +01:00
Juergen Hoeller 8038fb9c8b HandlerMethod pre-resolves parameter types at construction time
Issue: SPR-15186
2017-01-25 11:09:43 +01:00
Sam Brannen 4e65c10272 Fix broken test in SpringJUnit4ConcurrencyTests
Prior to this commit, SpringJUnit4ConcurrencyTests was broken due to
recent additions of test methods in SampleTests.

This commit fixes the broken test by removing hard coded constants and
replacing them with dynamic lookups for JUnit 4 @Test methods.
2017-01-25 05:56:02 +01:00
Violeta Georgieva 1443c0808d Enable suspend/resume on reactive JettyWebsocketSession
Issue: SPR-15130
2017-01-24 19:49:18 -05:00
Juergen Hoeller 4a57d4512e Reset cached ResolvableType on increaseNestingLevel/setContainingClass
Issue: SPR-15160
2017-01-25 00:30:05 +01:00
Juergen Hoeller 5e946c2700 Consistent type variable resolution for arrays/collections (in particular at field level)
Dropping GenericCollectionTypeResolver in favor of direct ResolvableType usage.

Issue: SPR-15160
2017-01-24 18:00:17 +01:00
Juergen Hoeller e8776f80da Revised CookieLocaleResolver parse exception handling
Issue: SPR-15182
2017-01-24 17:48:54 +01:00
Juergen Hoeller 12973ac702 Polishing 2017-01-24 00:12:53 +01:00
Juergen Hoeller cb242894a9 Upgrade to Jetty 9.4.1 2017-01-23 21:47:00 +01:00
Juergen Hoeller f095aa20eb Polishing 2017-01-23 21:28:40 +01:00
Juergen Hoeller e94fa3f34d WebSocketSession.getExtensions consistently exposes unmodifiable/empty list
Issue: SPR-15180
2017-01-23 21:28:30 +01:00
Juergen Hoeller a0df36ddda HiddenHttpMethodFilter defensively proceeds with original request in case of error dispatch
Issue: SPR-15179
2017-01-23 21:25:21 +01:00
Juergen Hoeller ecc22f7179 DispatcherServet.checkMultipart considers MultipartException cause as well
Issue: SPR-15178
2017-01-23 21:22:38 +01:00
Juergen Hoeller 7d3fcaa934 Consider abstract classes with @Lookup methods as candidate components
Issue: SPR-14550
2017-01-23 17:28:18 +01:00
Juergen Hoeller ed40b1c8ee Remove outdated abstractions/delegates from core/util
Issue: SPR-15159
2017-01-23 13:41:55 +01:00
Juergen Hoeller 6fe7e56598 Document further configuration class restrictions
Issue: SPR-14602
2017-01-23 13:39:11 +01:00
Juergen Hoeller 253060c21c Only expose ASM-driven method order if the methods match
Issue: SPR-14505
2017-01-23 13:37:22 +01:00
Juergen Hoeller a9ae2c3402 Polishing 2017-01-23 12:42:01 +01:00