Commit Graph

6242 Commits

Author SHA1 Message Date
Rossen Stoyanchev
40ed4e78be Make UriComponents Serializable
Issue: SPR-10186
2013-01-22 11:54:31 -05:00
Chris Beams
d3f4528905 Remove additional xsd versions from reference docs
A few versioned xsd references still existed in xsd-configuration.xml;
this commit removes them, completing the work for SPR-10010

Issue: SPR-10010
2013-01-22 16:02:31 +01:00
Chris Beams
d5cad15e28 Merge branch 'SPR-9896' into 3.2.x
* SPR-9896:
  Support XML properties in ResourcePropertySource
2013-01-22 14:17:38 +01:00
Chris Beams
3a626f9319 Support XML properties in ResourcePropertySource
JDK 5 introduced an XML-based properties file syntax. This commit
ensures that when such files are supplied as the underlying resource
for a ResourcePropertySource instance, they are routed appropriately
to Properties#loadFromXML as opposed to Properties#load.

Issue: SPR-9896
2013-01-22 14:14:15 +01:00
Sam Brannen
2a41de00e3 Polish Javadoc in Spring MVC async support
This commit fixes some typographical and grammatical errors in various
classes in Spring MVC's async support.
2013-01-22 12:09:00 +01:00
Chris Beams
3cdb866bda Relax ConfigurableWebEnvironment signatures
ConfigurableWebEnvironment was introduced in 3.2.0.M1 with SPR-9439 in
order to break a cyclic dependency. At the same time, certain signatures
such as AbstractRefreshableWebApplicationContext#getEnviroment and
GenericWebApplicationContext#getEnvironment were updated to take
advantage of covariant return types and return this newer, more narrow
type and providing cast-free calls to ConfigurableWebEnvironment methods
where necessary. Similar changes were made to HttpServletBean in
3.2.0.M2 with SPR-9763.

Narrowing #getEnvironment signatures in this fashion required enforcing
at the #setEnvironment level that any Environment instance provided
(explicitly or via the EnvironmentAware callback) must be an instance of
ConfigurableWebEnvironment. This is a reasonable assertion in typical
web application scenarios, but as SPR-10138 demonstrates, there are
valid use cases in which one may want or need to inject a non-web
ConfigurableEnvironment variant, e.g. during automated unit/integration
testing.

On review, it was never strictly necessary to narrow #getEnvironment
signatures, although doing so did provided convenience and type safety.
In order to maintain as flexible and backward-compatible an arrangement
as possible, this commit relaxes these #getEnvironment signatures back
to their original, pre-3.2 state. Namely, they now return
ConfigurableEnvironment as opposed to ConfigurableWebEnvironment, and in
accordance, all instanceof assertions have been removed or relaxed to
ensure that injected Environment instances are of type
ConfigurableEnvironment.

These changes have been verified against David Winterfeldt's Spring by
Example spring-rest-services project, as described at SPR-10138.

Issue: SPR-10138, SPR-9763, SPR-9439
2013-01-22 11:33:37 +01:00
Chris Beams
d9a4fb410d Introduce "dummy" Environment implementation
For testing purposes in which an Environment implementation is required
but a ConfigurableEnvironment is not desirable.

All methods are no-ops and return null, therefore NPEs are likely.
2013-01-22 11:33:37 +01:00
Rossen Stoyanchev
660458a649 Fix init order issue in RequestMappingHandlerMapping
Issue: SPR-10173
2013-01-21 14:52:41 -05:00
Rossen Stoyanchev
902a136b6e Add helpful error message to DispServlet initializer
Issue: SPR-10168
2013-01-21 14:41:31 -05:00
Rossen Stoyanchev
0c56e86bfb Fix NPE in FormHttpMessageConverter
Issue: SPR-10187
2013-01-21 14:09:32 -05:00
Phillip Webb
21becef1bd Support Date to String in JodaTimeConverters
Update JodaTimeConverters in include support for Date to String
conversion.

The JodaTimeFormattingTests and DateFormattingTests have been extended
to ensure that Date to String conversion is supported with or without
Joda.

