Commit Graph

9474 Commits

Author SHA1 Message Date
Rossen Stoyanchev
38ef6dec50 Fix test issue with Set iteration order 2014-10-29 17:23:04 -04:00
Juergen Hoeller
c7a93a80d4 Configuration class parsing reuses metadata from AnnotatedBeanDefinition as far as possible
Issue: SPR-12394
2014-10-29 22:08:48 +01:00
Juergen Hoeller
725ad0df50 SimpleMetadataReaderFactory is capable of resolving inner class names with dot syntax now (analogous to ClassUtils.forName)
Issue: SPR-12390
2014-10-29 22:03:01 +01:00
Juergen Hoeller
807864fa9a Latest dependency updates (Hibernate Validator 5.1.3, Undertow 1.0.17, SnakeYAML 1.14) 2014-10-29 11:59:04 +01:00
Juergen Hoeller
ffc4e03293 Removed outdated TimerTaskExecutor reference
Issue: SPR-12389
2014-10-29 11:21:23 +01:00
Rossen Stoyanchev
8f21c85511 Explicitly close Spring context in WS integration test 2014-10-28 22:10:49 -04:00
Rossen Stoyanchev
8c727be4e1 Close Spring context in SockJS integration test setup 2014-10-28 17:51:15 -04:00
Rossen Stoyanchev
70e6e3bb39 Fix condition check in SockJsClient lifecycle method 2014-10-28 17:51:15 -04:00
Juergen Hoeller
b70c5d1ff1 Normalized AnnotationAttributesReadingVisitor class layout and improved diagnostics through delegating to AnnotationUtils
Issue: SPR-12387
2014-10-28 19:08:45 +01:00
Juergen Hoeller
1e9ab53095 CharacterEditor uses Character.valueOf(char) and throws a more descriptive exception
Issue: SPR-12386
2014-10-28 18:28:15 +01:00
Juergen Hoeller
33d85d2a13 EclipseLinkJpaDialect preserves lazy retrieval of UnitOfWork as far as possible
Issue: SPR-12319
2014-10-28 16:39:19 +01:00
Juergen Hoeller
c0747a006a JdbcUtils.getResultSetValue avoids re-retrieval from ResultSet for Blob/Clob content (for Derby compatibility)
Issue: SPR-8810
2014-10-28 16:19:16 +01:00
Juergen Hoeller
06632822e9 Log4jConfigurer initLogging(location) throws FileNotFoundException for file URL as well
Issue: SPR-9725
2014-10-28 16:18:55 +01:00
Sebastien Deleuze
17b9bde336 Set ResponseStatusExceptionResolver.messageSource in the MVC Java config
Issue: SPR-12380
2014-10-28 13:44:13 +01:00
Juergen Hoeller
ad2d5952c6 XmlOptionsFactoryBean initializes empty XmlOptions by default and uses efficient entrySet iteration
Issue: SPR-12383
2014-10-28 13:34:56 +01:00
Juergen Hoeller
cb095132b1 Defensive String equals comparison in ClassReader
Issue: SPR-12382
2014-10-28 13:23:55 +01:00
Juergen Hoeller
4945cf1bd1 Optimized parameter length comparisons for constructor/method sorting
Issue: SPR-12385
2014-10-28 13:22:22 +01:00
Rossen Stoyanchev
a377878038 Minor doc update
Issue: SPR-12375
2014-10-27 17:27:24 -04:00
Rossen Stoyanchev
584b831bb9 Allow HTTP delete with request entity
Issue: SPR-12361
2014-10-27 16:48:59 -04:00
Andy Clement
03fc9e89a0 Fixed isWritable for badly formed SpEL expressions
Before this change isWritable() could return true
for a badly formed expression. That is because the
decision about whether something is writable was made
based on the node type rather than whether the node
represented something that could actually be resolved
to be a real thing. This change ensures a resolution
check is done and isWritable() should only return
true if a subsequent setValue() will succeed.

