Commit Graph

277 Commits

Author SHA1 Message Date
Andy Clement fb2e3af50c more projection tests - verifying the typedescriptor changes made by Keith
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3891 50f2f4bb-b051-0410-bef5-90022cba6387
2011-01-07 19:14:42 +00:00
Keith Donald 61d54ae436 Favor convertValue(Object, TypeDescriptor) where possible and TypedValue(Object); check with Andy on Selection and Projection TypedValue usage
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3881 50f2f4bb-b051-0410-bef5-90022cba6387
2011-01-07 06:32:21 +00:00
Keith Donald 97033d66fb switched to better encapsulated convert(Object, TypeDescriptor) where possible
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3880 50f2f4bb-b051-0410-bef5-90022cba6387
2011-01-07 05:57:25 +00:00
Keith Donald d3d7951265 added forNestedType(MethodParameter) for resolution of nested parameter types for collection, array, and map parameter types
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3875 50f2f4bb-b051-0410-bef5-90022cba6387
2011-01-06 21:59:34 +00:00
Keith Donald ed2a257e69 added initial support for handling unknown nested type values when converting collections; now favor factory method for constructing nested type descriptors for clarity (made constructor private); improved javadoc
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3867 50f2f4bb-b051-0410-bef5-90022cba6387
2011-01-06 05:14:49 +00:00
Chris Beams 835a3f8d64 Refactor Environment and PropertySource
* Environment now extends PropertyResolver
* Environment no longer exposes resolver and sources
* PropertySource is String,Object instead of String,String
* PropertySource no longer assumes enumerability of property names
* Introduced EnumerablePropertySource for those that do have enumerable property names

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3862 50f2f4bb-b051-0410-bef5-90022cba6387
2011-01-05 22:24:14 +00:00
Keith Donald cf4062ed33 method naming improvements; applyIndexObject call for array indexing
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3851 50f2f4bb-b051-0410-bef5-90022cba6387
2011-01-05 16:54:03 +00:00
Keith Donald 1e2a8083a1 TypeDescriptor cleanup and general polishing; fixed a number of bugs related to TypeDescriptor usage in client code across beans and spel packages
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3846 50f2f4bb-b051-0410-bef5-90022cba6387
2011-01-05 05:49:33 +00:00
Chris Beams 1ac7b56caf M1 cut of environment, profiles and property work (SPR-7508)
Decomposed Environment interface into PropertySources, PropertyResolver
objects

    Environment interface and implementations are still present, but
    simpler.

    PropertySources container aggregates PropertySource objects;
    PropertyResolver provides search, conversion, placeholder
    replacement. Single implementation for now is
    PropertySourcesPlaceholderResolver

Renamed EnvironmentAwarePropertyPlaceholderConfigurer to
PropertySourcesPlaceholderConfigurer

    <context:property-placeholder/> now registers PSPC by default, else
    PPC if systemPropertiesMode* settings are involved

Refined configuration and behavior of default profiles

    See Environment interface Javadoc for details

Added Portlet implementations of relevant interfaces:

    * DefaultPortletEnvironment
    * PortletConfigPropertySource, PortletContextPropertySource
    * Integrated each appropriately throughout Portlet app contexts

Added protected 'createEnvironment()' method to AbstractApplicationContext

    Subclasses can override at will to supply a custom Environment
    implementation.  In practice throughout the framework, this is how
    Web- and Portlet-related ApplicationContexts override use of the
    DefaultEnvironment and swap in DefaultWebEnvironment or
    DefaultPortletEnvironment as appropriate.

Introduced "stub-and-replace" behavior for Servlet- and Portlet-based
PropertySource implementations

    Allows for early registration and ordering of the stub, then
    replacement with actual backing object at refresh() time.

    Added AbstractApplicationContext.initPropertySources() method to
    support stub-and-replace behavior. Called from within existing
    prepareRefresh() method so as to avoid impact with
    ApplicationContext implementations that copy and modify AAC's
    refresh() method (e.g.: Spring DM).

    Added methods to WebApplicationContextUtils and
    PortletApplicationContextUtils to support stub-and-replace behavior

Added comprehensive Javadoc for all new or modified types and members

Added XSD documentation for all new or modified elements and attributes

    Including nested <beans>, <beans profile="..."/>, and changes for
    certain attributes type from xsd:IDREF to xsd:string

Improved fix for detecting non-file based Resources in
PropertiesLoaderSupport (SPR-7547, SPR-7552)

    Technically unrelated to environment work, but grouped in with
    this changeset for convenience.

Deprecated (removed) context:property-placeholder
'system-properties-mode' attribute from spring-context-3.1.xsd

    Functionality is preserved for those using schemas up to and including
    spring-context-3.0.  For 3.1, system-properties-mode is no longer
    supported as it conflicts with the idea of managing a set of property
    sources within the context's Environment object. See Javadoc in
    PropertyPlaceholderConfigurer, AbstractPropertyPlaceholderConfigurer
    and PropertySourcesPlaceholderConfigurer for details.

Introduced CollectionUtils.toArray(Enumeration<E>, A[])

