Commit Graph

12151 Commits

Author SHA1 Message Date
Stephane Nicoll
aafdcecf53 Customize connection request timeout
Prior to this commit it was not possible to easily customize the
connection request timeout used by the HttpClient. Both
`HttpComponentsClientHttpRequestFactory` and
`HttpComponentsClientHttpRequestFactoryTests` have been updated to
support a `connectionRequestTimeout` property.

Issue: SPR-12166
2014-12-22 16:31:07 +01:00
Stephane Nicoll
24b82746b5 Polish upgrade to HttpComponents 4.3
Polish fbe605123 to make explicit the fact that a null RequestConfig
can be used to force the defaults of the current HttpClient.

Issue: SPR-11113
2014-12-22 14:31:24 +01:00
Sebastien Deleuze
d8a01cb04a Polish MockMvcBuilders tests 2014-12-22 13:51:56 +01:00
Sebastien Deleuze
32aafb21ff Set ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE in DefaultMockMvcBuilder
Issue: SPR-12553
2014-12-22 13:39:21 +01:00
Stephane Nicoll
c4049a989a Better doc reference of CachingConfigurer
Update the documentation to better reflect the fact that a @EnableCaching
configuration class must implement CachingConfigurer in order to provide
advanced customizations to the cache abstraction.
2014-12-22 11:37:44 +01:00
Stephane Nicoll
fbe6051233 Upgrade HttpComponentsHIRE to HttpComponents 4.3
Previously, HttpComponentsHttpInvokerRequestExecutor was not compatible
with the new API of HttpComponents 4.3. Specifically, it is not possible
to update the socket and read timeouts on the HttpClient itself anymore.

We actually already updated HttpComponentsClientHttpRequestFactory for a
similar problem in SPR-11442: if we detect an older HttpClient
implementation, we update the timeout directly on the client. If that's
not the case, we keep the value in the factory itself and use it when a
new HttpRequest needs to be created.

This commit also uses the new API to create a default HttpClient and
therefore requires HttpComponents 4.3. As mentioned above, it is still
possible to use deprecated HttpClient instances against this executor.

Issue: SPR-11113
2014-12-22 11:02:32 +01:00
Andy Clement
abc3cc4dc4 Ensure correct boxing in compiled code for OpEq with primitives
Without this change when the operands to an == are a mix of a
reference type and a primitive, the failure to box the primitive
would result in a verifyerror when the compiled code is loaded.

Issue: SPR-12557
2014-12-18 13:46:55 -08:00
Sam Brannen
3125ef784c Polish documentation for inferred bean destruction mode 2014-12-18 13:41:59 +01:00
Stephane Nicoll
6ff2abcb83 Document destroy method name inference
Update the developer guide to explicitly reference the (inferred)
constant introduced in 38e90105a0.

Also emphasis the fact that the (inferred) mode is enabled by default
with Java config and how to disable it if necessary.

Issue: SPR-12534
2014-12-18 11:10:17 +01:00
Stephane Nicoll
fd7153ffbb Do not retain cache transaction managers
Previously, cache transaction managers may be  retained outside the
boundaries of an application context with AspectJ since an aspect is
basically a singleton for the current class loader.

This commit adds a "clearTransactionManagerCache" that is similar to the
"clearMetadataCache" introduced in CacheAspectSupport: whenever the
context is disposed, the cache is cleared to remove any reference to a
transaction manager defined by that context.

Issue: SPR-12518
2014-12-16 16:26:02 +01:00
Stephane Nicoll
cec26e9ac4 Rework determineTransactionManager condition
SPR-11954 introduced a regression that when the "default" transaction
manager is cached, qualified transaction managers are not taken into
account anymore.

This commit rework the "determineTransactionManager" condition to
favor qualifier and "named" transaction managers. If none of these apply,
the default transaction manager is used as it should.

Also reworked the caching infrastructure so that a single cache holds
all transaction manager instances.