Issue: SPR-10198
2013-01-21 10:55:25 -08:00
Rossen Stoyanchev
e4fcad9f93 Fix exception message about producible media types
Issue: SPR-10175
2013-01-21 12:34:56 -05:00
Rossen Stoyanchev
8e1685caef Fix ClassCastException in TilesConfigurer
Issue: SPR-10195
2013-01-21 12:01:42 -05:00
Chris Beams
3c1536af75 Merge branch 'SPR-10197' into 3.2.x
* SPR-10197:
  Attempt to repro ReflectionUtils performance issue
2013-01-21 14:04:41 +01:00
Chris Beams
cb8dc73fbb Attempt to repro ReflectionUtils performance issue
Issue: SPR-10197
2013-01-21 14:03:36 +01:00
Chris Beams
06017e7ecc Merge branch 'SPR-9984' into 3.2.x
* SPR-9984:
  Ensure -PtestGroups is passed through to unit tests
2013-01-21 14:00:21 +01:00
Chris Beams
4dc3fcecbd Ensure -PtestGroups is passed through to unit tests
Issue: SPR-9984
2013-01-21 13:57:32 +01:00
Chris Beams
c97f26d516 Merge branch 'SPR-9984' into 3.2.x
* SPR-9984:
  Add TimedSpringRunnerTests to performance test group
2013-01-21 12:45:03 +01:00
Chris Beams
fc6377cc53 Add TimedSpringRunnerTests to performance test group
Issue: SPR-9984
2013-01-21 12:44:47 +01:00
Chris Beams
d40c8cfc58 Fix broken Castor URLs in ref docs and mapping XML
Issue: SPR-10189
2013-01-21 11:21:44 +01:00
Chris Beams
24cc33306d Fix typo in reference documentation
Issue: SPR-10171
2013-01-21 11:07:04 +01:00
Juergen Hoeller
5d9ad5b1d1 AbstractDriverBasedDataSource does not rely on Properties chaining anymore
Issue: SPR-9461
2013-01-18 19:07:30 +01:00
Juergen Hoeller
87968e5a71 Further preparations for 3.2.1 2013-01-18 18:01:33 +01:00
Juergen Hoeller
944e1c95e6 EhCacheManagerFactoryBean applies cacheManagerName ahead of creation (for EHCache 2.5 compatibility)
Issue: SPR-9171
2013-01-18 17:58:24 +01:00
Juergen Hoeller
cca255bc79 Added "exposeAccessContext" flag JndiRmiClientInterceptor/ProxyFactoryBean (for WebLogic)
Issue: SPR-9428
2013-01-18 16:51:21 +01:00
Juergen Hoeller
701c5f1110 ContextLoader properly detects pre-refreshed WebApplicationContext
Issue: SPR-9996
2013-01-18 15:20:55 +01:00
Juergen Hoeller
8c9383da7c BridgeMethodResolver properly handles bridge methods in interfaces
Issue: SPR-9330
2013-01-18 15:00:00 +01:00
Juergen Hoeller
ed952ccba1 LocalVariableTableParameterNameDiscoverer works for bridge methods as well
Issue: SPR-9429
2013-01-18 14:52:24 +01:00
Juergen Hoeller
3dd817585b MBeanExporter does not log warnings for manually unregistered MBeans
Issue: SPR-9451
2013-01-18 14:43:11 +01:00
Juergen Hoeller
721fa9db6a SpringBeanAutowiringInterceptor eagerly releases BeanFactory if post-construction fails
Issue: SPR-10013
2013-01-18 14:12:02 +01:00
Juergen Hoeller
20c4ba40d8 AbstractDriverBasedDataSource does not rely on Properties chaining anymore
Issue: SPR-9461
2013-01-18 14:02:13 +01:00
Juergen Hoeller
be606f4169 Added hint towards not using orm.hibernate3 classes with Hibernate 4
Issue: SPR-9365
2013-01-18 13:58:22 +01:00
Juergen Hoeller
13cf1fceaa Fixed reference to "fallbackToNoOpCache" flag
Issue: SPR-9064
2013-01-18 13:49:57 +01:00
Juergen Hoeller
cd2183f9e1 Fixed ConnectionSpecConnectionFactoryAdapter explanation
Issue: SPR-9466
2013-01-18 13:47:11 +01:00
Juergen Hoeller
8a12b9e23f Removed reference to AttributesJmxAttributeSource
Issue: SPR-8916
2013-01-18 13:42:21 +01:00
Juergen Hoeller
d55877ccf2 spring-jms-3.2.xsd allows for SpEL expressions in prefetch and receive-timeout attributes
Issue: SPR-9553
2013-01-18 13:32:11 +01:00
Juergen Hoeller
6a5744e61c CachedIntrospectionResults.clearClassLoader(null) removes cached classes for the system class loader
Issue: SPR-9189
2013-01-18 13:32:10 +01:00
Chris Beams
e659deab4f Remove .aj sources from spring-aspects jar
Issue: SPR-10179
2013-01-16 08:56:06 +01:00
Chris Beams
19445508b3 Polish build.gradle 2013-01-16 08:55:58 +01:00
Chris Beams
26d5ef93e6 Handle non-void write methods deterministically
This change resolves a specific issue with processing
java.math.BigDecimal via ExtendedBeanInfo. BigDecimal has a particular
constellation of #setScale methods that, prior to this change, had the
potential to cause ExtendedBeanInfo to throw an IntrospectionException
depending on the order in which the methods were processed.

