Commit Graph

9638 Commits

Author SHA1 Message Date
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
Juergen Hoeller 4013fe03a5 Revised ControllerAdvice basePackages handling (based on package names instead of java.lang.Package)
Issue: SPR-12506
2014-12-04 17:56:01 +01:00
Rossen Stoyanchev ad65119a2c Polish ServletUriComponentsBuilder 2014-12-04 10:30:14 -05:00
Rossen Stoyanchev 7f11c1ee2f Also apply X-Forwarded-Prefix in fromContextPath
Issue: SPR-12500
2014-12-04 10:15:55 -05:00
Juergen Hoeller 9ef0bdcb17 Consistent resolution of Class methods and static methods
Issue: SPR-12502
2014-12-03 23:03:24 +01:00
Brian Clozel 1de71511f0 Merge pull request #702 from aantono/master
Fix for NPE when creating ProtobufHttpMessageConverter without ExtensionRegistryInitializer
2014-12-03 21:01:34 +01:00
Rossen Stoyanchev d322bcfbf4 Use X-Forwarded-Prefix in ServletUriComponentsBuilder
Issue: SPR-12500
2014-12-03 13:46:25 -05:00
Alex Antonov b041cffe5d Fix for NPE when creating ProtobufHttpMessageConverter without ExtensionRegistryInitializer 2014-12-03 12:26:18 -06:00
Sebastien Deleuze af2782aa79 Fix Undertow exclusion (and upgrade to 1.1.1.Final) 2014-12-03 16:58:37 +01:00
Stephane Nicoll e7c577fd08 Merge pull request #694 from kicktipp/SPR-12447
* SPR-12447:
  Add @AjSuppressWarnings on static mocks
2014-12-03 10:57:25 +01:00
Janning Vygen 061b246307 Add @AjSuppressWarnings on static mocks
Issue: SPR-12447
2014-12-03 10:55:39 +01:00
Sebastien Deleuze fbd85925de Use Jackson improved default configuration everywhere
With this commit, Jackson builder is now used in spring-websocket
to create the ObjectMapper instance.

It is not possible to use the builder for spring-messaging
and spring-jms since these modules don't have a dependency on
spring-web, thus they now just customize the same features:
 - MapperFeature#DEFAULT_VIEW_INCLUSION is disabled
 - DeserializationFeature#FAIL_ON_UNKNOWN_PROPERTIES is disabled

Issue: SPR-12293
2014-12-03 09:49:41 +01:00
Phillip Webb 87f1512e88 Add protected YamlProcessor.getFlattenedMap method
Add a protected getFlattenedMap method to the YamlProcessor that
subclasses can use to flatten a source Map so that it has the same
entries as the Properties, but retains order.

Issue: SPR-12499
2014-12-02 17:17:34 -08:00
Roy Clarkson 83ecf5ca1d Fix issue where FormHttpMessageConverter fails to write multipart data
FormHttpMessageConverter incorrectly determines that the media type
"multipart/form-data; charset=utf-8" is not multipart. This commit
allows the media type to contain a charset parameter.
2014-12-02 16:06:49 -05:00