Issue: SPR-12541
2014-12-16 15:05:00 +01:00
Sebastien Deleuze
4308a0404c Refine EclipseLink SQL logging
Issue: SPR-12528
2014-12-15 11:30:36 +01:00
Sam Brannen
431aed3b01 Fix typo in ide.gradle 2014-12-13 14:37:50 +01:00
Sam Brannen
f7d594bedd Update Eclipse project import script 2014-12-13 14:24:01 +01:00
Sam Brannen
c2101cbcf4 Require non-empty values for TxMgr qualifiers & bean names 2014-12-12 21:01:00 +01:00
Sam Brannen
5b5cf37ac5 Polish Javadoc regarding default transaction manager 2014-12-12 20:56:59 +01:00
Brian Clozel
eef0bf43d5 Upgrade Jetty to 9.2.6.v20141205 2014-12-11 19:03:05 +01:00
Sam Brannen
c62fbea2ba Demonstrate that the CollectionFactory API is not type-safe
This commit introduces test methods in CollectionFactoryTests that
demonstrate how the APIs for createCollection() and createMap() are not
type-safe, specifically regarding the use of generics, raw types, and
casting.
2014-12-11 15:55:41 +01:00
Sam Brannen
aec284a4ca Create empty EnumSets & EnumMaps in CollectionFactory
SPR-12483 introduced automatic type conversion support for EnumSet and
EnumMap. However, the corresponding changes in CollectionFactory
contradict the existing contract for the "create approximate" methods
by creating a copy of the supplied set or map, thereby potentially
including elements in the returned collection when the returned
collection should in fact be empty.

This commit addresses this issue by ensuring that the collections
returned by createApproximateCollection() and createApproximateMap()
are always empty.

Furthermore, this commit improves the Javadoc throughout the
CollectionFactory class.

Issue: SPR-12533
2014-12-10 22:59:00 +01:00
Sam Brannen
fb426fe611 Demonstrate that the CollectionFactory API is not type-safe
This commit introduces test methods in CollectionFactoryTests that
demonstrate how the APIs for createApproximateCollection() and
createApproximateMap() are not type-safe, specifically regarding the use
of generics, raw types, and casting.
2014-12-10 17:36:01 +01:00
Sam Brannen
978b8c81e5 Cover maps & more collections in CollectionFactoryTests 2014-12-10 16:44:52 +01:00
Sam Brannen
86f99ec8f7 Improve error handling in CollectionFactory
This commit improves error handling in CollectionFactory by asserting
preconditions.

In addition, this commit introduces ConnectionFactoryTests.
2014-12-10 14:47:15 +01:00
Sam Brannen
866d8fea0d Polish grammar and wording in the reference manual 2014-12-10 14:47:15 +01:00
Stephane Nicoll
67f184293b Improve performance of generateKey
Only compute the error message to display when the generated key is
actually null instead of using Assert.notNull as the cache operation
'toString()' method is non trivial and gets computed regardless of the
result.

Issue: SPR-12527
2014-12-10 14:34:11 +01:00
Sam Brannen
b0a72b311f Polish Spring Framework Artifacts table
Issue: SPR-12517
2014-12-10 13:54:04 +01:00
Sebastien Deleuze
1f6a15e4da List Spring Framework artifacts in the reference manual
Issue: SPR-12517
2014-12-10 10:52:12 +01:00
Sebastien Deleuze
67f1967eee Polish reference manual
This commit put more emphasis on Spring Boot in the
"Getting Started" section, and update some outdated excerpts.
2014-12-10 10:52:12 +01:00
Sam Brannen
5aaed147d5 Use public AssumptionViolatedException in Assume
JUnit 4.12 created a 'public' version of the previously 'internal'
AssumptionViolatedException.

This commit upgrades Spring's Assume class to use this new public
version.
2014-12-10 00:29:52 +01:00
Sam Brannen
d8ef666764 Suppress "rawtypes" warnings in CollectionFactory
This commit also adds links to the newly created Eclipse bug that was
raised for this issue.
2014-12-09 21:29:05 +01:00
Sam Brannen
fe78900524 Work-around for Eclipse bug regarding EnumSets
This commit introduces superfluous casts in CollectionFactory to
address a bug in Eclipse 4.4.1 that prevents the code from compiling
within Eclipse. Specifically, without these casts Eclipse displays the
following error for use of the EnumSet.copyOf() and EnumSet.noneOf()
methods:

