Commit Graph

731 Commits

Author SHA1 Message Date
Chris Beams
e158f61e93 Increment version to 3.1.1.BUILD-SNAPSHOT 2011-12-16 11:59:06 +01:00
Chris Beams
ac107d0c2a Release Spring Framework 3.1.0.RELEASE 2011-12-13 16:35:49 +00:00
Chris Beams
153d38f1c8 Polish Javadoc 2011-12-12 23:42:39 +00:00
Chris Beams
48836e2ebb Allow parameters in FactoryBean-returning @Bean methods
Prior to this change, an assumption was made in
AbstractAutowireCapableBeanFactory that any factory-method would have
zero parameters.  This may not be the case in @Bean methods.

We now look for the factory-method by name in a more flexible fashion
that accomodates the possibility of method parameters.

There remains at least one edge cases here where things could still fail,
for example a @Configuration class could have two FactoryBean-returning
methods of the same name, but each with different generic FactoryBean
types and different parameter lists. In this case, the implementation
may infer and return the wrong object type, as it currently returns
the first match for the given factory-method name.  The complexity cost
of ensuring that this never happens is not likely worth the trouble
given the very low likelihood of such an arrangement.

Issue: SPR-8762
2011-12-10 19:32:02 +00:00
Chris Beams
06d06d4aa9 Mention SystemEnvironmentPropertySource in related Javadoc
Issue: SPR-8869
2011-12-10 19:30:57 +00:00
Juergen Hoeller
569426dfdf restored DataBinder's ability to bind to an auto-growing List with unknown element type (SPR-8828) 2011-12-07 21:27:26 +00:00
Juergen Hoeller
e0d922d352 ConversionService is able to work with "Collections.emptyList()" as target type (again; SPR-7293) 2011-12-06 21:17:25 +00:00
Juergen Hoeller
33b53b7cca alignment with 3.0.7 backports (SPR-8674) 2011-12-01 18:51:36 +00:00
Juergen Hoeller
71e0a506b9 polishing 2011-12-01 15:12:26 +00:00
Juergen Hoeller
dc41daa3db renamed 'isJava6VisibilityBridgeMethodPair' to 'isVisibilityBridgeMethodPair' (SPR-8660) 2011-12-01 13:14:06 +00:00
Juergen Hoeller
ffa4784628 polishing (SPR-8005) 2011-12-01 12:53:47 +00:00
Sam Brannen
951514a576 removed unused imports 2011-11-29 21:29:15 +00:00
Juergen Hoeller
d6d169ac56 resolved package dependency tangles 2011-11-29 01:16:09 +00:00
Juergen Hoeller
fa9a7b18c6 refined Resource "exists()" check for HTTP URLs to always return false for 404 status (SPR-7881) 2011-11-28 21:11:57 +00:00
Juergen Hoeller
b391629de1 LinkedCaseInsensitiveMap overrides putAll method as well (for IBM JDK 1.6 compatibility; SPR-7969) 2011-11-28 20:48:02 +00:00
Juergen Hoeller
aa7fcb5431 polishing 2011-11-28 18:38:26 +00:00
Chris Beams
c6a0f1ef25 Polish logging for core.env package 2011-11-26 05:20:32 +00:00
Chris Beams
143db0d8de Introduce SystemEnvironmentPropertySource
Properties such as 'spring.profiles.active' cannot be specified at the
command line under Bash and other shells due to variable naming
constraints. This change allows for exchanging underscores for periods
as well as capitalizing property names for more idiomatic naming when
dealing with environment variables.

For example, Spring will respect equally either of the following:

    spring.profiles.active=p1 java -classpath ... MyApp

    SPRING_PROFILES_ACTIVE=p1 java -classpath ... MyApp

The former is not possible under Bash, while the latter is. No code or
configuration changes are required; SystemEnvironmentPropertySource
adapts for these varations automatically.

SystemEnvironmentPropertySource is added by default as
"systemEnvironment" to StandardEnvironment and all subtypes, taking the
place of the plain MapPropertySource that was in use before this change.

Issue: SPR-8869
2011-11-26 05:20:25 +00:00
Chris Beams
2c26a23c46 Rename EnvironmentTests => StandardEnvironmentTests 2011-11-26 05:20:20 +00:00
Chris Beams
a53d592f62 Use 'name' vs 'key' consistently in PropertySource 2011-11-26 05:20:17 +00:00
Rossen Stoyanchev
b5bcfa0ae3 SPR-8858 Fix in AntPathMatcher.combine(..)
Currently the combine method consolidates "/*" and "/hotel" 
into "/hotel". However if the first pattern contains URI template 
variables, the consolidation seems wrong. The fix is to prevent
the consolidation if the first pattern contains "{".
2011-11-23 17:53:18 +00:00
Juergen Hoeller
e2d9142c5a LocaleEditor and StringToLocaleConverter do not restrict variant part through validation (SPR-8637) 2011-10-20 11:53:02 +00:00
Juergen Hoeller
0c9e3fb3bd polishing 2011-10-20 11:21:54 +00:00
Juergen Hoeller
36616a0c2c fixed GenericTypeResolver to consistently return null if not resolvable (SPR-8698) 2011-10-20 11:17:42 +00:00
Juergen Hoeller
f7b9eb8fe3 added proper "contentLength()" implementation to ByteArrayResource (SPR-8709) 2011-10-20 10:59:44 +00:00
Juergen Hoeller
0dfb617d8a refer to correct openSession() method for Hibernate 4.0 (SPR-8776) 2011-10-20 10:23:49 +00:00
Chris Beams
f60a40be44 Polish Environment subsystem Javadoc 2011-10-11 18:51:26 +00:00
Juergen Hoeller
1cea52b66b renamed mapKey/ValueTypeDescriptor methods back to getMapKey/ValueTypeDescriptor (for Spring 3.0.x compatibility) 2011-10-11 16:55:07 +00:00
Juergen Hoeller
339c57e41a polishing 2011-10-11 01:00:31 +00:00
Juergen Hoeller
8bd1fc817a introduced extended WritableResource interface 2011-10-10 19:46:00 +00:00
Chris Beams
980c15d578 Distinguish between different bridge method types
Add BridgeMethodResolver#isJava6VisibilityBridgeMethodPair to
distinguish between (a) bridge methods introduced in Java 6 to
compensate for inheriting public methods from non-public superclasses
and (b) bridge methods that have existed since Java 5 to accommodate
return type covariance and generic parameters.

