Commit Graph

6750 Commits

Author SHA1 Message Date
Juergen Hoeller
bf31f7178d Polishing
(cherry picked from commit a3a4344)
2013-12-11 23:58:16 +01:00
Juergen Hoeller
249d8379ae Polishing
(cherry picked from commit aa6e6c1)
2013-12-11 23:12:34 +01:00
Juergen Hoeller
bfcfbe41a1 Made BeanUtils.copyProperties defensive about property type mismatches
Issue: SPR-11209
(cherry picked from commit bc5affa)
2013-12-11 23:12:33 +01:00
Phillip Webb
f17ae5a7a8 Replace references to VMware with Pivotal
Replace references to VMware in license, notices and maven generation
with Pivotal, Inc.

Issue: SPR-11073
(cherry picked from commit b085ec9)
2013-12-11 14:10:28 -08:00
Juergen Hoeller
779d5716e5 Moved RequiredAnnotationBeanPostProcessorTests to correct package beans.factory.annotation 2013-12-11 18:45:23 +01:00
Juergen Hoeller
2a6c642408 Added tests for custom qualifier annotations on scoped @Bean methods
Issue: SPR-11116
(cherry picked from commit c5d7977)
2013-12-11 18:44:13 +01:00
Juergen Hoeller
126116e759 DispatcherPortlet never uses a resource forward on Liferay
Issue: SPR-10791
(cherry picked from commit 9c157ea)
2013-12-11 18:43:58 +01:00
Juergen Hoeller
1ea218cee2 MBean registration happens in a fully synchronized fashion for consistent results
Issue: SPR-11002
(cherry picked from commit 8d6d6be)
2013-12-11 18:43:33 +01:00
Juergen Hoeller
ec78165072 Component scanning ignores attributes and meta-annotations on non-public annotations
Issue: SPR-11091
(cherry picked from commit 161819f)
2013-12-11 18:42:48 +01:00
Juergen Hoeller
e4fb72f6e3 Fixed CGLIB class validation to not raising warning for static final methods
Issue: SPR-11107
(cherry picked from commit 9fbb57c)
2013-12-11 17:46:23 +01:00
Juergen Hoeller
6fb10981b0 Fixed extractOutputParameters to properly extract ResultSet in all cases
Issue: SPR-11076
(cherry picked from commit 3ff3805)
2013-12-11 17:45:51 +01:00
Juergen Hoeller
d48b9b1ef7 Actually accept String expressions for "prefetch" and "receive-timeout" in jms namespace
Issue: SPR-10986
(cherry picked from commit ccafccb)
2013-12-11 17:45:15 +01:00
Juergen Hoeller
c3907cdae5 Added 546 to Sybase data integrity violation codes
Issue: SPR-11097
(cherry picked from commit 2d2226b)
2013-12-11 17:44:47 +01:00
Juergen Hoeller
7f895222e1 Revised exclusion of java.lang.Class properties
Issue: SPR-11098
(cherry picked from commit 62ea627)
2013-12-11 17:44:16 +01:00
Phillip Webb
22ece06b39 Add a 'bill of materials' project for Maven users
Add 'spring-framework-bom' meta-project that contains the other projects
in a dependencyManagement section.

Issue: SPR-11138
2013-12-11 10:01:23 -06:00
Sam Brannen
b20b7415d8 Make methods of TestContext non-final
This commit makes several methods of TestContext non-final in order to
allow TestContext to be mocked — for example with Mockito.

Note, however, that TestContext has been converted to an interface in
Spring Framework 4.0.

Issue: SPR-11144
2013-12-11 01:23:03 +01:00
Sam Brannen
38ad39f467 Do not repopulate RequestContextHolder in ServTEL
This commit fixes a bug introduced in the last commit.

ServletTestExecutionListener (STEL) now tracks whether it has already
populated the RequestContextHolder.

Issue: SPR-11144

Backport-Commit: 800018a817
2013-12-11 01:02:05 +01:00
Sam Brannen
6ded287144 Honor presence of @WebAppConfiguration in ServTEL
The previous commit for issue SPR-11144 revealed a bug in
ServletTestExecutionListener (STEL). Specifically, STEL acted on the
fact that the ApplicationContext for a given TestContext was an
instance of WebApplicationContext. This behavior could potentially
break test code from previous releases of the Spring Framework that
relied on a custom setup of the RequestAttributes in the
RequestContextHolder with a custom WebApplicationContext ContextLoader.

