Commit Graph

11332 Commits

Author SHA1 Message Date
Juergen Hoeller
0d6545f47c Latest dependency updates (Jackson 2.6.4, Quartz 2.2.2, C3P0 0.9.5.2) 2015-12-09 11:11:03 +01:00
Juergen Hoeller
8346eeda27 Reset BytesMessage after payload extraction
Issue: SPR-13769
2015-12-08 17:12:38 +01:00
Juergen Hoeller
9589749fb2 Introduced createMethodJmsListenerEndpoint template method
Issue: SPR-13774
2015-12-08 17:07:40 +01:00
Juergen Hoeller
b3115fcd85 Upgrade to Tomcat 8.0.30 and Undertow 1.3.9 2015-12-07 23:38:48 +01:00
Juergen Hoeller
d2ad2c3af8 StatementCreatorUtils detects Microsoft SQL Server driver 4.0 as well
Issue: SPR-13772
2015-12-07 17:37:52 +01:00
Juergen Hoeller
d0814703c4 AnnotationUtils.synthesizeAnnotation explicitly checks whether SynthesizedAnnotation is exposable
Issue: SPR-13696
2015-12-07 17:36:14 +01:00
Juergen Hoeller
40cff5e340 Polishing 2015-12-07 17:30:25 +01:00
Juergen Hoeller
ee35b5ed07 Polishing 2015-12-07 12:52:06 +01:00
Juergen Hoeller
7a8a9c71b6 Javadoc fixes
Issue: SPR-13763
2015-12-07 12:51:44 +01:00
Juergen Hoeller
1585a822d6 Javadoc fixes
Issue: SPR-13765
2015-12-07 12:50:23 +01:00
Juergen Hoeller
b1ef6ece9f AbstractRequestLoggingFilter unwraps request to find ContentCachingRequestWrapper
Issue: SPR-13764
2015-12-07 12:47:38 +01:00
Juergen Hoeller
20beace1bf AnnotationConfigWebApplicationContext allows for custom AnnotatedBeanDefinitionReader/ClassPathBeanDefinitionScanner
Issue: SPR-9324
2015-12-07 12:46:32 +01:00
Juergen Hoeller
9973694ed2 Polishing 2015-12-04 20:43:20 +01:00
Rossen Stoyanchev
153a23dbf9 Configure view controllers with ApplicationContext
Issue: SPR-13762
2015-12-04 13:09:37 -05:00
Juergen Hoeller
3d1ae9c604 Efficient and consistent setAllowedOrigins collection type
Issue: SPR-13761
2015-12-04 16:21:53 +01:00
Juergen Hoeller
cd4ce8727e WebSocket namespace consistently applies resolvable allowed-origins value
Issue: SPR-13760
2015-12-04 16:01:14 +01:00
Juergen Hoeller
d64ac32e3d ControllerAdviceBean accepts bean types without @ControllerAdvice annotation (as in 3.2)
Issue: SPR-13759
2015-12-04 13:03:00 +01:00
Juergen Hoeller
415b92b6d1 Upgrade to Hibernate 5.0.5 and Undertow 1.3.8 2015-12-04 13:01:28 +01:00
Juergen Hoeller
08b6daf1eb Polishing 2015-12-03 18:41:03 +01:00
Juergen Hoeller
08ff3a85bf Integration test for proper re-resolution of Optional @RequestPart argument
Includes a trivial refinement of RestTemplate's ResourceAccessException message.

Issue: SPR-13755
2015-12-03 12:55:32 +01:00
Juergen Hoeller
c909789ea9 Avoid mismatch between cached top-level versus nested parameter type
Issue: SPR-13755
2015-12-03 12:53:18 +01:00
Rossen Stoyanchev
f5e681e6e6 lastSessionCheckTime updated after session check
Issue: SPR-13745
2015-12-02 15:07:52 -05:00
Juergen Hoeller
a9e5e9ecc8 Polishing 2015-12-02 15:35:42 +01:00
Juergen Hoeller
747863d503 Documented units for send-time limit and buffer-size limit
Issue: SPR-13753
2015-12-02 13:52:13 +01:00
Juergen Hoeller
3fec802b46 Fixed formatting in AOP documentation
Issue: SPR-13750
2015-12-02 13:39:26 +01:00
Juergen Hoeller
a4f5c46fed MockHttpServletResponse.setIntHeader supports 'Content-Length' header as well
Issue: SPR-13752
2015-12-02 13:36:35 +01:00
Rossen Stoyanchev
4d4d2e2966 Merge pull request #928 from mhartsock/SPR-13747 2015-12-01 16:53:11 -05:00
Rossen Stoyanchev
b3f0ab5284 Polish 2015-12-01 16:52:02 -05:00
mhartsock Melissa Hartsock
b077b4dddb Fix media type lookup case sensitivity
Fixed a bug where the URL content negotiation "format" parameter values
were case sensitive and only lowercase values were accepted. For
example, URL query parameter format=json returned the appropriate JSON
response but format=JSON resulted in a
HttpMediaTypeNotAcceptableException and returned:

406 - The resource identified by this request is only capable of
generating responses with characteristics not acceptable according to
the request "accept" headers.

When the MappingMediaTypeFileExtensionResolver is constructed, it is
passed a map containing the media type key to MediaType mappings
defined in the ContentNegotiationConfigurer. In the constructor of
MappingMediaTypeFileExtensionResolver, the keys are converted to
lowercase and the mappings of keys to MediaTypes are added to the
ConcurrentMap<String, MediaType> mediaTypes using the lowercase
version of the keys. However, when retrieving the MediaType from a key
in the lookupMediaType method, no conversion to lowercase is performed
so any value for the URL "format" parameter other than the lowercase
version will not return the proper MediaType result.

