Commit Graph

11452 Commits

Author SHA1 Message Date
Juergen Hoeller
2ea7fcde3e Polishing
(cherry picked from commit 9af12d2)
2016-03-24 17:17:58 +01:00
Juergen Hoeller
7c5aac122a Restored lazy resolution of default executor for AsyncAnnotationBeanPostProcessor
Issue: SPR-14030
(cherry picked from commit 155fa37)
2016-03-24 17:17:52 +01:00
Juergen Hoeller
05ab769555 Bsh/GroovyScriptFactory reset script cache in case of compilation error
Issue: SPR-14007
(cherry picked from commit 0597ff1)
2016-03-24 17:17:10 +01:00
Juergen Hoeller
a19be754c8 DefaultCorsProcessor checks for existing CORS response before attempting to compare origin
Issue: SPR-14080
(cherry picked from commit abe7345)
2016-03-24 17:17:04 +01:00
Juergen Hoeller
8994498b44 Revised newline handling tests pass on Windows now
Issue: SPR-13503
(cherry picked from commit 311d4c9)
2016-03-24 17:16:52 +01:00
Juergen Hoeller
fcd155a92c Correct RFC 4648 references in method-level javadoc
Issue: SPR-14067
(cherry picked from commit ec7c3aa)
2016-03-24 17:16:41 +01:00
Juergen Hoeller
bfe8d15e97 Removed invalid quoting of message arguments from MessageSource examples
Issue: SPR-14003
(cherry picked from commit 100f3c5)
2016-03-24 17:16:33 +01:00
Juergen Hoeller
a5904efbde Upgrade to XStream 1.4.9
Issue: SPR-14084
(cherry picked from commit 7e4563a)
2016-03-24 17:16:24 +01:00
Brian Clozel
ed34ea4876 Reset Expires HTTP header when caching configured
Just like SPR-13252 addressed this issue for the "Pragma" header, this
issue resets the HTTP 1.0 "Expires" header.
When such a header has been set (by a filter, for example) and HTTP
caching has been configured at the WebContentGenerator, this header
value is reset to "". In this case, "Cache-Control" and "Expires" might
have inconsistent values and we consider that the HTTP caching
configuration should take precedence.

Depending on the servlet container chosen to deploy the application,
this might result in empty "" header values or no header set at all.

Issue: SPR-14053
Cherry picked from 15fe8279e6
2016-03-23 16:35:53 +01:00
Kazuki Shimizu
2267b14055 Add newline at the beginning of textarea macro for FreeMarker and Velocity
Issue: SPR-13503
Cherry-picked from 9b2023111d
2016-03-23 11:56:28 +01:00
Stephane Nicoll
0c8a40bdbc Fix escaping of #
This commit disables the "quotes" substitutions on specific XML
examples that require to use the reserved `#` character.

Issue: SPR-14074
2016-03-21 12:51:40 +01:00
Rossen Stoyanchev
d7062f6291 Ensure RedirectModel is initialized
This commit fixes an old bug in ModelAndViewContainer where getModel
returns a new ModelMap instance that isn't saved and re-used.

Issue: SPR-14045
2016-03-14 23:04:58 -04:00
Stephane Nicoll
bd82acbf99 Support ResolvableTypeProvider on simple event pojo
Previously, the generic type of a simple pojo event implementing
ResolvableTypeProvider wasn't detected properly. This commit fixes the
logic when the generic type is not provided to reuse what
PayloadApplicationEvent is already doing anyway.

Issue: SPR-14029
2016-03-10 09:51:43 +01:00
Brian Clozel
f76b38c506 Fix SpringUrl Velocity macro URI encoding
Prior to this commit, the springUrl Velocity macro would only prepend
the context to the given URL; this means that the
ServletHttpResponse.encodeUri method is not called and neither the
ResourceUrlProvider.

This commit changes this macro to use RequestContext.getContextUrl which
prepends the context and encodes the URI.