This commit addresses this issue by ensuring that STEL only comes into
play if the test class is annotated with @WebAppConfiguration (for
prepareTestInstance() and beforeTestMethod()) or if the TestContext
attribute named RESET_REQUEST_CONTEXT_HOLDER_ATTRIBUTE is set to
Boolean.TRUE (for afterTestMethod()).

Issue: SPR-11144

Backport-Commit: 099b10d23b
2013-12-10 23:54:05 +01:00
Juergen Hoeller
6e275b7663 Polishing 2013-12-10 22:48:42 +01:00
Juergen Hoeller
882726377f Fixed ExtendedBeanInfo and its tests to accept JDK 8 b117+ introspection results
Specifically, read and write methods are allowed to express property types with superclass/subclass relationships in both directions now.

Issue: SPR-11139
(cherry picked from commit cb624e2)
2013-12-10 22:48:35 +01:00
Juergen Hoeller
2e15f94cf2 Optimized use of JDBC 3.0 ParameterMetaData.getParameterType, caching information about drivers which do not support that feature
Issue: SPR-11100
(cherry picked from commit 4c8a789)
2013-12-10 13:14:13 +01:00
Juergen Hoeller
d0fc38ec76 Fixed inner bean name determination for multi-level nesting scenario, calculating a unique bean name as early as possible now (and for any kind of bean scope)
Our per-bean caching in AutowiredAnnotationBeanPostProcessor and co relies on unique bean names, so this change fixes potential cache mismatch problems occuring there.

Issue: SPR-11131
(cherry picked from commit 242ecdc)
2013-12-10 13:12:41 +01:00
Juergen Hoeller
8e52e650f4 Fixed type resolution for uninitialized factory-method declaration
Issue: SPR-11112
(cherry picked from commit 5dcd287)
2013-12-10 13:12:32 +01:00
Juergen Hoeller
71650c0a44 Fixed evaluation of "!" operator in case of multiple profile expressions
Issue: SPR-11093
(cherry picked from commit 6078c27)
2013-12-10 12:16:22 +01:00
Sam Brannen
c89985c1db Ensure ServTEL doesn't reset ReqAttrs by accident
Prior to this commit, the ServletTestExecutionListener did not
overwrite RequestAttributes in the RequestContextHolder if the
ApplicationContext associated with the given TestContext was not a
WebApplicationContext; however, the ServletTestExecutionListener would
clear the RequestAttributes after every test method execution,
regardless of whether the context was a WebApplicationContext or not.
This behavior breaks backwards compatibility with integration tests
that managed the RequestAttributes in RequestContextHolder themselves.

This commit addresses this issue by introducing a TestContext attribute
named RESET_REQUEST_CONTEXT_HOLDER_ATTRIBUTE in
ServletTestExecutionListener. This attribute is used internally within
ServletTestExecutionListener to ensure that the RequestContextHolder is
only cleared (i.e., reset) if the ServletTestExecutionListener actually
populated the RequestContextHolder.

Issue: SPR-11144

Backport-Commit: a3b022aa48
2013-12-09 15:43:32 +01:00
Juergen Hoeller
d4b0751626 Polishing 2013-12-09 00:12:03 +01:00
Juergen Hoeller
6bed18004e Fixed detection of qualifier annotations on scoped-proxy factory methods
Issue: SPR-11116
2013-12-09 00:11:41 +01:00
Phillip Webb
dfed8afb26 Only consider "is" methods with boolean returns
Fix regression introduced in b25e91a5 where ReflectivePropertyAccessor
does not consider the return type for "is" getters.

