Commit Graph

9405 Commits

Author SHA1 Message Date
Sam Brannen 6e5907ff39 Add missing text to CachingResourceTransformer Javadoc 2014-10-21 16:11:15 +02:00
Juergen Hoeller 065104a485 Restored compatibility with JsonPath 0.9.x
Issue: SPR-12299
2014-10-21 12:37:56 +02:00
Juergen Hoeller 2b6f841b03 OrderUtils.getPriority uses AnnotationUtils.findAnnotation for consistent lookup rules and diagnostics
Issue: SPR-12357
2014-10-21 12:27:14 +02:00
Juergen Hoeller 47dde91763 Consistent use of logIntrospectionFailure
Issue: SPR-12325
2014-10-21 12:16:51 +02:00
Juergen Hoeller 8325b10080 Consistent formatting of license headers, package javadocs, and import declarations 2014-10-21 01:44:07 +02:00
Juergen Hoeller b6fdcffc94 HttpSessionHandshakeInterceptor and related web.socket.server polishing
Issue: SPR-12352
2014-10-20 23:32:46 +02:00
Juergen Hoeller 716916b281 AnnotationUtils favors local composed annotations over interface annotations and consistently logs introspection failures via lazily initialized logger
Issue: SPR-12355
Issue: SPR-12325
Issue: SPR-12329
2014-10-20 21:47:47 +02:00
Juergen Hoeller 77a62ec8b8 Polishing 2014-10-20 17:42:18 +02:00
Juergen Hoeller 10328f1c22 Reimplemented ServerEndpointExporter to avoid BeanPostProcessor role
Issue: SPR-12340
2014-10-20 17:41:14 +02:00
Juergen Hoeller 92ad02ae8f Consistent number handling in StandardTypeComparator (BigInteger support, doubleValue fallback)
Also includes a fix for the Comparable raw type invocation.

Issue: SPR-9913
Issue: SPR-12353
2014-10-20 17:31:03 +02:00
Juergen Hoeller fb08644e46 ExposeInvocationInterceptor declares itself as PriorityOrdered now
Issue: SPR-12351
2014-10-20 15:45:09 +02:00
Juergen Hoeller 57d63a1903 JdbcTemplate and JmsTemplate pass settings with 0 values on to the driver
Issue: SPR-12338
2014-10-17 19:54:30 +02:00
Andy Clement aae221cb15 Fix SpEL compilation of constructor invocation
The argument processing for compiling constructor references
was very basic and this fix removes that and ensures the
comprehensive logic written for method argument processing
(under SPR-12328) is now used for both method and constructor
argument handling. This fixes the reported issue and ensures
varargs constructor references can be compiled.

This also includes a couple of small fixes for the secondary
testcase reported in SPR-12326. The first is to ensure the
right root context object is used when it is passed
to getValue() indirectly through the evaluation context.
The final fix is to ensure correct boxing of primitives is
done when a method is called upon a primitive.

Issue: SPR-12326
2014-10-17 10:26:54 -07:00
Rossen Stoyanchev c5e360d886 Fix regression with raw ResponseEntity type
This fix addresses a 4.1.1 regression where a raw ResponseEntity return
value (used to return potentially a different kind of body) caused an
exception.

The regression came from the fact we now try to render a null body in
order to give ResponseBodyAdvice a chance to substitute a different
value. That in turn means we have to try to determine the body type
from the method signature.

This change improves the logic for extracting the generic parameter
type to accommodate a raw ResponseEntity class. Also we avoid raising
HttpMediaTypeNotAcceptableException if the value to be rendered is
null.

Issue: SPR-12287
2014-10-17 13:21:08 -04:00
Brian Clozel cc5f488952 Upgrade to reactor 1.1.5.RELEASE 2014-10-17 18:48:16 +02:00
Rossen Stoyanchev 3d96c883d1 Cache lookup path in ResourceUrlEncodingFilter
Commit https://github.com/spring-projects/spring-framework/commit/2b97d6
introduced a change where the path within the DispatcherServlet is
determined with each call to ResourceUrlProvider.getForRequestUrl.

To avoid repeating that every time a URL is encoded through the
response, we now cache the result of the lookupPath determination in
ResourceUrlEncodingFilter.