In the former case, annotations should be looked up from the original
bridged method (SPR-7900).  In the latter, the annotation should be
looked up against the bridge method itself (SPR-8660).

As noted in the Javadoc for the new method, see
http://stas-blogspot.blogspot.com/2010/03/java-bridge-methods-explained.html
for a useful description of the various types of bridge methods, as
well as http://bugs.sun.com/view_bug.do?bug_id=6342411, the bug fixed in
Java 6 resulting in the introduction of 'visibility bridge methods'.

Issue: SPR-8660, SPR-7900
2011-10-10 05:40:21 +00:00
Chris Beams
6837111bda Refactor AnnotationUtils#findAllAnnotationAttributes
Remove all convenience variants of #findAllAnnotationAttributes and
refactor the remaining method to accept a MetadataReaderFactory
instead of creating its own SimpleMetadataReaderFactory internally.
This allows clients to use non-default class loaders as well as
customize the particular MetadataReaderFactory to be used (e.g.
'simple' vs 'caching', etc).

Issue: SPR-8752
2011-10-09 20:32:21 +00:00
Rossen Stoyanchev
4199d772cc SPR-8718 Minor polish 2011-10-06 18:06:47 +00:00
Rossen Stoyanchev
cb5954ed02 SPR-8714 Do not create copy in map-to-map and collection-to-collection conversion if not necessary 2011-10-06 14:17:31 +00:00
Rossen Stoyanchev
00a726b098 SPR-8718 Prevent Converter<?,?> from converting target sub-type. 2011-10-06 14:17:12 +00:00
Chris Beams
dfda4c32d5 Fix error in AbstractResource#contentLength Javadoc
Issue: SPR-8734
2011-10-02 19:45:52 +00:00
Rossen Stoyanchev
3d50d416eb SPR-8718 Revert fix from earlier for now (need a different approach). 2011-09-26 17:58:49 +00:00
Rossen Stoyanchev
1d7a6c53da SPR-8718 Prevent ClassCastException when the target of Converter<?,?> is a super-class of the actual target. 2011-09-26 12:30:38 +00:00
Arjen Poutsma
dd1f3f8e0f Added MultiValueMap utility methods 2011-09-13 13:36:08 +00:00
Sam Brannen
16fb3cb4b3 [SPR-8644] Introduced a failing (ignored) test that demonstrates that findMethod() does not currently support var-args. 2011-08-30 14:05:51 +00:00
Sam Brannen
1de71c6e37 [SPR-8222] Upgraded to JUnit 4.9. 2011-08-30 13:16:12 +00:00
Chris Beams
76bf72c9f8 Introduce ConfigurableEnvironment#addActiveProfile
Provides a convenient mechanism for activating an additional profile
while preserving those that are already active, as opposed to
calling #setActiveProfiles with the contents of #getActiveProfiles plus
the new profile.

Issue: SPR-8548
2011-08-20 03:02:20 +00:00
Chris Beams
c0eeb8bacd Introduce AbstractEnvironment#validateProfile
Consolidates validation for profiles and provides a mechanism for
AbstractEnvironment subclasses to customize validation logic if
desired.
2011-08-20 03:02:12 +00:00
Chris Beams
711b84ab06 Update .core pom with jopt dependency
Issue: SPR-8482
2011-08-20 03:01:45 +00:00
Sam Brannen
87dad65ff0 [SPR-8622] Upgraded to JUnit 4.8.2 2011-08-18 16:06:31 +00:00
Sam Brannen
2d6340af74 Deleting unnecessary TODOs and suppressing warnings. 2011-08-13 13:38:54 +00:00
Juergen Hoeller
b6e82048fc removed GenericConversionService logging in order to avoid toString side effects (and to avoid isTraceEnabled overhead; SPR-8297) 2011-08-04 17:22:14 +00:00
Chris Beams
c85ebd9a5a Polish AnnotationUtils Javadoc 2011-07-26 19:55:11 +00:00
Juergen Hoeller
771c59f88a polishing 2011-07-26 00:39:13 +00:00
Juergen Hoeller
df3761e3f6 introduced AnnotationUtils.getAnnotation(AnnotatedElement, annotationType) 2011-07-22 09:34:42 +00:00