Issue: SPR-10610
2014-10-27 11:35:51 -07:00
Rossen Stoyanchev
083dece106 Polish netty client support
Mostly updates based on:
https://github.com/spring-projects/spring-framework/wiki/Spring-Framework-Code-Style
2014-10-27 14:12:53 -04:00
Rossen Stoyanchev
e1207571fc Add Netty version property to build.gradle
Issue: SPR-12381
2014-10-27 13:57:37 -04:00
Arjen Poutsma
7de0a70f0c Netty support for (Async)RestTemplate
This commit introduces an AsyncClientHttpRequestFactory based on Netty
4, for use with the (Async)RestTemplate.
2014-10-27 13:57:37 -04:00
Juergen Hoeller
a13bb69cbe PropertyValue declares its cache fields as transient
Issue: SPR-12377
2014-10-27 15:49:02 +01:00
Juergen Hoeller
ff8655846d TransactionAspectSupport.currentTransactionStatus() reliably throws NoTransactionException
Issue: SPR-9144
2014-10-27 15:47:52 +01:00
Rossen Stoyanchev
da612d079f Replace "if(" with "if (" 2014-10-27 09:04:23 -04:00
Sebastien Deleuze
6592784ef4 Fix a package tangle between SockJS support and transport packages
Issue: SPR-12379
2014-10-27 13:28:01 +01:00
Juergen Hoeller
9243869763 Test for <util:map> with LinkedCaseInsensitiveMap and specified key/value types
Issue: SPR-10994
2014-10-27 12:08:26 +01:00
Juergen Hoeller
03bd08a6a5 Corrected note on JPA <exclude-unlisted-classes>
Issue: SPR-10767
2014-10-27 11:59:26 +01:00
Stephane Nicoll
a3213f26a5 Merge pull request #677 from ksseo0701/SPR-12378
* SPR-12378:
  Remove unnecessary null check
2014-10-27 09:33:30 +01:00
Seo, Kyung-Seok
1708a8a10d Remove unnecessary null check
Issue: SPR-12378
2014-10-27 09:32:00 +01:00
Sebastien Deleuze
58f4014b17 Add an option to disable automatic addition of CORS header
Issues: SPR-12283
2014-10-26 21:20:53 +01:00
Sebastien Deleuze
743356fa21 Add an option to set an Origin whitelist for Websocket and SockJS
This commit introduces a new OriginHandshakeInterceptor. It filters
Origin header value against a list of allowed origins.

AbstractSockJsService as been modified to:
 - Reject CORS requests with forbidden origins
 - Disable transport types that does not support CORS when an origin
   check is required
 - Use the Origin request header value instead of "*" for
   Access-Control-Allow-Origin response header value
   (mandatory when  Access-Control-Allow-Credentials=true)
 - Return CORS header only if the request contains an Origin header

It is possible to configure easily this behavior thanks to JavaConfig API
WebSocketHandlerRegistration#addAllowedOrigins(String...) and
StompWebSocketEndpointRegistration#addAllowedOrigins(String...).
It is also possible to configure it using the websocket XML namespace.

Please notice that this commit does not change the default behavior:
cross origin requests are still enabled by default.

Issues: SPR-12226
2014-10-26 21:18:04 +01:00
Andy Clement
28a3cd50aa Resolved package tangle in spring-expression 2014-10-25 11:22:15 -07:00
Andy Clement
a40e42479c Fix SpEL handling of function reference
These changes provide more robust handling of function
reference compilation in SpEL expressions. Prior to
this change the isCompilable check was not performing
enough visibility checks on the proposed target
function, causing bytecode to be generated that
would lead to an IllegalAccessError.
The changes also bring the argument handling for
function invocation completely inline with that used
for method invocation allowing some code to be deleted.

Many new tests are also included for function
reference compilation.

Issue: SPR-12359
2014-10-24 11:11:42 -07:00
Rossen Stoyanchev
01aa64c534 Simple broker sends notice after disconnect
Before this change the simple broker simply removed subscriptions
upon receiving a DISCONNECT message assuming it was a result of
a client STOMP WebSocket session ending.

However, if the server-side application sends a DISCONNECT to
the broker in order to terminate a session, the STOMP WebSocket
session could remain unware without any further action. This
change ensures the simple broker sends a DISCONNECT_ACK message
downstream whenever it receives a DISCONNECT.