Type mismatch: cannot convert from EnumSet<Enum<Enum<E>>> to
Collection<E>
2014-12-09 20:54:36 +01:00
Sebastien Deleuze
84ef269d54 Remove outdated reference to Spring Modules 2014-12-09 15:29:24 +01:00
Spring Buildmaster
7c937441b1 Next Development Version 2014-12-09 02:25:18 -08:00
Sam Brannen
e901abee06 Fix JavaDoc in TestExecutionListener regarding Ordered 2014-12-08 23:51:40 +01:00
Rossen Stoyanchev
0524a82c09 Update unprocessableEntity to allow body
Issue: SPR-12515
2014-12-08 16:19:52 -05:00
Sam Brannen
33fca4e7ae Fix and polish Javadoc for JpaTransactionManager 2014-12-08 17:21:59 +01:00
Stephane Nicoll
adc7ad7fb2 Fix detection of the @SendTo annotation
Previously, the default reply destination could not be discovered if the
@JmsListener annotation was placed on a bean that is eligible for
proxying as the proxy method is used internally and does not reveal
an annotation placed on the implementation.

This commit makes sure to resolve the most specific method when
searching that annotation.

Issue: SPR-12513
2014-12-08 10:56:02 +01:00
Rossen Stoyanchev
b796c1e87e Synchronize message sending
Issue: SPR-12516
2014-12-07 16:10:40 -05:00
Juergen Hoeller
bb1d1e916e Polishing 2014-12-07 20:52:18 +01:00
Juergen Hoeller
03d4e1bc22 Consistent bridge method handling in annotation post-processors
Issue: SPR-12490
Issue: SPR-12495
2014-12-07 20:51:35 +01:00
Juergen Hoeller
15d3b88037 DefaultSingletonBeanRegistry's isDependent defensively checks for circular recursion
Issue: SPR-10787
2014-12-07 16:30:31 +01:00
Juergen Hoeller
1daa5eb383 ResponseEntity provides static "unprocessableEntity()" convenience method as well
Issue: SPR-12515
2014-12-07 15:34:39 +01:00
Rossen Stoyanchev
03f5176df1 List Tomcat and Jetty Web first. 2014-12-05 12:19:06 -05:00
Rossen Stoyanchev
189ec75789 Add ability to clone to UriComponentsBuilder hierarchy
Issue: SPR-12494
2014-12-05 12:16:15 -05:00
Sebastien Deleuze
2fccf3ff44 Add support for autowiring Jackson handlers
This commit introduces the SpringHandlerInstantiator
class, a Jackson HandlerInstantiator that allows to autowire
Jackson handlers (JsonSerializer, JsonDeserializer, KeyDeserializer,
TypeResolverBuilder and TypeIdResolver) if needed.

SpringHandlerInstantiator is automatically used with
@EnableWebMvc and <mvc:annotation-driven />.

Issue: SPR-10768
2014-12-05 17:37:28 +01:00
Sebastien Deleuze
ea7f787ad8 Update supported WebSocket runtimes in the reference documentation 2014-12-05 17:13:33 +01:00
Juergen Hoeller
016b3b758a Upgrade to JUnit 4.12
Issue: SPR-12511
2014-12-05 13:26:43 +01:00
Juergen Hoeller
d1f8968595 ControllerAdvice basePackages specifically refer to actual packages (avoiding accidental prefix matches with other packages)
Issue: SPR-12509
2014-12-05 13:25:48 +01:00
Brian Clozel
98870251f9 Better empty response body support in RestTemplate
Prior to this change, RestTemplate returned an empty response body if:

* HTTP return status 204 or 304
* Content-length header equals 0

This change adds a new condition for this, better supporting RFC7230
section 3.4, for connections that are closed without response body:

* No Content-length header
* No Transfer-encoding: chunked header value
* a Connection: close header value

See SPR-7911 for previous efforts in that space.

Issue: SPR-8016
2014-12-05 09:57:41 +01:00
Brian Clozel
b2878a4f60 Merge pull request #704 from aantono/master
Fixed the output stream incomplete data by explicitly flushing the OutputStreamWriter
2014-12-05 09:51:55 +01:00
Alex Antonov
bf8d99d7e4 Fixed the output stream incomplete data by explicitly flushing the OutputStreamWriter 2014-12-04 16:46:15 -06:00