Issue: SPR-12332
2014-10-16 22:01:26 -04:00
Rossen Stoyanchev f353a28ff4 Polish ResourceUrlEncodingFilter 2014-10-16 22:01:26 -04:00
Rossen Stoyanchev 97441d054d Avoid HandlerMapping attribute in ResourceUrlProvider
The use of the HandlerMapping.PATH_WITHIN_HANDLER_MAPPING_ATTRIBUTE
in ResourceUrlProvider (as a way of saving lookup path determination)
leads to incorrect results. For example when the request is forwarded
the current requestUri may no longer be compariable to the value of the
PATH_WITHIN_HANDLER_MAPPING_ATTRIBUTE. Also where the request is mapped
using a pattern, the value of PATH_WITHIN_HANDLER_MAPPING_ATTRIBUTE is
not the same as the lookup path.

This change removes the use of the attribute from ResourceUrlProvider
and instead always determines the lookup path when getForRequestUrl
is called.

Issue: SPR-12332
2014-10-16 22:01:26 -04:00
Andy Clement 115f85e44f Enhance SpEL compilation to cover additional expression types
This change introduces support for compilation of expressions
involving inline lists, string concatenation and method
invocations where the method being invoked is declared
with a varargs parameter. It also fixes a problem with
compiling existing method invocations where the target
method is on a non public type.

Issue: SPR-12328
2014-10-16 12:08:49 -07:00
Juergen Hoeller 43597bfed4 Polishing 2014-10-16 17:26:10 +02:00
Juergen Hoeller fb92934a7b Extracted AbstractIdentityColumnMaxValueIncrementer and introduced deleteSpecificValues mode
Issue: SPR-12327
2014-10-16 17:25:40 +02:00
Juergen Hoeller bd5383e4f9 OpenJpaDialect passes custom isolation level on to OpenJPA's JDBCFetchPlan configuration
Issue: SPR-12319
2014-10-16 17:24:58 +02:00
Rossen Stoyanchev 8cce404696 Add check for ResponseEntity<void> with null return value
Issue: SPR-12287
2014-10-15 17:06:12 -04:00
Rossen Stoyanchev a3dc5e0491 Polish 2014-10-15 16:56:29 -04:00
Rossen Stoyanchev 956b66bbd4 Fix issue with async return value type determination
Before this change, the type of asynchronously produced return values
(e.g. Callable, DeferredResult, ListenableFuture) could not be
properly determined with an actual resulting value of null. Or even
with an actual value returned, the generic type could not be properly
determined. This change fixes both of those issues.

Issue: SPR-12287
2014-10-15 16:39:03 -04:00
Stephane Nicoll 6f987a9cf8 Proper JCache metadata caching on non cache methods
Prior to this commit, the cache operation metadata cache was not
updated for a method not using the JCache annotations. This means
that every execution of said method was going through the process
of identifying if it was using the cache or not.

This commit adds a default placeholder identifying the absence of
metadata; this allows to flag such method as not having any metadata
at all.

Issue: SPR-12337
2014-10-15 18:04:44 +02:00
Rossen Stoyanchev 24d77f3272 Prepend leading slash in ResourceUrlProvider
The getForRequestUrl method of ResourceUrlProvider uses the
HandlerMapping.PATH_WITHIN_HANDLER_MAPPING_ATTRIBUTE attribute to
determine the relevant portion of the resource URL path.