Work items remaining for 3.1 M2:

    Consider repackaging PropertySource* types; eliminate internal use
    of SystemPropertyUtils and deprecate

    Further work on composition of Environment interface; consider
    repurposing existing PlaceholderResolver interface to obviate need
    for resolve[Required]Placeholder() methods currently in Environment.

    Ensure configurability of placeholder prefix, suffix, and value
    separator when working against an AbstractPropertyResolver

    Add JNDI-based Environment / PropertySource implementatinos

    Consider support for @Profile at the @Bean level

    Provide consistent logging for the entire property resolution
    lifecycle; consider issuing all such messages against a dedicated
    logger with a single category.

    Add reference documentation to cover the featureset.

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3839 50f2f4bb-b051-0410-bef5-90022cba6387
2011-01-03 09:04:34 +00:00
Sam Brannen 924b8e11ea [SPR-7850][SPR-7851] Upgraded to JUnit 4.8.1 and TestNG 5.12.1; added changelog entries for 3.1.0.M1.
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3838 50f2f4bb-b051-0410-bef5-90022cba6387
2010-12-30 08:00:58 +00:00
Chris Beams 7ac69dff5f Normalize indentation of Apache license URL
In accordance with recommendations at
http://www.apache.org/licenses/LICENSE-2.0.html.

A number of classes had strayed from this format, now all
are the same.

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3831 50f2f4bb-b051-0410-bef5-90022cba6387
2010-12-22 21:40:19 +00:00
Chris Beams 45e5b46fc2 Merge 3.1.0 development branch into trunk
Branch in question is 'env' branch from git://git.springsource.org/sandbox/cbeams.git; merged into
git-svn repository with:

    git merge -s recursive -Xtheirs --no-commit env

No merge conflicts, but did need to

    git rm spring-build

prior to committing.