On May 1st, 2014, a change was made to
ParameterContentNegotiationStrategy to handle cases where the content
negotiation format URL parameter does not result in a match for a
MediaType. If no match is found, a HttpMediaTypeNotAcceptableException
is thrown resulting in the 406 response above. Prior to this commit, a
null was returned instead of throwing an exception so this issue was
hidden and appeared to function correctly.

To make the media type lookup case insensitive, added a line to the
lookupMediaType method in MediaTypeFileExtensionResolver to first
convert the extension (media type key) to lowercase prior to attempting
to retrieve it from the mediaTypes map.

Issue: SPR-13747
2015-12-01 16:16:57 -05:00
Rossen Stoyanchev
dacbf4cb34 Update Javadoc on UriComponentsBuilder.query 2015-12-01 16:09:05 -05:00
Juergen Hoeller
e78425103e Polishing 2015-12-01 18:04:03 +01:00
Juergen Hoeller
7589c1f164 Aligned class name quoting with ConversionFailedException 2015-12-01 16:10:11 +01:00
Juergen Hoeller
44651fdf7c ObjectToObjectConverter caches detected methods/constructors
This commit reworks the arrangement to a centralized cache, avoiding any extra reflection attempts if a cache entry is known already. In the course of this, it also enforces toXXX methods to be declared as non-static now (which is the only sensible arrangement anyway).

Issue: SPR-13703
2015-12-01 16:07:21 +01:00
Brian Clozel
c226753985 Do not rewrite relative links with FixedVersionStrategy
Prior to this change, the resource handling FixedVersionStrategy would
be applied on all links that match the configured pattern. This is
problematic for relative links and can lead to rewritten links such as
"/fixedversion/../css/main.css" which breaks.

This commit prevents that Strategy from being applied to such links.
Of course, one should avoid to use that VersionStrategy with relative
links, but this change aims at not breaking existing links even if it
means not prefixing the version as expected.

Issue: SPR-13727
2015-12-01 14:47:23 +01:00
Juergen Hoeller
38c21ee6bf Class identity comparisons wherever possible
Issue: SPR-12926
2015-12-01 14:11:44 +01:00
Juergen Hoeller
b70af3bf57 Polishing 2015-12-01 14:10:46 +01:00
Rossen Stoyanchev
fed4391f87 Fix issue in UriTemplate parsing
The recent commit 971f04 replaced the use of a NAMES_PATTERN regex in
favor of direct parsing in order to deal with nested curly braces.

The change also incorrectly replicated this logic which removes a
trailing slash after Pattern quoting (and not before):

cca037a74d/spring-web/src/main/java/org/springframework/web/util/UriTemplate.java (L207-L210)

After some more investigation there doesn't appear to be any scenario
where the quoted pattern would end with a trailing slash. It should
always end with \E (end of quote) or a ")" (end of group). Nor are
there any failing tests so this commit removes the logic altogether.

Issue: SPR-13705
2015-11-30 17:46:28 -05:00
Juergen Hoeller
998da2f45c Document destruction callback behavior for inner beans in case of scope mismatch
This commit undoes the previous refinement and rather documents the original behavior.

Issue: SPR-13739
2015-11-30 21:57:54 +01:00
Juergen Hoeller
8ed2c470be Avoid instantiation of non-selected beans in BeanFactoryAnnotationUtils.qualifiedBeanOfType
Issue: SPR-13741
2015-11-30 20:13:03 +01:00
Juergen Hoeller
7104076e19 Avoid Scope.registerDestructionCallback for inner beans in case of scope mismatch
This commit refines getMergedBeanDefinition's scope adaptation algorithm for inner beans, never leaving a custom scope within a containing bean of a different scope. The inner bean's scope will either be aligned with the containing bean's scope (matching the effective state) or be switched to prototype in case of an outer singleton (indicating that no singleton state management is desired).

Issue: SPR-13739
2015-11-30 20:10:26 +01:00
Juergen Hoeller
4755467cca Polishing 2015-11-30 12:36:30 +01:00
Juergen Hoeller
def10343ea Unit tests for @Value Resource resolution
Issue: SPR-13731
2015-11-30 10:41:55 +01:00
Juergen Hoeller
edbb8bbb01 JodaTimeFormatterRegistrar defensively checks whether Joda-Time 2.x is present (for Joda-Time 1.x tolerance on the classpath)
Also switches 4.2.4's new formatter implementations to package visibility, just in case they'll be superseded by another variant in the future.

Issue: SPR-13730
2015-11-29 22:22:05 +01:00
Juergen Hoeller
3234d9ede3 ObjectToObjectConverter caches detected methods/constructors
Includes polishing of related conversion exception messages.

Issue: SPR-13703
2015-11-29 22:17:16 +01:00
Juergen Hoeller
aef6b20626 Removed tests for invalid -1 index (for compatibility with JsonPath 2.1) 2015-11-27 14:11:40 +01:00
Juergen Hoeller
9bb72e8386 Javadoc fixes 2015-11-27 13:19:39 +01:00
Juergen Hoeller
5e16834751 Latest dependency updates (OkHttp 2.6, Gson 2.4, JsonPath 2.1, JRuby 1.7.23, Undertow 1.3.7) 2015-11-27 13:17:40 +01:00
Juergen Hoeller
3681094564 Upgrade to EhCache 3.0 M4 2015-11-26 16:32:01 +01:00
Juergen Hoeller
dd647659b3 Rearranged cache test class names across several modules 2015-11-26 16:30:44 +01:00
Juergen Hoeller
331e739255 Latest dependency updates (Hibernate ORM 5.0.4, Tomcat 8.0.29, Undertow 1.3.6) 2015-11-26 02:10:03 +01:00