However there are cases when that attribute may not have a leading
(e.g. when the current URL was matched to a prefix-based pattern
and hence extracted via PathMatcher#extractPathWithinPattern), which
interferes with the matching of resource URL paths to patterns.

This change ensures a leading slash is present

Issue: SPR-12281
2014-10-14 14:25:33 -04:00
Rossen Stoyanchev fa4ba2a82b Polish resource handling tests 2014-10-14 14:25:32 -04:00
Stephane Nicoll 859e1e8003 Check for duplicate keys in YAML map nodes
Snake YAML allows for duplicate keys in map nodes. See
https://code.google.com/p/snakeyaml/issues/detail?id=199

This commit uses a dedicated Constructor extension that explicitly
checks for such duplicate keys.

Issue: SPR-12318
2014-10-14 15:58:35 +02:00
Rossen Stoyanchev 3056301015 Improve HttpSessionHandshakeInterceptor
Use explicit flag whether to copy all attributes.
2014-10-14 09:29:06 -04:00
Juergen Hoeller de11cd8791 EclipseLinkJpaDialect passes custom isolation level on to EclipseLink's DatabaseLogin configuration
Issue: SPR-12319
2014-10-14 14:33:09 +02:00
Juergen Hoeller c7e7d11156 Polishing 2014-10-14 14:27:03 +02:00
Juergen Hoeller d501137f4e Consistently accept empty Content-Type header and empty character encoding
Issue: SPR-12173
2014-10-14 14:26:07 +02:00
Rossen Stoyanchev 2df03d6316 Add interceptor to resourceHandlerMapping
The resourceHandlerMapping in the MVC Java config is not configured
with any interceptors, and in particular those added through the
InterceptorRegistry, which are otherwise added to all other handler
mapping beans created by the config. This means that the
ResourceUrlProviderExposingInterceptor (added in 4.0) is also not
used for resource requests.

This change ensures the ResourceUrlProviderExposingInterceptor is
configured on the resourceHandlerMapping.

Issue: SPR-12279
2014-10-13 16:21:31 -04:00
Sam Brannen 2f54b273a5 Delete unused imports in spring-websocket module 2014-10-13 20:37:08 +02:00
Sam Brannen 9bc32ac199 Delete unused imports in spring-messaging module 2014-10-13 20:33:28 +02:00
Juergen Hoeller 0fb8f0b469 Polishing 2014-10-13 17:58:15 +02:00
Juergen Hoeller 8760be7d64 ResponseEntity's HeadersBuilder allows for specifying existing HttpHeaders
Issue: SPR-12324
2014-10-13 17:22:27 +02:00
Rossen Stoyanchev 97596fb9f6 Allow plugging in a WebSocketHandlerDecorator
The WebSocketMessageBroker config now allows wrapping the
SubProtocolWebSocketHandler to enable advanced use cases that may
require access to the underlying WebSocketSession.

Issue: SPR-12314
2014-10-13 09:35:51 -04:00
Rossen Stoyanchev f0323be786 Add option to copy HTTP session id to handshake attrs
Issue: SPR-12314
2014-10-10 15:21:04 -04:00
Rossen Stoyanchev 4a29e164a8 Allow binary messages in StompSubProtocolHandler
Issue: SPR-12301
2014-10-10 14:31:39 -04:00
Brian Clozel 0a68d265fb Polish indentation 2014-10-08 17:02:26 +02:00
Brian Clozel 4cf19df462 SockJs client: add an XhrTransport for Undertow
This change adds a new XhrTransport for the SockJs client
implementation. This transport is based on `UndertowClient`,
Undertow's HTTP client.

Note that this transport can be customized with an OptionMap that is
used by the Xnio worker backing the I/O communications (see
http://xnio.jboss.org).

Implementation tested with undertow 1.0.36, 1.1.0.RC3, 1.2.0.Beta1.

Issue: SPR-12008
2014-10-08 16:52:40 +02:00
Brian Clozel 2a39081819 Add Vary:Origin HTTP header in SockJS responses
This change adds a "Vary: Origin" HTTP response header for /info and
/iframe SockJS endpoints.
This is preventing proxies and browsers from caching a response and
reusing it for an invalid Origin.

Reference: https://groups.google.com/forum/#!topic/sockjs/svsLWRorSis

Issue: SPR-12310
2014-10-08 16:37:50 +02:00
Sebastien Deleuze f518ad9009 Add (de)serializerByType() and mixIn() to Jackson2ObjectMapperBuilder
Issue: SPR-12313
2014-10-08 10:57:29 +02:00
Tadaya Tsuyukubo 25bb58a1e8 Add shortcuts for Jackson mix-in annotations registration
This commit adds support for direct Jackson mix-in annotations registration in
Jackson2ObjectMapperFactoryBean and Jackson2ObjectMapperBuilder.

Issue: SPR-12144
2014-10-07 18:07:00 +02:00
Juergen Hoeller 5a631177ff Consistent use of LinkedHashSet for interfaces (since interface order may matter in subtle cases) 2014-10-07 16:37:59 +02:00
Juergen Hoeller 01724d3b6d Explicitly detect (and prevent) private @Scheduled methods on CGLIB proxies
Issue: SPR-12308
2014-10-07 16:32:09 +02:00
Juergen Hoeller e56559fd4d WebSocketSession extends java.io.Closeable, plus reorganization of AbstractSockJsSession's code
Issue: SPR-12311
2014-10-07 13:45:07 +02:00
Juergen Hoeller da14aeea7a TextMessage.toString() does not throw StringIndexOutOfBoundsException for payload with multibyte characters
Issue: SPR-12307
2014-10-07 13:35:38 +02:00