Issue: SPR-12288
2014-10-24 09:48:18 -04:00
Sam Brannen
6463878f2d Polish Javadoc for @RequestMapping 2014-10-24 14:59:58 +02:00
Brian Clozel
a0c210457b Use response encoding when escaping HTML
With SPR-9293, it is now possible to HTML escape text while taking into
account the current response encoding. When using UTF-* encodings, only
XML markup significant characters are escaped, since UTF-* natively
support those characters.

This commit adds a new servlet context parameter to enable this fix by
default in a Spring MVC application:

    <context-param>
      <param-name>responseEncodedHtmlEscape</param-name>
      <param-value>true</param-value>
    </context-param>

Issue: SPR-12350, SPR-12132
2014-10-24 11:53:47 +02:00
Stephane Nicoll
73e398a165 Merge pull request #672 from RyuSangGi/SPR-12363
* SPR-12363:
  Performance improvement
2014-10-24 10:55:05 +02:00
Sang Gi Ryu
d62522982f Performance improvement
Use entrySet instead of keySet followed by a lookup per key as the
former is more efficient.

Issue: SPR-12363
2014-10-24 10:53:40 +02:00
Stephane Nicoll
d9df50c6cd @Entity no longer required with spring-aspect
This commits complements 222d2b1 for another required dependency.

javax.persistence.Entity was previously required, regardless of which
aspects were actually used by the project. It is now optional and will
not break the build if it is not present. Note that the side effect is that
AnnotationDrivenStaticEntityMockingControl is disabled as well if the
JPA API is not available.

Issue: SPR-6819
2014-10-24 10:39:59 +02:00
Stephane Nicoll
222d2b1639 Fix unnecessary required spring-context-support dep
Prior to this commit, a project using compile time weaving upgrading to
4.1 was forced to add spring-context-support and the jcache API in order
to build. This problem is not new really: spring-aspects holds all
aspects provided by the framework and they all are evaluated when
compiling. 4.1 just happens to define a new aspect that requires extra
dependencies.

This commit uses a new annotation of AspectJ 1.8.3. When @RequiredTypes
is added on an aspect, it is evaluated only if the classes defined on the
annotation are actually present. If they are not, the aspect is disabled
and does not break the build.

Issue: SPR-12163
2014-10-24 10:30:24 +02:00
Rossen Stoyanchev
d5eb669416 Add mention of java.util.Optional in @MVC
Issue: SPR-12370
2014-10-23 16:53:00 -04:00
Rossen Stoyanchev
687955a704 Add ImmutableMessageChannelInterceptor
This change adds a ChannelInterceptor that flips the immutable flag on
messages being sent. This allows components sending messages to leave
the message mutable for interceptors to further apply modifications
before the message is sent (and exposed to concurrency).

The interceptor is automatically added with the STOMP/WebSocket Java
and XML config and the StompSubProtocolHandler leaves parsed incoming
messages mutable so they can be further modified before being sent.

Issue: SPR-12321
2014-10-23 15:25:51 -04:00
Craig Andrews
d5bf6713ed Add author attribution for htmlEscape methods
Issue: SPR-9293
2014-10-23 11:29:32 -07:00
Juergen Hoeller
2035b17925 Polishing 2014-10-23 17:24:00 +02:00
Juergen Hoeller
cb860364dd TilesConfigurer defensively expects null from getResources in case of no resources found
Also includes order preservation for resource results with Tiles 2 as well as retrieval failure logging with Tiles 3.

Issue: SPR-12362
2014-10-23 17:23:52 +02:00
Sebastien Deleuze
1c217aae40 Support text/xml and application/*+xml in Jackson XML message converter
Issue: SPR-12366
2014-10-23 16:48:11 +02:00
Juergen Hoeller
49f3a6beff HibernateTransactionManager supports result access after completion
Issue: SPR-12349
2014-10-23 16:40:09 +02:00
Juergen Hoeller
b16048b061 ClassReader relies on autoboxing for reuse of cached primitive values
Issue: SPR-12365
2014-10-23 14:24:59 +02:00