Commit Graph

11572 Commits

Author SHA1 Message Date
Juergen Hoeller 08f2ab942c DefaultMessageListenerContainer stops if recovery failed after interrupt signal
Issue: SPR-11787
(cherry picked from commit 1253b45)
2016-02-19 15:54:52 +01:00
Juergen Hoeller d2b9dbf181 BeanMethodInterceptor does not pass on null arguments for singleton beans
Issue: SPR-13887
(cherry picked from commit 5ed9046)
2016-02-19 15:54:26 +01:00
Sebastien Deleuze 09db26af2b Improve Jackson 2.7 compatibility
This commit introduces a conditional call in
AbstractJackson2HttpMessageConverter#getJavaType() in order to avoid
calling TypeFactory#constructType() with a null contextClass parameter,
since this is not supported by Jackson 2.7 anymore.

It allows to use Spring Framework 4.2.x with Jackson 2.7.1+ for most use
cases, but with some limitations. For example, with Jackson 2.7
TypeVariable resolution from method parameters does not work.

As a consequence, after this commit Spring Framework 4.2.x still fully
supports Jackson up to version 2.6, but improves Jackson 2.7 compatibility.
Full support for Jackson 2.7 is provided as of Spring Framework 4.3.x.

Issue: SPR-13853
2016-02-11 13:45:49 +01:00
Juergen Hoeller 19c5462b13 Polishing 2016-02-10 20:48:10 +01:00
Juergen Hoeller 5047e90625 AbstractMarshaller defensively uses DocumentBuilderFactory within synchronized block
Issue: SPR-13935
(cherry picked from commit f61b998)
2016-02-10 20:47:54 +01:00
Juergen Hoeller cf3e460a8b ReflectiveMethodResolver lets local static methods override java.lang.Class methods
Issue: SPR-13918
(cherry picked from commit 43bcab9)
2016-02-10 20:47:41 +01:00
Juergen Hoeller c960d9733d DisposableBeanAdapter ignores bridge method conflicts
Issue: SPR-13922
(cherry picked from commit 903ae48)
2016-02-10 20:47:31 +01:00
Juergen Hoeller 9e7f6ba0b1 PathMatchingResourcePatternResolver consistently logs retrieval results
Issue: SPR-13923
(cherry picked from commit 449f704)
2016-02-10 20:47:24 +01:00
Juergen Hoeller d8a7b6f0f8 Latest dependency updates (Hibernate Validator 5.2.3, Joda-Time 2.9.2, OkHttp 2.7.4, SLF4J 1.7.15, Netty 4.0.34, Tomcat 8.0.32, Undertow 1.3.17) 2016-02-10 20:40:18 +01:00
Rossen Stoyanchev 6ef2d827c6 Reduce log level for @ExceptionHandler failure
Issue: SPR-13932
2016-02-09 12:58:08 -05:00
Rossen Stoyanchev b1a46ccbd9 Fix NPE in InvocableHandlerMethod
Issue: SPR-13917
2016-02-04 23:33:04 -05:00
Rossen Stoyanchev f053cdec51 Improve close in ConcurrentWebSocketSessionDecorator
Before this commit the concurrent session wrapper mainly protected the
sending of messages. The close itself however may also cause a message
to be sent as is the case of the SockJS protocol.

This change protects the close and checks if the session has exceeded
send time or buffer limits in which case the close status is changed
to SESSION_NOT_RELIABLE (introduced in commit cbd5af3a) which in turn
signals that extra care should be exercised when closing the session.

Issue: SPR-13904
2016-02-04 17:22:36 -05:00
Rossen Stoyanchev 39c05c56c4 BufferedImage converter writes Content-Type again
Issue: SPR-13906
2016-02-04 15:01:13 -05:00
Juergen Hoeller 4418331429 Polishing
(cherry picked from commit e903106)
2016-02-04 20:50:21 +01:00
Juergen Hoeller e48315549e AbstractXlsView does not explicitly flush (for compatibility with WebSphere Liberty)
Issue: SPR-13910
(cherry picked from commit 28e8af2)
2016-02-04 20:49:48 +01:00
Sam Brannen 484dd96606 Throw exception if TxMgr cannot be retrieved for @Transactional test
Prior to this commit, a @Transactional integration test would silently
be executed without a transaction if the transaction manager could not
be retrieved from the application context -- for example, it no such
bean was defined or if multiple beans were present but none satisfied
the qualifier.