Issue: SPR-11142
(cherry picked from commit 85b0bfff)
2013-12-03 12:06:26 -08:00
Rossen Stoyanchev
236981aaa9 Support multi-value x-forwarded-host header
Issue: SPR-11140
2013-12-03 09:55:47 -05:00
Juergen Hoeller
6ce2eb9622 EhCacheFactoryBean calls CacheManager.addCache before setStatisticsEnabled
Issue: SPR-11080
Issue: SPR-11092
2013-12-03 01:30:22 +01:00
Juergen Hoeller
6224ddd0cb Polishing (including removal of javadoc imports that show as package cycles in IntelliJ)
(cherry picked from commit 2a52dec)
2013-12-03 01:28:45 +01:00
Juergen Hoeller
25c7e3645b Polishing (including removal of javadoc imports that show as package cycles in IntelliJ)
(cherry picked from commit 2a52dec)
2013-12-03 00:00:31 +01:00
Juergen Hoeller
9c9cc7fcb4 Use AnnotationTransactionAttributeSource class name to avoid hard dependency on transaction.annotation package
(cherry picked from commit 4133272)
2013-12-02 23:59:36 +01:00
Juergen Hoeller
5639eb66b6 Polishing 2013-12-02 16:32:02 +01:00
Juergen Hoeller
1dc79f7f9c Synchronized cache creation on CacheManager
Issue: SPR-11132
(cherry picked from commit de890fd)
2013-12-02 16:10:44 +01:00
Juergen Hoeller
c1b772cd9c Optimized ImportAware processing to avoid re-reading class files
(cherry picked from commit 519f78c)
2013-12-02 16:10:34 +01:00
Phillip Webb
73a8a1b966 Detect cache hit with multiple @Cachables
Fix CacheAspectSupport to consider a cache hit from any of the multiple
@Cachables that may have been specified using the @Caching annotation.

Prior to this commit the following scenario would never produce a hit:

    @Caching(cacheable = {
            @Cacheable(value = "c1", unless = "#result.size() < 4"),
            @Cacheable(value = "c2", unless = "#result.size() > 3")
     })

Issue: SPR-11124
2013-11-26 17:13:50 -08:00
Spring Buildmaster
0f26a7795d Next development version 2013-11-06 11:51:48 -08:00
Phillip Webb
47ae15b7ee Update changelog 2013-11-06 11:15:37 -08:00
Juergen Hoeller
df7b661702 Added test for placeholder in alias definition
Issue: SPR-11018
(cherry picked from commit e9a24da)
2013-11-06 00:36:56 +01:00
Juergen Hoeller
fe46a01a57 JndiObjectFactoryBean converts a "defaultObject" value to the expected type if necessary
Issue: SPR-11039
(cherry picked from commit 0aedd81)
2013-11-06 00:36:48 +01:00
Rossen Stoyanchev
2f13e05b4f Return 415 on bad request body content-type
Issue: SPR-10982
2013-11-05 15:38:04 -05:00
Rossen Stoyanchev
4b38dc8972 Fix exception mock request builder
Issue: SPR-11043
2013-11-05 11:00:02 -05:00
Rossen Stoyanchev
7387cb990e Disable ext entities in SourceHttpMessageConverter
This change disables the processing of external entities in
SourceHttpMessageConverter by default and provides an option to enable
it if required.
2013-11-05 09:49:13 -05:00
Juergen Hoeller
863570abb7 Perform setParent's Environment merging for ClassPathXmlApplicationContext etc constructors with parent argument as well
Issue: SPR-11068
(cherry picked from commit c5fcf19)
2013-11-05 14:18:14 +01:00
Juergen Hoeller
70907fd326 Only retrieve the FlashMapManager if a non-empty output FlashMap has been found
Issue: SPR-10937
(cherry picked from commit 4ac6801)
2013-11-05 14:18:08 +01:00
Juergen Hoeller
494cc22bcd Polishing (along with SPR-10992) 2013-11-05 00:52:49 +01:00
Juergen Hoeller
044d68b336 @Bean method metadata is always being picked from the most concrete subclass
As a side effect, @Bean overrides and overloads work with 'allowBeanDefinitionOverriding'=false as well now.

Issue: SPR-10992
2013-11-05 00:52:28 +01:00
Juergen Hoeller
a95eb1d044 Polishing (selectively backported from recent 4.0 commits) 2013-11-04 16:22:46 +01:00
Juergen Hoeller
b00c31a620 Use non-lenient constructor resolution mode for @Bean methods
Since @Bean methods are never used with externally specified constructor argument values but rather just with autowiring, the non-lenient constructor resolution mode is appropriate in case of an overloaded @Bean method, not performing any type difference weight checks. This change includes a refinement of Spring's existing non-lenient constructor resolution (which needs to be explicitly turned on and is therefore not well tested), narrowing the conditions for the ambiguity check (only in case of the same number of arguments and not for overridden methods).

Issue: SPR-10988
(cherry picked from commit b093b84)
2013-11-04 16:11:04 +01:00