With this change, Spring 3.1.0 development is now happening on SVN
trunk. Further commits to the 3.0.x line will happen in an as-yet
uncreated SVN branch.  3.1.0 snapshots will be available
per the usual nightly CI build from trunk.

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3782 50f2f4bb-b051-0410-bef5-90022cba6387
2010-10-25 19:48:20 +00:00
Juergen Hoeller 37957aee1e revised TypedValue toString representation (SPR-7569)
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3733 50f2f4bb-b051-0410-bef5-90022cba6387
2010-10-10 21:29:18 +00:00
Juergen Hoeller e531a28d3b polishing
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3728 50f2f4bb-b051-0410-bef5-90022cba6387
2010-10-10 20:11:53 +00:00
Juergen Hoeller 502d2b0779 initialize cache Maps early, turning them into final fields
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3727 50f2f4bb-b051-0410-bef5-90022cba6387
2010-10-10 20:11:44 +00:00
Juergen Hoeller 8c9f96584e SpEL method invocations prefer method with fewest parameters (e.g. no-arg over vararg; SPR-7633)
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3726 50f2f4bb-b051-0410-bef5-90022cba6387
2010-10-10 19:23:01 +00:00
Juergen Hoeller 73480a5431 pass full TypeDescriptor context through to ConversionService calls (SPR-7519)
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3661 50f2f4bb-b051-0410-bef5-90022cba6387
2010-09-08 17:26:02 +00:00
Juergen Hoeller 118b0b0b80 SpEL supports projection on any kind of Collection (SPR-7493)
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3630 50f2f4bb-b051-0410-bef5-90022cba6387
2010-09-01 21:55:39 +00:00
Ben Hale 82e5f5f5d6 Publishing license and notice files
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3612 50f2f4bb-b051-0410-bef5-90022cba6387
2010-08-23 13:17:31 +00:00
Arjen Poutsma 750dc01862 Prepping for 3.0.5
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3611 50f2f4bb-b051-0410-bef5-90022cba6387
2010-08-19 11:04:04 +00:00
Juergen Hoeller 892d44f8c0 polishing
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3569 50f2f4bb-b051-0410-bef5-90022cba6387
2010-08-12 18:42:13 +00:00
Juergen Hoeller 425b471694 SpEL passes full collection type context to ConversionService (SPR-7410)
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3542 50f2f4bb-b051-0410-bef5-90022cba6387
2010-08-07 17:54:23 +00:00
Juergen Hoeller 6b55137d3e JSP EvalTag resolves "@myBeanName" references in expressions against the WebApplicationContext (SPR-7312); for consistency, expressions in an ApplicationContext support the same syntax against the local BeanFactory
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3479 50f2f4bb-b051-0410-bef5-90022cba6387
2010-07-12 19:36:26 +00:00
Andy Clement 3f09b6a313 SPR-7335: support for expression inline lists and array construction
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3473 50f2f4bb-b051-0410-bef5-90022cba6387
2010-07-06 21:00:54 +00:00
Andy Clement 8d0e8fe165 SPR-7343: StandardEvaluationContext not threadsafe in its lazy initialization
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3472 50f2f4bb-b051-0410-bef5-90022cba6387
2010-07-02 16:08:25 +00:00
Andy Clement bef5616753 polish
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3471 50f2f4bb-b051-0410-bef5-90022cba6387
2010-07-02 16:07:13 +00:00
Andy Clement 748b6a4ec9 polish
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3470 50f2f4bb-b051-0410-bef5-90022cba6387
2010-07-02 16:06:59 +00:00
Sam Brannen 0a6eb139c4 [SPR-7323] SpEL 'select last' operator now works consistently with maps.
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3461 50f2f4bb-b051-0410-bef5-90022cba6387
2010-06-26 21:10:20 +00:00
Juergen Hoeller 54a35be552 growCollection fails for element type Object as well; prefer use of getElementTypeDescriptor()
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3454 50f2f4bb-b051-0410-bef5-90022cba6387
2010-06-23 21:00:28 +00:00
Andy Clement e7319ba5e5 javadoc fix
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3439 50f2f4bb-b051-0410-bef5-90022cba6387
2010-06-21 22:13:49 +00:00
Arjen Poutsma 7f54fe732f Upgrading version to 3.0.4
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3428 50f2f4bb-b051-0410-bef5-90022cba6387
2010-06-15 14:18:29 +00:00
Juergen Hoeller 463cd8e0b0 avoid ConverterNotFoundException if source object is assignable to target type
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3426 50f2f4bb-b051-0410-bef5-90022cba6387
2010-06-15 09:35:39 +00:00
Juergen Hoeller ca716a9697 smarter guessing of the element type (SPR-7283)
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3418 50f2f4bb-b051-0410-bef5-90022cba6387
2010-06-14 22:58:18 +00:00
Andy Clement d8c51fdf7f SPR-7244: double indexing with a collection of different types of element
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3377 50f2f4bb-b051-0410-bef5-90022cba6387
2010-05-28 20:31:16 +00:00
Andy Clement a276e7c21a SPR-7209: parsing poorly formed Elvis expressions
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3349 50f2f4bb-b051-0410-bef5-90022cba6387
2010-05-18 18:44:40 +00:00
Andy Clement 4e32e896ab SPR-6941
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3314 50f2f4bb-b051-0410-bef5-90022cba6387
2010-05-06 00:26:13 +00:00
Andy Clement dedf6489ac SPR-7173, SPR-7100
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3313 50f2f4bb-b051-0410-bef5-90022cba6387
2010-05-05 23:52:01 +00:00
Keith Donald eca3e5d0b8 improved conversion system logging, collection converter simplification/polish, several optimizations, annotation-driven formatting caching
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3255 50f2f4bb-b051-0410-bef5-90022cba6387
2010-04-17 04:43:28 +00:00
Andy Clement efc8a513d1 SPR-7100: '_' supported as first char of identifier
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3254 50f2f4bb-b051-0410-bef5-90022cba6387
2010-04-16 21:10:23 +00:00
David Syer faa0f29f0f Update version in POMs to 3.0.3
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3246 50f2f4bb-b051-0410-bef5-90022cba6387
2010-04-15 10:26:14 +00:00
Juergen Hoeller 5d87fe71fa fixed TemplateParserContext documentation (SPR-7059)
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3216 50f2f4bb-b051-0410-bef5-90022cba6387
2010-04-01 10:59:58 +00:00
Juergen Hoeller 74705a7aea revised BeanTypeDescriptor into core PropertyTypeDescriptor; consider method annotations for return type (SPR-6979)
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3162 50f2f4bb-b051-0410-bef5-90022cba6387
2010-03-24 16:27:33 +00:00
Andy Clement 3b8b27e391 SPR-6984: auto grow collections on write through indexer
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3109 50f2f4bb-b051-0410-bef5-90022cba6387
2010-03-15 18:15:48 +00:00
Juergen Hoeller b4c7a7cd31 made getName() public; added isNullSafe() accessor (SPR-6980)
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3108 50f2f4bb-b051-0410-bef5-90022cba6387
2010-03-14 22:19:56 +00:00
Andy Clement 0d3e60e5b7 SPR-6968: indexing via square brackets can now treat the index as an attempt at property access
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3080 50f2f4bb-b051-0410-bef5-90022cba6387
2010-03-11 01:09:50 +00:00
Andy Clement e996bd83ff SPR-6941: part (1) correct exception handling when null cachedExecutor
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3071 50f2f4bb-b051-0410-bef5-90022cba6387
2010-03-09 17:33:36 +00:00
Andy Clement 43ea572fd5 SPR-6866: unhelpful NPE when expression badly formed
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3064 50f2f4bb-b051-0410-bef5-90022cba6387
2010-03-09 00:55:03 +00:00
David Syer 25ef81476d Update Central POMs to 3.0.2
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3022 50f2f4bb-b051-0410-bef5-90022cba6387
2010-02-21 15:32:18 +00:00
Costin Leau 4be6044db9 + make use or property placeholders inside template.mf
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3014 50f2f4bb-b051-0410-bef5-90022cba6387
2010-02-19 09:43:22 +00:00
Andy Clement 878f937f23 SPR-6745: metadata (annotations) attached to property accessors allowing formatting of values during conversion
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@2964 50f2f4bb-b051-0410-bef5-90022cba6387
2010-02-12 01:50:52 +00:00