This commit addresses this issue by throwing an IllegalStateException
if the PlatformTransactionManager cannot be retrieved for a
@Transactional test.

Issue: SPR-13895
(cherry picked from commit 6d2b9a0136)
2016-02-03 18:18:55 +01:00
Juergen Hoeller bb12e0ea70 Latest dependency updates (AspectJ 1.8.8, Hibernate ORM 5.0.7, Jackson 2.6.5, Jetty 9.3.7, Undertow 1.3.14, SLF4J 1.7.14) 2016-01-26 22:25:22 +01:00
Juergen Hoeller 30ef893c28 Polishing 2016-01-26 22:23:56 +01:00
Juergen Hoeller a58eee6ad1 RequestParamMethodArgumentResolver defensively handles MethodParameter nesting level and java.util.Optional access
Issue: SPR-13850
2016-01-26 22:07:27 +01:00
Juergen Hoeller 0866aa923a LocalSessionFactoryBuilder provides ClassLoader to Hibernate BootstrapServiceRegistry
Issue: SPR-13879
2016-01-26 20:35:30 +01:00
Juergen Hoeller d152259673 Clarify component scan include-filter semantics
Issue: SPR-13844
(cherry picked from commit 837cb75)
2016-01-26 20:30:34 +01:00
Juergen Hoeller 14babb78b4 Clarify environment property precedence rules
Issue: SPR-13845
(cherry picked from commit ebad8db)
2016-01-26 20:30:05 +01:00
Juergen Hoeller 4fc6ead548 SessionDisconnectEvent actually preserves given session user
Issue: SPR-13871
(cherry picked from commit cdc9bf7)
2016-01-26 20:29:08 +01:00
Juergen Hoeller c1f233c787 Shared EntityManager does not insist on actualTransactionActive flag anymore
Issue: SPR-13838
(cherry picked from commit 50829c9)
2016-01-26 20:28:07 +01:00
Juergen Hoeller 77b8f4d6af ImportStack extends ArrayDeque instead of Stack and relies on standard contains implementation
Issue: SPR-13852
(cherry picked from commit e14c2de)
2016-01-26 20:27:28 +01:00
Juergen Hoeller 8516de62e3 FastByteArrayInputStream consistently returns -1 when no data available
Issue: SPR-13858
(cherry picked from commit 5d4547d)
2016-01-26 20:26:44 +01:00
Brian Clozel bcebc9db7e Register prefixed path patterns with FixedVersionStrategy
Prior to this change, configuring a `FixedVersionStrategy` like so
would configure a single "/js/**" path pattern:

```
versionResourceResolver.addFixedVersionStrategy("v1.0.0","/js/**");
```

This commit makes sure that for each path pattern, its prefixed version
is added to the map. For example, the previous configuration also
adds "/v1.0.0/js/**".

Issue: SPR-13883
cherry-picked from 84fe46cd
2016-01-22 19:03:52 +01:00
Brian Clozel fc34b0c592 Reorder HTTP headers processing in RequestMappingHandlerAdapter
Prior to this change, the `RequestMappingHandlerAdapter` would first add
a "Cache-Control" HTTP header to the response (depending on its
`WebContentGenerator` configuration and `@SessionAttributes` on the
handler class); then, the Adapter would delegate the actual handler the
processing of the request.
This leads to issues, as the handler does not have full control to the
response and has to deal with pre-existing headers in the response. This
means that the Adapter and the handler can add incompatible
Cache-Control directives without knowing it, since one cannot see the
headers added by the other until the response is committed.

This commit switches the order of execution: first, the handler is
called (possibly adding HTTP headers), then the RMHA processes the
response and adds "Cache-Control" directives *only if there's no
Cache-Control header already defined*.

Issue: SPR-13867
cherry-picked from 8f1d06f19
2016-01-22 16:36:48 +01:00
Brian Clozel a4cb3cf900 Fix OutOfBoundsException in ResourceUrlEncodingFilter
Prior to this change, the `ResourceUrlEncodingFilter` would try to
lookup resources URLs as soon as the given URL would be longer than the
expected context+servlet prefix path. This can lead to
OutOfBoundsExceptions when the provided URL does not start with that
prefix and still has the required length.