Because JDK 7 no longer returns deterministic results from
Class#getDeclaredMethods, it became a genuine possibility - indeed a
statistical certainty that the 'wrong' setScale method handling order
happens sooner or later. Typically one could observe this failure once
out of every four test runs.

This commit introduces deterministic method ordering of all discovered
non-void returning write methods in such a way that solves the problem
for BigDecimal as well as for any other class having a similar method
arrangement.

Also:

 - Remove unnecessary cast

 - Pass no method information to PropertyDescriptor superclasses when
   invoking super(...). This ensures that any 'type mismatch'
   IntrospectionExceptions are handled locally in ExtendedBeanInfo and
   its Simple* PropertyDescriptor variants where we have full control.

Issue: SPR-10111, SPR-9702
Backport-Commit: aa3e0be (forward-ported via cherry-pick from 3.1.x)
2013-01-16 08:11:55 +01:00
Rob Winch
6888a6f286 Restore *.aj whitespace
The removal of whitespace to the *.aj files made in 1762157 cause
NoSuchMethodError for code compiled against previous versions of
spring-aspects due to a bug in AspectJ (see SPR-10178 for details).

This commit reverts all the whitespace changes made in 1762157 which
resolves the NoSuchMethodErrors.

Issue: SPR-10178
2013-01-15 17:20:54 -06:00
Juergen Hoeller
e44b4b831e Further fixes for 3.2.1 2013-01-15 22:10:14 +01:00
Juergen Hoeller
2cd23a79a3 Polishing 2013-01-15 22:09:16 +01:00
Juergen Hoeller
450dbb2810 Reintroduced "mode" and "proxy-target-class" attributes in spring-task-3.1/3.2.xsd
Issue: SPR-10177
2013-01-15 22:05:21 +01:00
Juergen Hoeller
abbe1db106 Polishing along with backport 2013-01-15 16:52:09 +01:00
Juergen Hoeller
a3211782a6 AbstractCacheManager accepts no caches defined, allowing for EHCache default cache setup
Issue: SPR-7955
2013-01-15 15:54:14 +01:00
Sam Brannen
f3e5f8bb4e Update copyright year, author tags, and Javadoc 2013-01-15 12:11:44 +01:00
Sam Brannen
33ee0ea4a6 Fix broken test in ContentAssertionTests 2013-01-15 11:56:27 +01:00
Rossen Stoyanchev
b2d6596901 Add contentTypeCompatibleWith option to Spring MVC Test
An expectation such as content().contentType(MediaType.TEXT_PLAIN)
fails if the actual media type contains a charset or another parameter.
A new method allows comparing the media type and subtype only via
content().contentTypeCompatibleWith(MediaType.TEXT_PLAIN).

Issue: SPR-10165
2013-01-14 22:00:55 -05:00
Rossen Stoyanchev
9dc7b5feef Use MessageSource to resolve @ResponseStatus.reason
The reason attribute of @ResponseStatus can now be a code resolvable
through the ApplicationContext's MessageSource.

Issue: SPR-6044
2013-01-14 22:00:55 -05:00