Issue: SPR-14027
Cherry-picked from 0a56667093
2016-03-08 18:01:29 +01:00
Brian Clozel
b88c39955b Add newline at the beginning of textarea JSP tags
This commit adds a newline char at the beginning of textarea tags
values. As per the HTML 4.01 spec (and browsers behavior), a line break
following a start tag is ignored.

This can lead to Spring's textarea tag to ignore a line break char at
the beginning of a tag value.

See https://www.w3.org/TR/html401/appendix/notes.html#notes-line-breaks

Issue: SPR-13503
Cherry picked from 44c32128
2016-03-03 16:52:16 +01:00
Brian Clozel
0ef90df120 Relax SPR-13867 changes for ResourceHttpRequestHandler
Prior to this change, SPR-13867 made sure that any class extending
WebContentGenerator would not overwrite existing HTTP "Cache-Control"
response headers - set by a filter, a Controller handler, etc.

This caused issues with resource handling, since specifying a cache
configuration there would not overwrite default headers set by filters,
for example by Spring Security.

This commit restricts the previous changes to the
RequestMappingHandlerAdapter, in order to avoid overwriting header set
by a filter or a Controller handler in those cases.

Issue: SPR-14005
Cherry-picked from 50bcd67fb6
2016-03-02 17:45:50 +01:00
Juergen Hoeller
8a44560d82 RequestMappingHandlerAdapter properly invokes handler method in case of no session as well
Issue: SPR-13999
(cherry picked from commit a02fd7c)
2016-02-29 15:08:00 +01:00
Juergen Hoeller
0349abc565 RequestMappingHandlerAdapter properly invokes handler method in synchronizeOnSession mode again
Issue: SPR-13999
(cherry picked from commit 1815a6a)
2016-02-29 11:46:16 +01:00
Juergen Hoeller
9129ec2623 LinkedCaseInsensitiveMap provides reliable getOrDefault implementation
Issue: SPR-13981
(cherry picked from commit 7a32ce3)
2016-02-29 11:42:43 +01:00
Spring Buildmaster
2cbc5ff0c8 Next Development Version 2016-02-25 01:36:20 -08:00
Juergen Hoeller
cafb99a33d Polishing
(cherry picked from commit 028a690)
2016-02-24 17:59:15 +01:00
Juergen Hoeller
9c5cabf4ba Refined ApplicationContextInitializer assignability exception
(cherry picked from commit ca19920)
2016-02-24 17:58:29 +01:00
Juergen Hoeller
97b017781a TimerScheduledFuture correctly calculates getDelay result
Issue: SPR-13977
(cherry picked from commit a68b910)
2016-02-24 17:56:30 +01:00
Juergen Hoeller
9f2b3ca8b8 Polishing
(cherry picked from commit 1899fb3)
2016-02-23 00:05:44 +01:00
Juergen Hoeller
3f795e64c6 Avoid NPE in case of @Lazy @Autowired(required=false)
Issue: SPR-13967
(cherry picked from commit b9fe6d8)
2016-02-23 00:05:17 +01:00
Juergen Hoeller
99dc7769a6 Latest dependency updates (EhCache 3.0 M5, Groovy 2.4.6, Gson 2.6.1, Hibernate ORM 5.0.8, Hibernate Validator 5.2.4, SLF4J 1.7.16, SnakeYAML 1.17, Undertow 1.3.18) 2016-02-23 00:04:49 +01:00
Juergen Hoeller
a620770470 Polishing 2016-02-19 16:02:25 +01:00
Juergen Hoeller
167ba8387a ScriptUtils.executeSqlScript logs SQLWarnings at debug level
Issue: SPR-13959
(cherry picked from commit 9235345)
2016-02-19 15:59:47 +01:00
Juergen Hoeller
4320161172 Shared EntityManager Query unwrapping before passing it to addNamedQuery
Issue: SPR-13957
(cherry picked from commit 7fcb277)
2016-02-19 15:59:24 +01:00
Juergen Hoeller
659e44146c Consistent equals implementations across class hierarchies
Issue: SPR-13951
(cherry picked from commit ac44f9e)
2016-02-19 15:56:36 +01:00
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