This commit makes sure that all candidate URLs for resources lookup are
prefixed with the cached servlet and context path. This underlines the
fact that the `ResourceUrlEncodingFilter` does not support relative URLs
for now and delegates to the native servlet implementation in that case.

Issue: SPR-13861
cherry-picked from 2f6d86b7
2016-01-21 17:39:37 +01:00
Rossen Stoyanchev 33112df237 Fix second failing test 2016-01-20 23:13:34 -05:00
Rossen Stoyanchev e159086201 Fix failing test 2016-01-20 21:39:41 -05:00
Rossen Stoyanchev ab16adab2e Avoid double encoding URI in ServletServerHttpRequest
Issue: SPR-13876
2016-01-20 17:58:07 -05:00
Ian Chan 29692fcc21 Catch RejectedExecutionException in WebAsyncManager
Issue: SPR-13836
2016-01-14 15:50:20 -05:00
Rossen Stoyanchev 73df50db3c Fix javadoc issue in ResponseEntityExceptionHandler
Issue: SPR-13869
2016-01-14 14:28:15 -05:00
Brian Clozel 3af62bd0dd Polish
Issue: SPR-13817
(cherry picked from d681f77d)
2016-01-05 17:33:04 +01:00
Brian Clozel 1581597092 Preserve ETag HTTP header for versioned resources
Prior to this change, a resource handler chain configured with a
`VersionResourceResolver` would add the resource version to the request
attributes when serving that resource. This approach would not work when
a `CachingResourceResolver` is configured and the resource is already
cached. Indeed, that code path is not executed when the resource is
resolved from the cache.

This commit adds a new `VersionedResource` interface that's used by the
`VersionResourceResolver`, adding a `getVersion()` method that returns
the version string for that resource. This way, the version information
is cached with the resource itself and the request attributes are no
longer used for this.

Issue: SPR-13817
(cherry picked from commit 473cf9c)
2016-01-05 15:04:05 +01:00
Juergen Hoeller 84e5234eb5 Avoid getTypeForFactoryBean warn logging for lazy-init beans
Issue: SPR-13833
(cherry picked from commit 04f3181)
2015-12-31 11:52:55 +01:00
Juergen Hoeller 24e58c1ac3 Refined RequestMappingHandlerMapping bean definition
Issue: SPR-13832
(cherry picked from commit 9bffb9e)
2015-12-31 11:52:47 +01:00
holub 15da48eba5 Update SockJS client code snippet 2015-12-30 10:29:01 +01:00
Juergen Hoeller 342d760f70 Polishing
(cherry picked from commit 27c2e8c)
2015-12-29 21:51:04 +01:00
Juergen Hoeller acecda7153 Avoid sensitive Proxy.getInvocationHandler call in synthesizeAnnotation
Issue: SPR-13829
(cherry picked from commit aecb8b6)
2015-12-29 21:50:49 +01:00
Juergen Hoeller 4a863c9066 Upgrade to Undertow 1.3.11
(cherry picked from commit 873b173)
2015-12-29 11:26:52 +01:00
Juergen Hoeller 35b8696523 Polishing 2015-12-29 11:24:56 +01:00
Juergen Hoeller e1bdf5577e StatementCreatorUtils always tries getParameterType on Oracle 12c driver
Issue: SPR-13825
(cherry picked from commit e48ec4f)
2015-12-29 11:23:49 +01:00
Juergen Hoeller deae872912 Consistent use of varargs plus related polishing 2015-12-22 23:50:05 +01:00
Juergen Hoeller 36940e003d Polishing 2015-12-21 22:38:25 +01:00
Juergen Hoeller 935d714333 SimpleNamespaceContext implements all subtleties of the NamespaceContext contract
Issue: SPR-13713
(cherry picked from commit f8860e2)
2015-12-21 22:35:47 +01:00
Juergen Hoeller 9021f8fd71 Upgrade to JavaMail 1.5.5 and Hibernate ORM 5.0.6
(cherry picked from commit 06056e6)
2015-12-21 22:35:23 +01:00
Juergen Hoeller 6f2f3595e9 Backported import and declaration cleanup 2015-12-18 00:18:09 +01:00
Juergen Hoeller d59a97c101 Polishing 2015-12-18 00:02:48 +01:00