Compare commits

...

1245 Commits

Author SHA1 Message Date
Chris Beams 4f9593da1c Fix typo in reference documentation
Issue: SPR-9321
2012-04-13 20:39:35 +03:00
Chris Beams aac21fdcec Update reference doc copyright year to 2012 2012-04-13 20:35:05 +03:00
Chris Beams dfd75352d3 Ignore spring-build 'docbook' directory 2011-12-22 22:23:45 +01:00
Chris Beams 6316448453 Increment version to 3.0.8.BUILD-SNAPSHOT 2011-12-22 22:23:45 +01:00
Chris Beams 40015e3de3 Release Spring Framework 3.0.7.RELEASE 2011-12-22 22:23:34 +01:00
Chris Beams 5e448af903 Update doc publication urls to static.s2.org 2011-12-22 22:17:56 +01:00
Chris Beams 1f3ce640c9 Add source directories to quell Eclipse errors 2011-12-22 18:15:18 +01:00
Juergen Hoeller cca44f411e added test for correct handling of ParseException from Formatter for String->String case (SPR-8944) 2011-12-22 15:19:59 +01:00
Juergen Hoeller 9b0412f35f fixed NamedParameterJdbcTemplate to use correct maximum type for queryForInt/Long (SPR-8652) 2011-12-22 13:12:22 +01:00
Juergen Hoeller 7eee3b9926 extended test time limits (in order o make the 3.0.x CI build plan happy) 2011-12-22 13:00:15 +01:00
Juergen Hoeller b5a279d2c8 final preparations for 3.0.7 2011-12-22 03:05:56 +01:00
Juergen Hoeller 0862a29066 "file-encoding" attribute value is being applied correctly (SPR-8024) 2011-12-22 03:05:40 +01:00
Juergen Hoeller 8d83f6966e Hibernate synchronization properly unbinds Session even in case of afterCompletion exception (SPR-8757) 2011-12-22 02:58:25 +01:00
Juergen Hoeller ce5117c9ed prepared for 3.0.7 release 2011-12-22 02:29:12 +01:00
Juergen Hoeller 836e3c9253 refined collection element conversion (SPR-8674) 2011-12-22 02:14:55 +01:00
Juergen Hoeller 2006eecb18 IntelliJ IDEA 11 project setup 2011-12-21 22:36:45 +01:00
Chris Beams 91287828f7 Preserve empty src/main/java dirs for ant build
Following the move to git, empty dirs are not tracked. Add .gitignore
files as necessary to keep the ant build happy.
2011-12-19 17:07:40 +01:00
Chris Beams efd2fc7688 Increment version to 3.0.7.BUILD-SNAPSHOT 2011-12-19 15:35:48 +01:00
Juergen Hoeller 74b5487a28 IntelliJ IDEA 11 project setup 2011-12-19 15:35:48 +01:00
Chris Beams 2882ae29b2 Add spring-build 2.5.2
spring-build was previously included via an svn:external. Adding
directly to the source tree under Git to avoid the need for a git
submodule.

In order to build from any earlier commit, it is recommended to
export spring-build or symlink an existing copy into the root
of the spring-framework project and then build normally.

    $ svn export https://src.springsource.org/svn/spring-build/tags/project-build-2.5.2 spring-build
2011-12-19 15:35:48 +01:00
Juergen Hoeller 4a7b96c4ca take element/key/value objects into account for the best possible type descriptor 2011-12-12 00:44:38 +00:00
Juergen Hoeller 7398e0ea97 polishing 2011-12-11 23:07:27 +00:00
Juergen Hoeller beaad20795 DataBinder etc 2011-12-11 22:11:50 +00:00
Juergen Hoeller 1bd84db56e polishing (alignment with 3.1 GA) 2011-12-11 22:06:59 +00:00
Juergen Hoeller 6316a45927 backported fix for SPR-8697 from 3.1 RC2 2011-12-11 22:06:28 +00:00
Juergen Hoeller e298c202af @Transactional qualifiers match against transaction manager definitions in parent contexts as well (SPR-7679) 2011-12-11 13:27:08 +00:00
Juergen Hoeller 288408e89f fixed assertion message 2011-12-09 16:01:30 +00:00
Juergen Hoeller 53a244d408 JmsInvokerClientInterceptor/FactoryBean always uses createConnection/createSession when on JMS 1.1 2011-12-09 12:07:45 +00:00
Juergen Hoeller 8213d0cb50 restored DataBinder's ability to bind to an auto-growing List with unknown element type (SPR-8828) 2011-12-07 21:25:54 +00:00
Juergen Hoeller b9868a498e ConversionService etc 2011-12-07 00:02:16 +00:00
Juergen Hoeller df7bdfa7c6 polishing 2011-12-06 22:50:48 +00:00
Juergen Hoeller f8402e9f82 ResourceHttpRequestHandler sends content without content-type header if no media type found (SPR-7713) 2011-12-06 22:50:33 +00:00
Juergen Hoeller 7eeb654eec ConversionService is able to work with "Collections.emptyList()" as target type (again; SPR-7293) 2011-12-06 21:18:13 +00:00
Juergen Hoeller b558c62953 polishing 2011-12-05 21:21:32 +00:00
Juergen Hoeller d64dd1943f consistent specification of standard meta-annotations 2011-12-03 15:47:29 +00:00
Juergen Hoeller bffa50e31a Portlet session mutex uses global session attribute to be shared among all portlets in the session (SPR-8888) 2011-12-02 12:03:43 +00:00
Juergen Hoeller 143cb50986 ConversionService prevents Converter from trying to convert to a subtype of its actual target type (SPR-8718) 2011-12-02 11:18:31 +00:00
Juergen Hoeller b3ccc438af conversion fixes etc 2011-12-01 18:50:11 +00:00
Juergen Hoeller 94513c1a28 fixed nested element conversion with a DataBinder + ConversionService + PropertyEditor (SPR-8674) 2011-12-01 18:49:53 +00:00
Juergen Hoeller c9607fdaf2 CollectionCollection/MapToMapConverter preserve original Collection/Map if no converted elements (SPR-8714) 2011-12-01 17:49:43 +00:00
Juergen Hoeller 7c108c1e77 updated H2 error codes in sql-error-codes.xml (SPR-8235, SPR-7480) 2011-12-01 14:07:04 +00:00
Juergen Hoeller 77372d7cdb fixed NamedParameterJdbcTemplate to use correct maximum type for queryForInt/Long (SPR-8652) 2011-12-01 13:59:24 +00:00
Juergen Hoeller 173f307ec9 backported header matching fix for correct processing of negated header conditions (SPR-8862) 2011-12-01 13:52:47 +00:00
Juergen Hoeller 2c987b0ffb backported DefaultResponseErrorHandler IOException fix (SPR-8713) 2011-12-01 13:33:51 +00:00
Juergen Hoeller 46a4ac9628 fixed ServletServerHttpRequest to reconstruct from "request.getParameterMap()" for form POST only (SPR-8688) 2011-12-01 13:27:25 +00:00
Juergen Hoeller c2997f4dd9 backported Java 6 visibility bridge method pair (SPR-8660) 2011-12-01 13:12:59 +00:00
Juergen Hoeller 0150000d8b backported TaskExecutorAdapter fix (SPR-8772) 2011-12-01 13:04:55 +00:00
Juergen Hoeller cad5eb836c allow for JDO 3.0 as well (SPR-8655) 2011-12-01 12:59:53 +00:00
Juergen Hoeller c82dab6497 backported public signatures in GenericTypeResolver (SPR-8005) 2011-12-01 12:52:33 +00:00
Juergen Hoeller e6f4e16219 backports from 3.1 RC2 2011-11-28 22:58:06 +00:00
Juergen Hoeller d0032f43c7 AbstractCachingViewResolver allows for caching unresolved view names ("cacheUnresolved"=true; SPR-8524) 2011-11-28 22:35:48 +00:00
Juergen Hoeller 8a43dd172c fixed getAsText javadoc (SPR-7890) 2011-11-28 21:14:47 +00:00
Juergen Hoeller 11aaefffbf refined Resource "exists()" check for HTTP URLs to always return false for 404 status (SPR-7881) 2011-11-28 21:12:08 +00:00
Juergen Hoeller c6b36cc207 JPA EntityManagerFactoryUtils silently ignores IllegalArgumentExceptions from setHint calls (SPR-7947) 2011-11-28 20:54:44 +00:00
Juergen Hoeller 5856db6f72 LinkedCaseInsensitiveMap overrides putAll method as well (for IBM JDK 1.6 compatibility; SPR-7969) 2011-11-28 20:48:10 +00:00
Juergen Hoeller 3c5e02a54a JDO PersistenceManager synchronization performs close attempt after completion (if necessary; SPR-8846) 2011-11-28 19:38:38 +00:00
Juergen Hoeller db0c921313 TransactionSynchronizationManager eagerly cleans up void ResourceHolders on any access (SPR-8844, SPR-8845) 2011-11-28 18:54:20 +00:00
Juergen Hoeller 641bc35a50 fixed setRootObject check in StandardEvaluationContext (SPR-8241) 2011-11-28 17:34:57 +00:00
Juergen Hoeller c166803d41 added "forwarder" property to ConnectorServerFactoryBean, accepting an MBeanServerForwarder (SPR-8820) 2011-11-28 17:17:56 +00:00
Juergen Hoeller 12e1784a99 Servlet/PortletContextResource's getFile prefers "file:" URL resolution over calling getRealPath (SPR-8461) 2011-11-28 16:51:52 +00:00
Juergen Hoeller bfabd58106 fixed "formMultiSelect"/"formCheckboxes" FreeMarker macros to compare against actual field value (SPR-7721) 2011-11-28 14:42:10 +00:00
Juergen Hoeller 540845e613 added getObjectMapper() accessor to MappingJacksonHttpMessageConverter (SPR-8605) 2011-11-28 14:35:08 +00:00
Juergen Hoeller 8e7982397c SimpleJdbcTestUtils executeSqlScript properly closes its LineNumberReader after use (SPR-8872) 2011-11-28 13:33:13 +00:00
Juergen Hoeller 84890ebc0d prepared for 3.0.7 2011-10-20 12:11:36 +00:00
Juergen Hoeller a9f28575b1 optimized DefaultListableBeanFactory's PropertyDescriptor caching for concurrent access (SPR-7863) 2011-10-20 12:06:40 +00:00
Juergen Hoeller a730bf47df LocaleEditor and StringToLocaleConverter do not restrict variant part through validation (SPR-8637) 2011-10-20 11:54:52 +00:00
Juergen Hoeller b5ec65cef6 fixed GenericTypeResolver to consistently return null if not resolvable (SPR-8698) 2011-10-20 11:21:39 +00:00
Juergen Hoeller 965c12b0f8 RmiClientInterceptor detects nested SocketException as connect failure as well (SPR-8628) 2011-10-20 11:10:23 +00:00
Juergen Hoeller 7187029ef6 added proper "contentLength()" implementation to ByteArrayResource (SPR-8709) 2011-10-20 11:03:41 +00:00
Juergen Hoeller 6363bb4b5b fixed Hibernate Validator import range 2011-08-18 23:15:16 +00:00
Juergen Hoeller 58ea5a702d backported autogrow fix: converted Collection differs from original Collection 2011-08-18 20:31:27 +00:00
Chris Beams 97b988ade8 Update pom versions to 3.0.6.BUILD-SNAPSHOT 2011-08-18 19:34:46 +00:00
Chris Beams 227234288f Backport rename JMX tests to avoid jmxremote_optional error
Issue: SPR-8089, SPR-8093, SPR-8458
2011-08-18 19:33:55 +00:00
Juergen Hoeller 05a7b65d43 backported NotificationListenerTests fixes 2011-08-18 19:05:31 +00:00
Juergen Hoeller cee6cb859d added test for month sequence (SPR-7807) 2011-08-17 21:01:39 +00:00
Juergen Hoeller 19c6a4e209 RequiredAnnotationBeanPostProcessor's skip attribute accepts "true" as String value as well (SPR-8617) 2011-08-16 22:41:45 +00:00
Juergen Hoeller b9089a8f9d final preparations for 3.0.6 2011-08-15 21:31:25 +00:00
Juergen Hoeller 7a20ed7d70 fixed timeout assertion 2011-08-15 21:29:15 +00:00
Juergen Hoeller 99588950d2 polishing 2011-08-15 21:24:41 +00:00
Juergen Hoeller a2129a132f consistent "connectTimeout" and "readTimeout" properties (SPR-8615) 2011-08-15 20:57:14 +00:00
Rossen Stoyanchev 0f1c10bc1c SPR-8612 Allow use of explicit status code in HTTP 1.0 compatibility mode 2011-08-15 13:02:48 +00:00
Juergen Hoeller 585745de32 added "connectTimeout" and "readTimeout" properties to SimpleClientHttpRequestFactory (SPR-8614) 2011-08-12 22:59:14 +00:00
Juergen Hoeller 65077d262c overridden @PersistenceContext annotations on subclass methods are being processed correctly (SPR-8594) 2011-08-12 13:54:44 +00:00
Juergen Hoeller da36c2b8b8 polishing 2011-08-12 10:03:28 +00:00
Juergen Hoeller 8f01770f29 backported "formatters" property to FormattingConversionServiceFactoryBean 2011-08-12 10:03:12 +00:00
Juergen Hoeller c51b9a7be2 removed GenericConversionService logging in order to avoid toString side effects (and to avoid isTraceEnabled overhead; SPR-8297) 2011-08-04 17:23:50 +00:00
Juergen Hoeller 3ffc0a2da2 SpringBeanAutowiringSupport is able to process @Value annotations on any given target instance (SPR-8574) 2011-08-03 10:20:04 +00:00
Juergen Hoeller acac25b2eb polishing 2011-08-02 19:19:22 +00:00
Juergen Hoeller cb0c0c503f ContentNegotiatingViewResolver properly handles invalid accept headers (SPR-7712) 2011-08-02 19:15:06 +00:00
Juergen Hoeller 215ccc2e10 final preparations for 3.0.6 2011-07-28 20:45:14 +00:00
Juergen Hoeller d95cbe23ee added support for web.xml context-param "springJspExpressionSupport" (explicit "true"/"false") 2011-07-28 20:26:07 +00:00
Juergen Hoeller ac1ffff9db general polishing (backported from 3.1) 2011-07-28 14:27:08 +00:00
Juergen Hoeller c0257aba9b accepts description subelement within map entry as well (as per the XSD; SPR-8563) 2011-07-28 11:14:26 +00:00
Juergen Hoeller 79aa661dd6 DefaultListableBeanFactory allows for init methods to register further bean definitions (again; SPR-7757) 2011-07-27 22:52:00 +00:00
Juergen Hoeller 18540debf6 backported locking enhancements for @MVC processing (SPR-7703) 2011-07-27 22:38:32 +00:00
Juergen Hoeller 7605707c18 backported @PathVariable matching fix (SPR-8543) 2011-07-27 22:31:17 +00:00
Juergen Hoeller d48c3b5d4f HtmlUtils properly escapes single quotes as well 2011-07-27 21:22:39 +00:00
Juergen Hoeller b122cf87df HtmlUtils properly escapes single quotes as well 2011-07-27 20:36:14 +00:00
Juergen Hoeller 183523d045 updated ResourceHttpRequestHandlerTests 2011-07-26 09:23:57 +00:00
Juergen Hoeller a4f62bb863 moved OpenSessionInViewTests back to orm module 2011-07-26 01:12:01 +00:00
Juergen Hoeller 80def4b695 copy css and js resources as well 2011-07-26 01:08:46 +00:00
Juergen Hoeller 42e18e6c4e fixed OpenEntityManagerInViewTests through the addition of a local copy of our Servlet API mocks; restoredOpenPersistenceManagerInViewTests 2011-07-26 00:52:15 +00:00
Juergen Hoeller d8767774c9 replaced TypeDescriptor synchronization with volatile variables (SPR-8559) 2011-07-25 16:31:46 +00:00
Juergen Hoeller f67e726be7 restored OpenEntityManagerInViewTests 2011-07-25 12:15:47 +00:00
Juergen Hoeller 41b9a461df ResourceHttpRequestHandler detects invalid directory traversal in given path (SPR-8515) 2011-07-25 10:57:39 +00:00
Juergen Hoeller 037497cb4f fixed ignored test 2011-07-21 10:35:05 +00:00
Juergen Hoeller 3ecb6b1a03 refined JBoss 6.0 note 2011-07-21 09:51:34 +00:00
Juergen Hoeller 6b92f66ebd final preparations for 3.0.6 release 2011-07-21 09:09:54 +00:00
Juergen Hoeller 070a723ef2 added "acceptProxyClasses" flag to RemoteInvocationSerializingExporter 2011-07-21 09:05:59 +00:00
Juergen Hoeller d4be29e661 updated javadoc for server-specific LoadTimeWeavers 2011-07-21 08:37:42 +00:00
Juergen Hoeller 3a3f15f144 improved ExposeInvocationInterceptor error message with respect to advice ordering (SPR-8544) 2011-07-21 07:39:11 +00:00
Juergen Hoeller 3edf8566ed fixed @ExceptionHandler exception type matching (ExceptionDepthComparator; SPR-8231) 2011-07-21 07:38:30 +00:00
Juergen Hoeller a2f00f205a collection/array conversion returns original collection if possible (SPR-8538); backported smarter element conversion check from 3.1 2011-07-20 19:57:40 +00:00
Juergen Hoeller 340a8b28f9 ConvertiblePair implements equals and hashCode (SPR-8459) 2011-07-19 15:54:36 +00:00
Juergen Hoeller 83c5753ae1 updated dependencies 2011-07-18 21:46:08 +00:00
Juergen Hoeller 67bb044a6f fixed whitespace 2011-07-18 21:33:45 +00:00
Juergen Hoeller 9ddfb375cb polishing 2011-07-18 20:49:58 +00:00
Juergen Hoeller 6fc6a9e80c fixed @Rule execution order in SpringJUnit4ClassRunner to match standard JUnit 4 behavior (SPR-8537) 2011-07-18 20:49:26 +00:00
Juergen Hoeller f18fa08aa0 ConfigurationClassPostProcessor supports use of same processor instance with several factories (SPR-8527) 2011-07-18 20:45:02 +00:00
Juergen Hoeller aa4ecdb79e fixed AccessControlContext applicability check 2011-07-15 14:43:33 +00:00
Juergen Hoeller 8041f6abdd polishing 2011-07-13 23:03:50 +00:00
Juergen Hoeller 210c77ddb0 SimpleClientHttpRequest uses fixed-length streaming mode (always sets content-length header); partial backport from 3.1 M2 2011-07-13 23:03:35 +00:00
Juergen Hoeller 24cb345b6c backported HttpHeadersTests update 2011-07-13 23:02:08 +00:00
Juergen Hoeller 0fdd7550b8 an EntityManagerFactoryBean is only deserializable through a SerializedEntityManagerFactoryBeanReference 2011-07-11 13:50:59 +00:00
Juergen Hoeller f1fb0e5330 prototype-based TargetSource is only deserializable through a SingletonTargetSource 2011-07-11 13:38:45 +00:00
Juergen Hoeller d4c2f63160 fixed package declaration 2011-07-04 22:05:21 +00:00
Juergen Hoeller b167f3f7a6 added JBoss dependency (SPR-8505); updated WebSphere dependency 2011-07-04 21:38:25 +00:00
Juergen Hoeller 63fe7bdd34 switched from readResolve to readObject 2011-07-04 21:21:56 +00:00
Juergen Hoeller 270db64243 optimized debug logging in case of non-convertible collection (SPR-8499) 2011-07-04 09:59:58 +00:00
Juergen Hoeller 15fd972417 DataBinder etc 2011-07-03 22:38:48 +00:00
Juergen Hoeller 10d9860457 ContextLoader and FrameworkServlet support "contextId" parameter for custom serialization id 2011-07-03 22:38:11 +00:00
Juergen Hoeller 01eab03dca added "autoGrowNestedPaths" property to ConfigurableWebBindingInitializer 2011-07-03 21:25:05 +00:00
Juergen Hoeller eb50eec85b DataBinder uses a default limit of 256 for array/collection auto-growing (SPR-7842) 2011-07-03 20:39:19 +00:00
Juergen Hoeller 4faa5af3f8 backported bridge method detection for class hierarchies with mixed visibilities (SPR-7900) 2011-06-22 21:25:50 +00:00
Juergen Hoeller 218e64cc80 DefaultListableBeanFactory etc 2011-06-22 20:58:23 +00:00
Juergen Hoeller b82edcca04 DefaultListableBeanFactory is only deserializable through a SerializedBeanFactoryReference 2011-06-22 20:55:44 +00:00
Juergen Hoeller d8a4949faf getBean(name, type) attempts type conversion if necessary (SPR-8480) 2011-06-22 20:53:38 +00:00
Costin Leau 22739bebf3 + fix incorrect junit version in ivy.xml 2011-06-17 07:55:57 +00:00
Juergen Hoeller fece2c1125 restored support for String-to-ContextResource conversion (SPR-8383) 2011-06-15 15:46:41 +00:00
Juergen Hoeller 8b55b34d79 consistent dependency on Hibernate Validator 4.1.0.GA 2011-06-14 21:39:41 +00:00
Juergen Hoeller d1e998bedd refined WebLogic RMI descriptor to only mark 'getTargetInterfaceName' method as idempotent (SPR-8369) 2011-06-14 15:10:00 +00:00
Juergen Hoeller 2ddb14ae5b refined EntityManagerFactory proxy exception (SPR-4383) 2011-06-14 15:03:34 +00:00
Juergen Hoeller ae74fbdd4b prepared for 3.0.6 release 2011-06-14 00:13:15 +00:00
Juergen Hoeller 28769e906f ConversionService, CachedConnectionFactory, etc 2011-06-14 00:06:51 +00:00
Juergen Hoeller 47c21bf73b fixed NamedParameterJdbcTemplate's handling of arrays as query parameters (SPR-7699) 2011-06-14 00:03:57 +00:00
Juergen Hoeller 59fda2dbab restored original GenericConversionService behavior with respect to empty collections/maps; restored original FormattingConversionService behavior with respect to the use of subtypes; fixed collection element resolution when using a ConversionService with a DataBinder 2011-06-13 23:57:37 +00:00
Juergen Hoeller 43f8eca91b restored original GenericConversionService behavior with respect to empty collections/maps; restored original FormattingConversionService behavior with respect to the use of subtypes; fixed collection element resolution when using a ConversionService with a DataBinder 2011-06-13 23:40:22 +00:00
Juergen Hoeller 6cb6bd751e revised JMS CachedConnectionFactory to avoid unnecessary rollback calls on Session return (SPR-8437); fixed JMS CachedConnectionFactory to fully synchronize its Session list (SPR-8436) 2011-06-13 22:33:02 +00:00
Juergen Hoeller 58d68cef98 restored original ConversionService behavior with respect to empty collections/maps (SPR-7728) 2011-06-13 22:03:00 +00:00
Juergen Hoeller 5f3f30fdb4 revised JMS CachedConnectionFactory to avoid unnecessary rollback calls on Session return (SPR-8437); fixed JMS CachedConnectionFactory to fully synchronize its Session list (SPR-8436) 2011-06-13 21:43:56 +00:00
Juergen Hoeller 7a6b2cfe1f shortened build properties "org.junit.version" to "junit.version" and "org.testng.version" to "testng.version"; reverted SLF4J version back to 1.5.3 (for Hibernate 3.3.1 compatibility) 2011-06-09 13:51:30 +00:00
Juergen Hoeller a8ab9af002 updated dependencies 2011-06-08 22:50:20 +00:00
Juergen Hoeller ca19b14f13 first bunch of backports from 3.1 M2 to 3.0.6 2011-06-08 22:49:41 +00:00
Juergen Hoeller 175f6d4bc5 2011-06-08 13:25:01 +00:00
Chris Beams 0206845341 Spring 3.0.5 2010-10-20 23:33:02 +00:00
Arjen Poutsma a37a9e8a38 SPR-7667 2010-10-20 13:59:37 +00:00
Juergen Hoeller 577755d580 polishing 2010-10-20 05:51:51 +00:00
Juergen Hoeller 610812949f prepared for 3.0.5 release 2010-10-20 05:48:25 +00:00
Juergen Hoeller 82ec515e59 declared JPA API as optional (SPR-6819) 2010-10-20 05:37:25 +00:00
Juergen Hoeller d418eed56f AbstractJasperReportsView only sets locale model attributes if not present already 2010-10-20 05:22:43 +00:00
Juergen Hoeller 244c96151e added consistent license header 2010-10-20 05:19:17 +00:00
Ramnivas Laddad 92298469bf Fixed configuration of AnnotationAsyncExecutionAspect (was incorrectly under the same name as that for transaction management aspect) 2010-10-17 22:33:30 +00:00
Juergen Hoeller bfd54f4f35 AnnotationAsyncExecutionAspect etc 2010-10-15 21:04:48 +00:00
Juergen Hoeller c5e53ee432 polishing 2010-10-15 20:50:51 +00:00
Juergen Hoeller 8c9b64c948 added mode="proxy"/"aspectj" and proxy-target-class options to task namespace; switched to concise names for async aspects 2010-10-15 20:50:23 +00:00
Thomas Risberg 171f1ee097 added additional parameter name matching using lowercase with Locale.ENGLISH (SPR-7658) 2010-10-15 15:56:59 +00:00
Juergen Hoeller be21358db7 reintroduced getHandler(request, cache) in deprecated form (after removing it in 3.0.4) 2010-10-15 14:05:22 +00:00
Juergen Hoeller 5da5fc6499 polishing 2010-10-15 08:44:03 +00:00
Chris Beams c7aaa85ef6 Add proper default values for 'merge' attributes in collection elements (SPR-7656) 2010-10-15 07:56:02 +00:00
Juergen Hoeller a25e4d794e Hibernate 3.6, etc 2010-10-14 23:10:08 +00:00
Juergen Hoeller 3c067e5db6 optimized AnnotationUtils findAnnotation performance for repeated search on same interfaces (SPR-7630) 2010-10-14 23:06:45 +00:00
Juergen Hoeller 0f924820e8 revised OracleTableMetaDataProvider for reliable Oracle Connection detection; autodetect JdbcTemplate's NativeJdbcExtractor (SPR-7611) 2010-10-14 21:25:14 +00:00
Juergen Hoeller 1f1577e33e fixed @Value injection to correctly cache temporary null results for non-singleton beans (SPR-7614) 2010-10-14 19:49:29 +00:00
Juergen Hoeller e1dbb66798 StringToArray/CollectionConverter trims element values before trying to convert them (SPR-7657) 2010-10-14 19:44:26 +00:00
Juergen Hoeller 1933b648c3 fixed @Value injection to correctly cache temporary null results for non-singleton beans (SPR-7614) 2010-10-14 19:40:36 +00:00
Juergen Hoeller 5cb06f5da2 consistent caching of @Autowired arguments in field and method case (SPR-7635) 2010-10-14 09:34:31 +00:00
Juergen Hoeller ffa4ed093f BeanWrapper etc 2010-10-14 00:30:38 +00:00
Juergen Hoeller 4c73a29f99 polishing 2010-10-14 00:30:07 +00:00
Juergen Hoeller 0195b0da3c BeanWrapper does not attempt to populate Map values on access (just auto-grows Map itself) 2010-10-14 00:14:50 +00:00
Juergen Hoeller 27a10c74d1 resolve dependency outside of synchronized block before subsequently preparing cached arguments (SPR-7635) 2010-10-13 23:22:57 +00:00
Juergen Hoeller 7893b3ebf6 applied synchronization in order to avoid race condition in skipping check (SPR-7635, SPR-7642) 2010-10-13 22:29:28 +00:00
Juergen Hoeller 21d6883139 moved async aspect to aspectj sub-package 2010-10-13 21:06:38 +00:00
Juergen Hoeller a6569a2930 moved async aspect to aspectj sub-package 2010-10-13 20:53:12 +00:00
Arjen Poutsma d9d7fb6f9a Docs 2010-10-13 14:19:48 +00:00
Arjen Poutsma 4108927b28 SPR-5367 - PathVariable mappings are greedy over hard coded mappings 2010-10-13 12:03:26 +00:00
Juergen Hoeller ac5b1bcfab fixed Autowired/CommonAnnotationBeanPostProcessor to prevent race condition in skipping check (SPR-7635, SPR-7642) 2010-10-12 22:56:38 +00:00
Arjen Poutsma c5c1d70aa3 SPR-6291 - UrlPathHelper is too aggressive decoding URLs 2010-10-12 12:09:43 +00:00
Arjen Poutsma 043ec2c8b2 SPR-7636 - XStreamMarshaller - Add support for configuring XStream with aliases by class (type) and also defining multiple attributes for the same class. 2010-10-12 11:55:29 +00:00
Arjen Poutsma 1f296403da SPR-7620 - StaxEventContentHandler does not set Location for StartDocument event 2010-10-12 09:50:39 +00:00
Arjen Poutsma 35da7bdb44 SPR-7621 - AbstractStaxContentHandler sets NamespaceContext on every start/end element 2010-10-12 09:41:23 +00:00
Arjen Poutsma ab21dbad08 SPR-7621 - AbstractStaxContentHandler sets NamespaceContext on every start/end element 2010-10-12 09:35:23 +00:00
Juergen Hoeller c32c0d5674 fixed package declaration 2010-10-11 21:26:32 +00:00
Juergen Hoeller e506ccf4e1 serializer package etc 2010-10-11 21:15:56 +00:00
Juergen Hoeller 0ef971b82b polishing 2010-10-11 21:15:26 +00:00
Juergen Hoeller b062de1133 revised initial cut of serializer package; moved Converter adapters to sub-package 'support' 2010-10-11 21:15:12 +00:00
Juergen Hoeller 3740380a7a polishing 2010-10-11 20:03:40 +00:00
Juergen Hoeller cb434793d5 avoid double flushing of ObjectOutputStream when close is being called right afterwards anyway 2010-10-11 20:00:45 +00:00
Oliver Gierke 9114f80b68 SPR-7641 - Added Principal to listing of supported method parameter types. 2010-10-11 19:59:16 +00:00
Juergen Hoeller ae3cfff380 fixed JodaTimeContextHolder to use a non-inheritable ThreadLocal and expose a reset method (SPR-7441); use of remove() even when being called with a null argument 2010-10-11 18:55:21 +00:00
Mark Fisher c046419acd SPR-7627 added Serializer and Deserializer strategies, Converter adapters, and default implementations 2010-10-11 17:36:18 +00:00
Thomas Risberg bd22bed10a added a SybaseAnywhereMaxValueIncrementer since syntax is slightly different than for Sybase ASE (SPR-7623) 2010-10-11 14:17:09 +00:00
Juergen Hoeller a0fead1880 revised TypedValue toString representation (SPR-7569) 2010-10-10 21:29:18 +00:00
Juergen Hoeller f7cd9865f4 polishing 2010-10-10 21:09:59 +00:00
Juergen Hoeller ebe8052d55 fixed detection of element type in case of nested collections (SPR-7569) 2010-10-10 21:09:43 +00:00
Juergen Hoeller 6b3c299a50 consistent handling of handler methods, init binder methods and model attribute methods (SPR-7355) 2010-10-10 21:01:04 +00:00
Juergen Hoeller 722778c74a SpEL MapAccessor consistently rejects "target.key" style access to Maps if no such key is found (SPR-7614) 2010-10-10 20:22:15 +00:00
Juergen Hoeller 1cd77e2a15 polishing 2010-10-10 20:11:53 +00:00
Juergen Hoeller 5be9473136 initialize cache Maps early, turning them into final fields 2010-10-10 20:11:44 +00:00
Juergen Hoeller 7553b76f15 SpEL method invocations prefer method with fewest parameters (e.g. no-arg over vararg; SPR-7633) 2010-10-10 19:23:01 +00:00
Juergen Hoeller d78eda8aeb polishing 2010-10-10 18:31:43 +00:00
Juergen Hoeller 061063257a optimized @Bean error messages (SPR-7628, SPR-7629) 2010-10-10 18:31:03 +00:00
Juergen Hoeller 4e43ba544b Jdbc4NativeJdbcExtractor etc 2010-10-09 23:08:23 +00:00
Juergen Hoeller ccded10d86 added configurable Connection/Statement/ResultSet target types to Jdbc4NativeJdbcExtractor (SPR-7613); added OracleJdbc4NativeJdbcExtractor with pre-configured Oracle JDBC API types 2010-10-09 23:04:50 +00:00
Juergen Hoeller 2433feab09 fixed embedded database exception test 2010-10-09 13:29:22 +00:00
Juergen Hoeller be04aca037 consistent handling of unwrap/isWrapperFor/isClosed in JDBC proxies 2010-10-09 12:38:37 +00:00
Juergen Hoeller 153680a5e6 polishing 2010-10-09 12:35:38 +00:00
Juergen Hoeller a15d023b45 ResourceDatabasePopulator throws descriptive ScriptStatementFailedException with resource details (SPR-7546) 2010-10-09 12:35:21 +00:00
Thomas Risberg 63b8ae085a added a nativeJdbcExtractor property for the TableMetaDataProvider and a method to specify the one to use for SImpleJdbcInsert (SPR-7611) 2010-10-08 18:28:01 +00:00
Oliver Gierke 1c6e131746 SPR-7604 - Support multiple embedded databases.
Added missing test configuration file.
2010-10-08 12:40:06 +00:00
Ramnivas Laddad 00984781af SPR-7369: @Async support in spring-aspects with AspectJ 2010-10-06 20:13:22 +00:00
Ramnivas Laddad e1fb19f4e1 SPR-7369: @Async support in spring-aspects with AspectJ 2010-10-06 20:12:15 +00:00
Arjen Poutsma 21cca695e5 Polishing 2010-10-06 12:05:11 +00:00
Oliver Gierke ba2bac17de SPR-7604 - Support multiple embedded databases.
Embedded datasources now get their bean ids set as database name to allow multiple databases of the same type in parallel. Refactored tests a little and made BeanDefinitionParser package private to align with the other ones. Adapted changelog accordingly.
2010-10-02 06:30:05 +00:00
Juergen Hoeller 5918e2fa9c preparations for 3.0.5 release 2010-10-02 01:29:35 +00:00
Juergen Hoeller 6d94c92d97 DefaultMessageListenerContainer's skips no-message-received commit on Tibco (avoiding a deadlock; SPR-7558) 2010-10-02 01:25:25 +00:00
Juergen Hoeller 3f0462510e getTestExecutionListeners() returns actual List which allows for iteration as well as modification (SPR-7595) 2010-10-02 01:05:40 +00:00
Juergen Hoeller 40fa8afce4 DispatcherPortlet's default resource serving explicitly prevents access to WEB-INF and META-INF (SPR-7540) 2010-10-02 00:03:09 +00:00
Juergen Hoeller aac2de9221 avoid ConcurrentModificationException when iterating attribute names (SPR-7557) 2010-10-01 22:27:34 +00:00
Juergen Hoeller cbab6fa59f reduced BeanDefinition footprint by initializing Sets and Maps with 0 2010-10-01 22:22:50 +00:00
Juergen Hoeller b7b2a25953 fixed ApplicationContext event processing for repeated invocations to non-singleton listener beans (SPR-7563) 2010-10-01 22:16:21 +00:00
Juergen Hoeller d9b54a524d revised "ClassUtils.isAssignable" semantics to cover primitives vs wrappers in both directions (SPR-7610) 2010-10-01 21:50:25 +00:00
Oliver Gierke 9008e08171 SPR-7651 - Document limitations of @Async.
* documented that @Async can't be used in conjunction with lifecycle callbacks such as @PostConstruct
* provide sample for workaround
* added semantic markup for code
2010-10-01 09:44:55 +00:00
Oliver Gierke eb0990b37e Formatting for scheduling.xml. 2010-10-01 09:44:52 +00:00
Oliver Gierke 1fc6de0403 SPR-7609 - Fixed typos in JMS documentation. 2010-10-01 06:52:08 +00:00
Oliver Gierke b467f2c858 SPR-7602 - Correctly shutdown Derby >= 10.6
The shutdown mechanism for in-memory databases has changed since 10.6. We now have to trigger 'drop' instead of 'shutdown'. Besides that we can skip purging the database manually in newer versions.
2010-09-30 17:56:41 +00:00
Juergen Hoeller e211c09065 fixed exists() check for resources in zipped files (SPR-7559) 2010-09-29 14:45:44 +00:00
Juergen Hoeller f88f69e700 AspectJExpressionPointcut uses bean ClassLoader for initializing the AspectJ pointcut parser (SPR-7570) 2010-09-29 14:31:23 +00:00
Juergen Hoeller eda6268d9d fixed findPlaceholderEndIndex to work with a custom suffix as well (SPR-7574) 2010-09-29 14:01:54 +00:00
Juergen Hoeller 668207d59d fixed Portlet UnavailableException tests (SPR-7542) 2010-09-29 13:45:50 +00:00
Juergen Hoeller 803b336354 fixed Portlet UnavailableException tests (SPR-7542) 2010-09-29 13:31:53 +00:00
Juergen Hoeller 4c154d3cab AnnotationSessionFactoryBean's "postProcessConfiguration" is non-final now (because of Hibernate 3.6; SPR-7581) 2010-09-29 13:22:24 +00:00
Juergen Hoeller 7ad191c912 made ResourceHttpRequestHandlerTests more reliable (SPR-7565) 2010-09-29 13:14:18 +00:00
Arjen Poutsma 70cb81b4b5 SPR-7591 - HttpStatusCodeException should contain response body 2010-09-24 10:06:52 +00:00
Costin Leau 6e516b7281 SPR-6819
+ change jpa Maven dependency from provided to compile
2010-09-21 23:14:22 +00:00
Jeremy Grelle aab05c4da9 Minor correction to doc updates made as part of SPR-7545 - "cache-period" attribute was incorrectly documented as "cache-seconds". 2010-09-17 18:50:01 +00:00
Chris Beams 562747ef41 Review recent documentation and default servlet changes
- Relocate and fix typos in interface-based @RequestMapping tip (SPR-7537)
- Fix typos in constructor-arg 'name' disambiguation section (SPR-7443)
- Polish whitespace in DefaultServletHttpRequestHandler (SPR-7553)
2010-09-15 08:45:21 +00:00
Oliver Gierke c1d2c36f32 SPR-7443 - Mentioned @ConstructorProperties in doc
If you want to reference parameters by name in XML
configuration you can also use @ConstructorProperties
to name the parameters in the class.
2010-09-15 08:13:12 +00:00
Oliver Gierke e8b9c6d5ff SPR-7443 - Constructor arg resolution by name (doc)
Added documentation on constructor argument 
disambiguation by using the argument names.
2010-09-15 06:37:05 +00:00
Thomas Risberg b2b195e2cf changed the access of the "reconcileColumnsToUse" and "reconcileParameters" methods to protected (SPR-7556) 2010-09-14 15:48:03 +00:00
Oliver Gierke 2c559aa8c8 SPR-7537 - Document proxying for MVC controllers
Extended documentation to include hints on what to 
consider when working with proxied controllers.
Explained the necessity of moving @RequestMapping
annotations to the interface or use proxy-target-
class="true".
2010-09-14 11:02:46 +00:00
Juergen Hoeller bf90a2ddb6 DispatcherPortlet throws custom NoHandlerFoundException instead of misleading UnavailableException (SPR-7542) 2010-09-14 06:43:53 +00:00
Juergen Hoeller a3f155220b UriTemplate is serializable now (SPR-7541) 2010-09-14 05:37:30 +00:00
Juergen Hoeller 6d4faa6c52 ApplicationContext registers context-specific ClassArrayEditor for its bean ClassLoader (SPR-1461) 2010-09-14 05:09:08 +00:00
Jeremy Grelle d8ecc76d4c SPR-7545 - Reference documentation now reflects the final state of the ResourceHttpRequestHandler and references the DefaultServletHttpRequestHandler properly. 2010-09-13 23:06:06 +00:00
Chris Beams 05bcc4028d Fix assumption about file-based Resources in PropertiesLoaderSupport (SPR-7547)
When using PropertiesLoaderSupport implementations (principally
PropertyPlaceholderConfigurer), an assumption was made that any
Resource representing a set of properties must be file-based.  SPR-7547
exposed the fact that if a non-file-based Resource implementation such
as ByteArrayResource were passed in, an IllegalStateException would be thrown
from the AbstractResource base class' implementation of getFilename().

This is now patched, and PropertiesLoaderSupport implementations treat
Resource implementations equally, regardless of file-orientation.

See also SPR-7552.
2010-09-13 20:23:26 +00:00
Jeremy Grelle 334a294e2a SPR-7553 - DefaultServletHttpRequestHandler fails on Google App Engine 2010-09-13 19:58:26 +00:00
Chris Beams 99f7142e3f Add @Ignored repro test for SPR-7538 2010-09-10 16:32:20 +00:00
Juergen Hoeller aa54518e2e final preparations for 3.0.5 2010-09-10 09:09:28 +00:00
Juergen Hoeller c2dab9c200 EmbeddedDatabaseFactory shuts down database when failing to populate it in initDatabase (SPR-7536) 2010-09-10 09:07:20 +00:00
Juergen Hoeller 609f91e1b4 final preparations for 3.0.5 2010-09-09 22:14:51 +00:00
Juergen Hoeller 87e7258c9a polishing 2010-09-09 22:14:36 +00:00
Juergen Hoeller 134e79c0fd clearly document behavior with respect to beans of same name at different factory levels (SPR-6117) 2010-09-09 22:12:23 +00:00
Chris Beams 08fb61316d Comment xsd-config-setup doc pending overhaul (SPR-7521) 2010-09-09 10:16:43 +00:00
Chris Beams 4b89069cab Polish whitespace in docs 2010-09-09 10:16:39 +00:00
Juergen Hoeller 5f2d88f74a polishing 2010-09-09 09:04:40 +00:00
Juergen Hoeller 53692a79e2 polishing 2010-09-09 08:13:49 +00:00
Juergen Hoeller b07a7be262 expression parser stuff 2010-09-08 22:53:54 +00:00
Juergen Hoeller 7a42ff16ac polishing 2010-09-08 22:53:39 +00:00
Juergen Hoeller f848e5081d updated version statement in javadoc 2010-09-08 22:48:03 +00:00
Juergen Hoeller 91a53a36ec LocalSessionFactoryBean's "entityCacheStrategies" works with region names on Hibernate 3.6 as well 2010-09-08 22:45:58 +00:00
Thomas Risberg 1247d2085b Polished the support for looking up column values by column label (SPR-7506) 2010-09-08 18:59:28 +00:00
Thomas Risberg 90636f66a8 Added support for looking up column values by column label to support CachedRowSetImpl which doesn't allow for column label use (SPR-7506); added some generics; 2010-09-08 18:46:21 +00:00
Juergen Hoeller c33df5977a pass full TypeDescriptor context through to ConversionService calls (SPR-7519) 2010-09-08 17:26:02 +00:00
Chris Beams 6f69b7b752 Allow class-relative resource loading in GenericXmlApplicationContext (SPR-7530)
Before:

    - new GenericXmlApplicationContext("com/acme/path/to/resource.xml");

    - GenericXmlApplicationContext ctx = new GenericXmlApplicationContext();
      ctx.load("com/acme/path/to/resource.xml");
      ctx.refresh();

After:

    - The above remain supported, as well as new class-relative variants

    - import com.acme.path.to.Foo;
      new GenericXmlApplicationContext(Foo.class, "resource.xml");

    - import com.acme.path.to.Foo;
      GenericXmlApplicationContext ctx = new GenericXmlApplicationContext();
      ctx.load(Foo.class, "resource.xml");
      ctx.refresh();

These changes are generally aligned with signatures long available in
ClassPathXmlApplicationContext. As GenericXmlApplicationContext is
intended to be a more flexible successor to CPXAC (and FSXAC), it's
important that all the same conveniences are available.
2010-09-08 15:30:48 +00:00
Juergen Hoeller 912d349366 @MVC fixes 2010-09-08 14:48:52 +00:00
Juergen Hoeller 284f98f12a fixed @MVC processing of parameter-level annotations to work with interface-based proxies again (SPR-7483) 2010-09-08 14:45:00 +00:00
Juergen Hoeller 907febd86e revised @RequestParam processing to support CSV-to-array/collection binding with ConversionService (SPR-7479) 2010-09-08 13:56:42 +00:00
Arjen Poutsma af7203b839 Added XMLEventStreamWriter 2010-09-08 12:52:23 +00:00
Juergen Hoeller a251d6a6cc revised @RequestParam processing to support CSV-to-array/collection binding with ConversionService (SPR-7479) 2010-09-08 12:39:57 +00:00
Arjen Poutsma 449337a544 Small Stax fixes. 2010-09-08 09:45:18 +00:00
Arjen Poutsma f92f295055 Small Stax fixes. 2010-09-08 08:42:09 +00:00
Juergen Hoeller 6a4bc3e39f further fixes for 3.0.5 2010-09-06 23:35:14 +00:00
Juergen Hoeller 88e0dcfa06 added MockMultipartFile to web-portlet module 2010-09-06 23:22:03 +00:00
Juergen Hoeller bd05b046d0 reverted shortening of action exception parameter value; fixed multipart test (SPR-7495) 2010-09-06 23:11:11 +00:00
Juergen Hoeller 7e5215b5d4 fixed typo 2010-09-06 22:56:18 +00:00
Juergen Hoeller ba946c08dd copy event parameters to render parameters in case of an action exception as well (SPR-7495) 2010-09-06 22:56:05 +00:00
Juergen Hoeller 3eda5144ae DispatcherPortlet copies all action parameters to render parameters in case of an action exception (SPR-7495); shortened Portlet MVC's action exception render parameter value to "true" 2010-09-06 22:45:31 +00:00
Juergen Hoeller e68f2f0a5f removed unused HandlerExecutionChain caching 2010-09-06 21:44:06 +00:00
Juergen Hoeller 45d9b0cb2d allow for writing the response directly in a Portlet @ExceptionHandler method (like in the Servlet equivalent) 2010-09-06 21:43:26 +00:00
Juergen Hoeller 66b4499973 polishing 2010-09-06 21:20:03 +00:00
Juergen Hoeller e035477e6a extended synchronization for methodResolverCache (SPR-7525) 2010-09-06 20:41:50 +00:00
Juergen Hoeller 479b4c1b84 added bean type to post-processing log statement (SPR-7524) 2010-09-06 20:06:48 +00:00
Juergen Hoeller 05a3f3ad8d avoid failures in case of manually registered null instance (SPR-7523) 2010-09-06 19:47:16 +00:00
Arjen Poutsma b67da6c3f8 Granting Keith's wish 2010-09-03 08:50:45 +00:00
Sam Brannen 0485f15998 Fixed typo 2010-09-01 23:38:51 +00:00
Juergen Hoeller b60a7a2e07 prepared for 3.0.5 2010-09-01 22:24:21 +00:00
Juergen Hoeller e6425ee41f polishing 2010-09-01 22:02:33 +00:00
Juergen Hoeller 0a17e41755 catch invalid arguments early; avoid stack overflow in object-to-collection case (SPR-7488) 2010-09-01 22:02:07 +00:00
Juergen Hoeller 055c343ce0 SpEL supports projection on any kind of Collection (SPR-7493) 2010-09-01 21:55:39 +00:00
Juergen Hoeller 3f68ccadd9 polishing 2010-09-01 18:41:10 +00:00
Juergen Hoeller 4e3227441b DefaultLobHandler's "wrapAsLob" mode works with PostgreSQL's getAsciiStream() requirement (SPR-7487) 2010-09-01 18:09:29 +00:00
Juergen Hoeller e56cfb8173 consistent use of JDK 1.5's ThreadLocal.remove() over ThreadLocal.set(null), preventing leaks (SPR-7441) 2010-09-01 17:17:25 +00:00
Juergen Hoeller 66a5bb7c22 JaxWsPortClientInterceptor does not fall back to annotation-specified name as portName anymore (SPR-7505) 2010-09-01 14:02:32 +00:00
Juergen Hoeller 82bcef037d JDBC bundle uses local ClassLoader as bean ClassLoader for "sql-error-codes.xml" parsing (SPR-7497) 2010-09-01 13:46:57 +00:00
Juergen Hoeller 5ddf8245dd fixed EvalTag's EvaluationContext caching (SPR-7482) 2010-09-01 13:33:45 +00:00
Juergen Hoeller 3e5aca86d5 fixed no-message-received commit case for non-cached Sessions (SPR-7478) 2010-09-01 11:21:40 +00:00
Juergen Hoeller d7e0776148 avoid hanging in case of shutdown errors (SPR-7511) 2010-09-01 11:19:11 +00:00
Arjen Poutsma 416004b1bc Fixing build 2010-08-31 15:48:42 +00:00
Arjen Poutsma 2182287d3e Minor tweaks 2010-08-31 10:46:58 +00:00
Arjen Poutsma e3298061d2 Added createCustomStaxSource/Result, because JAXP 1.4 kills babies in their sleep. 2010-08-31 09:51:59 +00:00
Arjen Poutsma 9aafa1c6b2 Various StAX improvements. 2010-08-27 11:35:27 +00:00
Chris Beams b72cca5403 Fix memory leak in serializable bean factory management (SPR-7502)
GenericApplicationContext and AbstractRefreshableApplicationContext
implementations now call DefaultListableBeanFactory.setSerializationId()
only upon successful refresh() instead of on instantiation of the
context, as was previously the case with GAC.

DLBF.setSerializationId() adds the beanFactory to the *static*
DLBF.serializableFactories map, and while calling close() on the
application context removes entries from that map, it does so only if
the context is currently active (i.e. refresh() has been called).

Also, cancelRefresh() has been overridden in GAC just as it has been
in ARAC to accomodate the possibility of a BeansException being thrown.
In this case, the beanFactory serializationId will be nulled out and
the beanFactory removed from the serializableFactories map.

The SerializableBeanFactoryMemoryLeakTests test case provides full
coverage of these scenarios.
2010-08-27 10:53:20 +00:00
Arjen Poutsma d0f13b5beb SPR-7490 - Reverting RedirectView to it's 3.0.3 version 2010-08-25 09:00:09 +00:00
Arjen Poutsma 4504ab8bc2 SPR-7316 - writeAcceptCharset now also set to false when using mvc namespace. 2010-08-23 14:53:00 +00:00
Ben Hale 7730e76c06 Publishing license and notice files 2010-08-23 13:17:31 +00:00
Arjen Poutsma dbfa049e1e Prepping for 3.0.5 2010-08-19 11:04:04 +00:00
Arjen Poutsma 9f05f28727 Prepping for 3.0.5 2010-08-19 10:55:41 +00:00
Juergen Hoeller a9da123259 temporarily disabled constructor argument caching for converted values (SPR-7423) 2010-08-19 09:30:04 +00:00
Arjen Poutsma 001d676dec SPR-7471 - Regression in redirect URL encoding 2010-08-19 08:54:42 +00:00
Arjen Poutsma 061b2c91a0 SPR-7474 - AbstractXmlStreamReader getAttributeValue(String, String) does not handle null namespaceURI properly 2010-08-19 07:53:48 +00:00
Chris Beams 9ab2c6628b Split IoC chapter DocBook XML into multiple files (SPR-7467)
All <section/> elements in beans.xml >=~ 500 lines have been broken out
into separate documents with DOCTYPE 'section'. This refactoring makes
working with these files much easier in wysiwyg editors (namely
oXygen Author).

For consistency, this same refactoring should be applied to all other
chapters much larger than 1500 lines, such as aop.xml (3861), mvc.xml
(3466), jdbc.xml (3042), and so on.

beans.xml and the new section files have also been formatted for
consistency and to avoid whitespace diffs as much as possible into the
future.
2010-08-18 10:37:35 +00:00
Juergen Hoeller 2f980d95ff final preparations for 3.0.4 release 2010-08-18 09:13:10 +00:00
Juergen Hoeller 9857ba077b revised constructor argument caching for highly concurrent creation scenarios (follow-up to SPR-7423) 2010-08-18 09:08:55 +00:00
Chris Beams 9a088b8128 Document BeanFactoryPostProcessor implementation constraints (SPR-7466)
JavaDoc and reference docs now warn developers against interacting with
bean instances within BeanFactoryPostProcessor implementations in order
to avoid premature bean instantiation.

See SPR-7450 for an example of a third-party BFPP
(OAuthTokenLifecycleRegistryPostProcessor) prematurely instantiating
a FactoryBean instance, such that bean post-processing is bypassed
and autowired injection (via @Inject) never occurs.
2010-08-17 09:50:22 +00:00
Juergen Hoeller e4792aaf33 polishing 2010-08-16 21:24:21 +00:00
Juergen Hoeller b58e19b04c polishing 2010-08-16 20:39:28 +00:00
Juergen Hoeller 48869a86cc consistent converting and escaping of label values (following AbstractMultiCheckedElementTag's SPR-7174) 2010-08-16 20:39:14 +00:00
Juergen Hoeller a032ce12cb renamed "mapping-order" to "order"; added "cache-period" 2010-08-16 19:04:51 +00:00
Juergen Hoeller ecb351c475 return 404 in case of no media type found 2010-08-16 19:02:12 +00:00
Juergen Hoeller b51f067f74 @MVC handler method resolution 2010-08-15 23:51:01 +00:00
Juergen Hoeller 9b3fbc2333 WebDataBinder and @MVC request param binding detect and introspect MultipartFile arrays as well (SPR-2784) 2010-08-15 23:20:55 +00:00
Juergen Hoeller ee04046ed7 polishing 2010-08-15 23:04:19 +00:00
Juergen Hoeller 3cf22a0255 lazy creation of MessageFormats 2010-08-15 23:04:02 +00:00
Juergen Hoeller 0aec5efb56 polishing 2010-08-15 23:01:10 +00:00
Juergen Hoeller 5c3cf5f672 added testStringArrayToResourceArray 2010-08-15 23:00:46 +00:00
Juergen Hoeller d1afb29074 Servlet/PortletContextResource inherit isReadable, contentLength and lastModified from AbstractFileResolvingResource 2010-08-15 22:57:37 +00:00
Juergen Hoeller b2b1ff60dd CommonsMultipartResolver cleans up all multipart files in case of multiple files for same name as well (SPR-2784) 2010-08-15 22:52:54 +00:00
Juergen Hoeller 255d1ad434 WebDataBinder and @MVC request param binding detect and introspect MultipartFile arrays as well (SPR-2784) 2010-08-15 22:51:02 +00:00
Juergen Hoeller 5b0448c609 MockMultipartHttpServletRequest pre-defines method "POST" and content type "multipart/form-data" 2010-08-15 22:46:15 +00:00
Juergen Hoeller 1841b14b21 consistent mocks between modules 2010-08-15 22:02:40 +00:00
Juergen Hoeller 19fcbeafb4 renamed UriUtilsTest to UriUtilsTests 2010-08-15 22:01:33 +00:00
Juergen Hoeller ace7b072f1 fixed accidental change to byte array loop 2010-08-15 21:43:24 +00:00
Juergen Hoeller fd159246ed polishing 2010-08-15 21:26:43 +00:00
Juergen Hoeller 2516bc0faf polishing 2010-08-15 21:24:35 +00:00
Juergen Hoeller 3963ff6e3b use generic Class<?> in TransactionAttributeSource signature 2010-08-15 21:19:52 +00:00
Juergen Hoeller a5b30fd074 polishing 2010-08-15 21:17:39 +00:00
Juergen Hoeller 35971f9f90 revised handler method resolution, in particular with respect to generic interfaces (SPR-7355) 2010-08-15 21:12:54 +00:00
Juergen Hoeller 49a2970def search super-interfaces as well (SPR-7355) 2010-08-14 21:12:58 +00:00
Juergen Hoeller 665a997f66 refined exception messages; added unit tests for custom array types 2010-08-14 19:42:29 +00:00
David Syer 5109501d16 SPR-7463: switched to instance variable 2010-08-14 11:09:42 +00:00
Juergen Hoeller e27f4b1577 revised DispatcherServlet's last-modified handling to properly work with scoped controllers 2010-08-12 23:32:53 +00:00
Juergen Hoeller f8690cf791 DispatcherServlet etc 2010-08-12 22:55:12 +00:00
Juergen Hoeller f6c07b371f revised DispatcherServlet's last-modified handling to properly work with scoped controllers; added HEAD support to ResourceHttpRequestHandler 2010-08-12 22:54:24 +00:00
Juergen Hoeller 29b12adbaa revised web scoping tests 2010-08-12 22:49:26 +00:00
Juergen Hoeller a79c015297 refined logging of handler objects in order to avoid early access to scoped proxies (SPR-7456) 2010-08-12 22:14:20 +00:00
Juergen Hoeller 01b65cd201 polishing 2010-08-12 18:49:13 +00:00
Juergen Hoeller 61fcef1471 polishing 2010-08-12 18:42:13 +00:00
Juergen Hoeller 34ebad5fff fixed JSP EvalTag to render null result as empty String instead of "null" String (SPR-7459) 2010-08-12 18:41:24 +00:00
Juergen Hoeller 9bd0bd9c3a SpringTemplateLoader supports last-modified timestamp through Resource abstraction (SPR-7454) 2010-08-12 10:56:28 +00:00
Juergen Hoeller 99733aef2a introspect superclass when given a CGLIB proxy as target class (SPR-7448); use generic Class<?> in TransactionAttributeSource signature 2010-08-11 21:47:50 +00:00
Juergen Hoeller 8a23ce917a Spring's constructor resolution consistently finds non-public multi-arg constructors (SPR-7453) 2010-08-11 19:24:30 +00:00
Arjen Poutsma 6e303d25c4 SPR-7427 - URL in a redirect is not escaped by RedirectView 2010-08-11 11:44:44 +00:00
Arjen Poutsma ac1d2d93d6 SPR-7439 - JSON (jackson) @RequestBody marshalling throws awkward exception 2010-08-11 08:16:12 +00:00
Chris Beams b90260f8d2 Link to Spring Integration at end of event coverage 2010-08-11 06:36:00 +00:00
Chris Beams 258a47435d Remove XFire reference documentation (SPR-7434)
XFire is now CXF (per http://xfire.codehaus.org), and given that Spring
does not actually ship with any explicit XFire support, it makes sense
to remove the documentation completely.  CXF does provide support for
writing services with Spring, and they provide their own documentation.

See http://cxf.apache.org/docs/writing-a-service-with-spring.html
2010-08-10 23:10:35 +00:00
Juergen Hoeller 1503a139e2 fixed yet another regression with respect to newlines (SPR-7449) 2010-08-10 22:36:36 +00:00
Chris Beams 3d2dd447af Remove Chapter 27 from reference documentation (SPR-7433)
Chapter 27 covered @Required and RequiredAnnotationBeanPostProcessor but
did not hold together as a chapter unto itself.  The IoC chapter already
makes mention of @Required and RequiredAnnotationBeanPostProcessor,
though not in quite as much detail as Chapter 27 did.  Links have been
updated throughout to reference these sections and Chatper 27 has been
eliminated entirely.
2010-08-10 22:13:55 +00:00
Chris Beams abf523698c Apply parentheses consistently within <methodname/>
Prior to change, there were 175 instances of <methodname/> elements
including parentheses (e.g.: <methodname>foo()</methodname>, and
36 instances without.

Now all 211 instances include parentheses for consistency.
2010-08-10 22:13:50 +00:00
Sam Brannen e3400f77c9 [SPR-7449] @Ignore'd failing test for regression in ResourceDatabasePopulator. 2010-08-10 21:51:35 +00:00
Chris Beams 9008cf907a Overhaul custom ApplicationEvent documentation (SPR-7422, SPR-7395)
Documentation now:

- Reflects generic use of ApplicationListener interface

- Demonstrates use of ApplicationEventPublisher(Aware) instead of
  ApplicationContext(Aware) for publishing custom events

- Provides a more complete narrative as to how each of the publisher,
  listener, and event objects interact with one another
2010-08-10 20:59:36 +00:00
Chris Beams 720f7ecf48 Polish validation chapter program listings
<programlisting/> elements must contain no newlines at beginning or end.
The following is an example of what not to do:

    <programlisting><![CDATA[
package com.foo.bar;

class XFoo implements Foo<X> {
}]]>
    </programlisting>

This leaves newlines at the beginning and end of the programlisting
panel within the PDF. Instead, do it like this:

    <programlisting><![CDATA[package com.foo.bar;

class XFoo implements Foo<X> {
}]]></programlisting>
2010-08-10 13:48:48 +00:00
Chris Beams 87caa13363 Clarify ConversionServiceFactoryBean documentation (SPR-7362)
- The sentence at the end of section 5.5.5 now refers to the
  <mvc:annotation-driven conversion-service="..."/> example at the end
  of section 5.6.

- The sentence at the end of section 5.5.5 refers to the
  FormatterConversionServiceFactoryBean section that follows.
2010-08-10 13:48:44 +00:00
Chris Beams cecee4d02b Fix typo in validation chapter 2010-08-10 13:48:41 +00:00
Chris Beams f45bb92917 Format validation chapter docbook source 2010-08-10 13:48:34 +00:00
Chris Beams 73ec840279 Remove dependency-check coverage from reference docs (SPR-7303)
- 'dependency-check' attribute of the <bean/> element was removed
  in the spring-beans-3.0 XSD; documentation now reflects this change.

- 'autodetect' was removed from the enumeration of possible values
  for autowire mode in the spring-beans-3.0 XSD; documentation now
  reflects this change.

Note that the underlying functionality for these values has not been
removed from Spring Core.  Users of Spring 3.0 who still need this
support may choose to use spring-beans-2.5.xsd in order to preserve
backward-compatibility.
2010-08-10 13:48:26 +00:00
Juergen Hoeller 771db05608 changed contentLength() from int to long 2010-08-09 15:58:07 +00:00
Juergen Hoeller e250ff0fb4 fixed package-info 2010-08-08 23:31:48 +00:00
Juergen Hoeller b4cd58394a revised ResourceHttpRequestHandler (SPR-7116) 2010-08-08 23:25:49 +00:00
Juergen Hoeller bda3d81bc9 implement file resolution for isReadable() as well 2010-08-08 23:21:41 +00:00
Juergen Hoeller 2b4e714c68 Resource refinements, etc 2010-08-08 23:00:30 +00:00
Juergen Hoeller 82730830d1 added "contentLength()" method to Resource abstraction; URL-based Resource variants introspect "last-modified" and "content-length" response headers (SPR-5465); refined "exists()" check for UrlResource (HEAD request) and ClassPathResource (URL resolution) 2010-08-08 22:53:52 +00:00
Chris Beams f5b0edbebd Typo fix 'a enterprise' -> 'an enterprise' 2010-08-07 22:47:32 +00:00
Juergen Hoeller 48874801a3 fixed accidental regression with respect to newlines 2010-08-07 18:02:51 +00:00
Juergen Hoeller 58b07f586d SpEL passes full collection type context to ConversionService (SPR-7410) 2010-08-07 17:54:23 +00:00
Juergen Hoeller 7cddb1c50e polishing 2010-08-07 16:52:16 +00:00
Juergen Hoeller a8133a9917 ignore empty statements (SPR-7363) 2010-08-07 16:52:05 +00:00
Chris Beams bf4b9f5ffb Replace 'Java EE' with 'enterprise Java' as appropriate
Also change 'JEE' -> 'Java EE'
2010-08-07 14:47:17 +00:00
Chris Beams 0625990020 Add missing equals sign to code snippet (SPR-7339) 2010-08-07 13:57:28 +00:00
Chris Beams e116a29795 Change 'lastName*' -> 'lastName' for error display (SPR-7339)
It's not clear why the asterisk would be necessary, as 'lastName'
alone should match all errors associated with that field.
2010-08-07 13:57:26 +00:00
Chris Beams d97f899bee Fix typos (SPR-7339) 2010-08-07 13:57:23 +00:00
Chris Beams 5ce4cada53 Fix typos in Chapter 27 (SPR-7339)
Note that SPR-7433 has also been created to consider removing this
chapter entirely.
2010-08-07 13:57:18 +00:00
Chris Beams b87b23087d Replace 'recourse' with simpler terms (SPR-7339) 2010-08-07 13:57:16 +00:00
Chris Beams bab902e85b Fix typo 'type form'->'type from' (SPR-7339) 2010-08-07 13:57:14 +00:00
Chris Beams 5e64f228b6 Consistently refer to 'default no-arg constructor' (SPR-7339) 2010-08-07 13:57:12 +00:00
Chris Beams edad222e6a Distinguish JMS remoting from JMS messaging support (SPR-7339) 2010-08-07 13:57:09 +00:00
Chris Beams 91172f4f43 Clarify ServletException is thrown when no view is resolved (SPR-7339) 2010-08-07 13:57:07 +00:00
Chris Beams 3a9fc70f91 Add @Repository use to JdbcTemplate Best Practices (SPR-7339) 2010-08-07 13:57:03 +00:00
Chris Beams 30b0e5e250 Improve explanation re DAOs and persistence resources (SPR-7339) 2010-08-07 13:57:01 +00:00
Chris Beams 55f2fe7dd5 Replace 'tropes' language (SPR-7339) 2010-08-07 13:56:58 +00:00
Chris Beams d109879b6c Ignore OS X .DS_Store files 2010-08-07 13:56:49 +00:00
Juergen Hoeller 4af36454ba PortletWrappingController supports Portlet 2.0 resource and event requests as well (SPR-7430) 2010-08-07 11:47:32 +00:00
Juergen Hoeller 753cda3d81 Portlet AbstractController consistently uses session mutex if "synchronizeOnSession" is active 2010-08-07 11:46:15 +00:00
Juergen Hoeller b054ca4a48 reintroduced createInstance() template method in deprecated form (SPR-7428) 2010-08-07 11:16:46 +00:00
Juergen Hoeller 9ef47b82a5 added missing setter method for the "valueSeparator" property (SPR-7429) 2010-08-07 11:03:49 +00:00
Jeremy Grelle 103297cf59 SPR-7116 - Added documentation for <mvc:default-servlet-handler> 2010-08-03 16:14:37 +00:00
Michael Isvy 6adf8d18df SPR-7416
Typo on the name of the @Autowired annotation:  @Autowire -> @Autowired
Usage of the @Value annotation: ${jdbcProperties.url} -> ${jdbc.url} (inside section "Declaring @Configuration classes as plain Spring <bean/> elements").
2010-08-03 07:14:29 +00:00
Jeremy Grelle 8e77701358 SPR-7116 - Added documentation for <mvc:resources> 2010-08-03 01:23:24 +00:00
Jeremy Grelle c1246d506c SPR-7116 - javadocs 2010-08-02 22:37:14 +00:00
Juergen Hoeller af0fac9099 JaxWsPortProxyFactoryBean takes "wsdlDocumentUrl", "namespaceUri" etc defaults from @WebService (SPR-7412) 2010-08-02 21:44:14 +00:00
Jeremy Grelle 367048c5d1 SPR-7116 - Simplified (removed gzip and white-listing) and completed XML namespace config. 2010-07-31 01:09:40 +00:00
Juergen Hoeller 061af2f25f ultimateTargetClass falls back to raw class instead of returning null 2010-07-30 15:13:38 +00:00
Juergen Hoeller faad0f4bb1 AutodetectCapableMBeanInfoAssembler signature consistently refers to Class<?> (SPR-7405) 2010-07-29 20:29:32 +00:00
Juergen Hoeller c3a639f07d fixed concurrency issue in TypedStringValue, showing for nested typed Maps in prototype beans (SPR-7398); optimized building of keyed arg names in BeanDefinitionValueResolver 2010-07-29 13:49:09 +00:00
Jeremy Grelle bd4f4d0d30 SPR-7116 further work in progress. Added white-listing by media type, checking MIME type from the ServletContext, and some additional validations. 2010-07-29 00:01:13 +00:00
Juergen Hoeller 3e0003a1a0 TaskExecutorFactoryBean (as used by task:executor) exposes full ThreadPoolTaskExecutor type (SPR-7403) 2010-07-28 17:39:03 +00:00
Jeremy Grelle 60a69bd653 SPR-7116 work in progress. ResourceHttpRequestHandler is now functionally equivalent to the Spring JS ResourceServlet, with the exception of the resource concatenation feature (which will be deferred for reconsideration in 3.1). 2010-07-27 04:45:43 +00:00
Juergen Hoeller 72da237474 FilterDefinitionFactoryBean supports Hibernate 3.6.0.beta1 as well 2010-07-27 00:04:23 +00:00
Juergen Hoeller d3cb310962 bunch of fixes for 3.0.4 2010-07-26 21:03:55 +00:00
Juergen Hoeller d4f73c1d3d turned TypeDescriptor.UNKNOWN into an internal detail (SPR-7349) 2010-07-26 20:55:14 +00:00
Juergen Hoeller 3c0ce48cbd added further test case for property type detection with generic interface 2010-07-26 20:39:27 +00:00
Juergen Hoeller 8e5c033446 avoid double ConversionFailedException nesting 2010-07-26 20:33:34 +00:00
Juergen Hoeller f04febaf2d fixed @PathVariable regression in combination with ConversionService usage on DataBinder 2010-07-26 20:14:57 +00:00
Juergen Hoeller b261d336b1 HibernateJpaDialect correctly closes borrowed connections even for nested JDBC executions (SPR-7393) 2010-07-26 12:33:37 +00:00
Arjen Poutsma 8519a2d705 Fixed execute -> exchange 2010-07-26 08:00:43 +00:00
Juergen Hoeller f90125f984 fixed WeakReferenceMonitor to never stop its monitoring thread if an entry has been registered (SPR-7373) 2010-07-23 18:18:16 +00:00
Juergen Hoeller 18af8a00f9 added license header 2010-07-23 10:09:33 +00:00
Juergen Hoeller b7b7c067c6 GenericTypeResolver works for nested parameterized types and for generic superclasses as well (SPR-7389) 2010-07-22 15:57:55 +00:00
Arjen Poutsma 60fa490b50 Typo 2010-07-22 09:31:01 +00:00
Chris Beams 605ac0e230 Remove redundant @Aspect from CodeStyleAspect.aj
This has been present for quite some time, and compilation at the
command line was never a problem.  However, after upgrading to
STS 2.3.3.M2, errors started appearing in the Problems tab about
'duplicate @Aspect annotations'.  This message was a bit misleading
given that the underlying issue is that applying an @Aspect annotation
on an aspect declared in .aj style is redundant.  Andy Clement is
investigating as well, but for now the reason for the change in behavior
remains a mystery.
2010-07-21 19:18:11 +00:00
Juergen Hoeller 7304c09021 Spring field error arguments include actually declared annotation attributes in alphabetical order (SPR-6730) 2010-07-21 14:24:10 +00:00
Chris Beams 9bcfc5480d Fix dependency issues in .context pom and .classpath
Hibernate validator had been updated to 4.1.0 in the ivy metadata, but
not yet reflected in the .classpath file.  The pom.xml had been updated
but there was a typo - scope read 'coompile', instead of 'compile'.
2010-07-21 12:04:06 +00:00
Chris Beams 022e74ea3d Add .springBeans to .gitignore 2010-07-21 12:04:03 +00:00
Juergen Hoeller 4d5a9c41e0 allow for converting a property value based on the corresponding property name (SPR-7386) 2010-07-21 11:17:44 +00:00
Juergen Hoeller 11886f2149 polishing 2010-07-20 20:02:43 +00:00
Juergen Hoeller 1dce03af78 JSR-303 Pattern message resolvable through Spring MessageSource (despite special characters; SPR-7329) 2010-07-20 20:02:23 +00:00
David Syer 3afe8aee18 Fix hibernate-validatin version 2010-07-20 15:41:41 +00:00
David Syer e26fc66523 SPR-7384: switch to using 1-12 for month numbers 2010-07-20 15:25:00 +00:00
Arjen Poutsma c24ffc9175 SPR-7381 - HTTP headers returned as part of ResponseEntity(MultiValueMap<String, String> headers, HttpStatus statusCode) are ignored when using this constructor 2010-07-16 13:47:19 +00:00
Arjen Poutsma 228c0b18cb SPR-7345 - HTTP 405 (Method not supported) returned when 404 Status (Not Found) was expected 2010-07-16 10:06:19 +00:00
Juergen Hoeller b456bc107b DefaultMessageListenerContainer triggers Session commit even if no message has been received (SPR-7366) 2010-07-15 19:43:56 +00:00
Juergen Hoeller f25a04c69c fixed JMS CachingConnectionFactory to correctly cache a producer without fixed destination as well (SPR-7148) 2010-07-15 17:05:30 +00:00
Arjen Poutsma f8425a5f7b SPR-7346 - @RequestHeader negation expressions (e.g. !Accept=text/plain) are not applied 2010-07-15 08:49:18 +00:00
Juergen Hoeller dcad6c341b BeanWrapper, EvalTag, etc 2010-07-12 21:05:30 +00:00
Juergen Hoeller 66abad2540 BeanWrapper preserves annotation information for individual array/list/map elements (SPR-7348) 2010-07-12 20:56:22 +00:00
Juergen Hoeller e0e1cb3c24 polishing 2010-07-12 19:54:37 +00:00
Juergen Hoeller df5e9b1211 MVC HandlerExceptionResolvers prevent caching for exception views if preventResponseCaching=true (SPR-7334) 2010-07-12 19:54:05 +00:00
Juergen Hoeller 263fabb0fc 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 2010-07-12 19:36:26 +00:00
Juergen Hoeller d1d5e2d52a JmsResourceHolder does not ignore IllegalStateException from locally synchronized transaction (SPR-7360) 2010-07-08 12:15:35 +00:00
Juergen Hoeller 96b9cf6ca9 DefaultJdoDialect supports JDO 3.0 query timeout facility (as supported by DataNucleus 2.1) 2010-07-08 11:47:30 +00:00
Juergen Hoeller 3918518779 polishing 2010-07-08 11:45:52 +00:00
Juergen Hoeller 7e9e8401f7 @ExceptionHandler works for inherited method and CGLIB proxies on Portlet controllers as well (SPR-7337) 2010-07-08 11:45:35 +00:00
Andy Clement cb72fe1be2 SpEL documentation (!) on @Bean referencing, inline lists and array construction 2010-07-06 21:40:25 +00:00
Andy Clement f5ced9be38 SPR-7335: support for expression inline lists and array construction 2010-07-06 21:00:54 +00:00
Andy Clement 88560fd910 SPR-7343: StandardEvaluationContext not threadsafe in its lazy initialization 2010-07-02 16:08:25 +00:00
Andy Clement 6de707d8e0 polish 2010-07-02 16:07:13 +00:00
Andy Clement 0c1424acb6 polish 2010-07-02 16:06:59 +00:00
Juergen Hoeller 0d405fd124 fixed typos (SPR-7332) 2010-06-29 10:22:49 +00:00
Chris Beams 45ed0ba43c licensing header 2010-06-28 23:20:44 +00:00
Chris Beams cd271fca43 attempted to repro SPR-7318 to no avail 2010-06-28 22:57:26 +00:00
Juergen Hoeller 3f31a1cf75 added "validationMessageSource" property to LocalValidatorFactoryBean, for Spring-based messages (SPR-7307) 2010-06-28 22:08:31 +00:00
Juergen Hoeller 4d56b89619 transaction names based on method id from most specific method (target class instead of interface; SPR-7317) 2010-06-28 19:47:13 +00:00
Juergen Hoeller f9017ea05d added formCheckbox to macro list (SPR-7322) 2010-06-28 18:23:56 +00:00
Juergen Hoeller ce6194c7c3 fixed typo (SPR-7321) 2010-06-28 18:18:26 +00:00
Sam Brannen 8bd0633697 [SPR-7323] SpEL 'select last' operator now works consistently with maps. 2010-06-26 21:13:02 +00:00
Sam Brannen db7531be60 [SPR-7323] SpEL 'select last' operator now works consistently with maps. 2010-06-26 21:10:20 +00:00
Costin Leau 94292cad1c SPR-6819
+ fix EBR pom as well
2010-06-25 09:32:29 +00:00
Arjen Poutsma 8d5662ec7a typo 2010-06-24 11:52:44 +00:00
Arjen Poutsma c059f53823 SPR-7305 - o.s.http.client.SimpleClientHttpRequestFactory does not allow to specify a java.net.Proxy 2010-06-24 11:42:28 +00:00
Arjen Poutsma 3160ddf0e8 SPR-7314 - RestTemplate does not handle null uri template parameters 2010-06-24 09:33:06 +00:00
Arjen Poutsma ccdd1a9efd SPR-7316 - remove "Accept-Charset" header from response, generated by @ResponseBody 2010-06-24 09:15:50 +00:00
Juergen Hoeller d956da2fa1 ConversionService etc 2010-06-23 21:55:30 +00:00
Juergen Hoeller 9e4140e549 growCollection fails for element type Object as well; prefer use of getElementTypeDescriptor() 2010-06-23 21:00:28 +00:00
Juergen Hoeller 942c656970 removed eager skipping of empty collection conversion, for UtilNamespaceHandlerTests to pass again 2010-06-23 20:05:00 +00:00
Juergen Hoeller 7faf4a6713 AbstractJaxWsServiceExporter supports "bindingType" bean property, overriding @BindingType; AbstractJaxWsServiceExporter supports "webServiceFeatures" bean property on JAX-WS 2.2 2010-06-23 19:55:47 +00:00
Juergen Hoeller 41d6f8e9ed turned formatter implementations non-final 2010-06-23 19:34:29 +00:00
Juergen Hoeller 0d7ce3eac5 refined ignoreUnresolvablePlaceholders javadoc 2010-06-23 19:33:03 +00:00
Juergen Hoeller e6b708376d skip collection conversion early if empty 2010-06-23 19:32:29 +00:00
Juergen Hoeller 8f8fc97b79 fixed test failures with respect to null handling and PropertyTypeDescriptor usage for collection elements 2010-06-23 19:31:51 +00:00
Juergen Hoeller 27b04036a9 ConversionService is able to deal with empty collections and nested collections (fixed regression; SPR-7289, SPR-7293); ConversionService properly handles nested Resource arrays in Map values (fixed regression; SPR-7295); ConversionService does not accidentally use copy constructor for same type (SPR-7304) 2010-06-23 17:29:34 +00:00
Juergen Hoeller 7f91153bba BeanWrapper/DataBinder's "autoGrowNestedPaths" works for Maps as well (SPR-7285) 2010-06-23 17:27:37 +00:00
Juergen Hoeller 5d6937bab1 Portlet @MVC's implicit render model will be updated at the end of the event phase 2010-06-23 17:24:28 +00:00
Juergen Hoeller ef3b70d40a Spring's MessageEndpointFactory classes are now JCA 1.6 compliant as well 2010-06-23 17:23:11 +00:00
Keith Donald ab13e9b5ec mvc resources handler initial commit 2010-06-22 21:36:45 +00:00
Keith Donald 5a1bd20864 mvc resources handler initial commit 2010-06-22 21:26:03 +00:00
Oliver Gierke e11a40f809 SPR-7311 - Clarify usage of PropertyEditorRegistrars VS. plain configuration of customEditors property in CustomEditorConfigurer JavaDoc. 2010-06-22 12:41:59 +00:00
Oliver Gierke 868d3a4451 Fixed language attribute in code sample to activate currently missing syntax highlighting. 2010-06-22 12:41:55 +00:00
Andy Clement 569cb91573 javadoc fix 2010-06-21 22:13:49 +00:00
Sam Brannen 32167790b0 Fixed "of the Spring" text and reformatted. 2010-06-21 20:37:08 +00:00
Juergen Hoeller 20ea69e06b prepared for 3.0.4 release 2010-06-20 19:38:29 +00:00
Juergen Hoeller b2204ec94e @CookieValue returns decoded cookie value in a Servlet environment (SPR-7286) 2010-06-20 19:21:00 +00:00
Juergen Hoeller de06de11fe fixed order 2010-06-20 19:11:51 +00:00
Juergen Hoeller 07e9f1775b added test for invalid binding to ClassLoader 2010-06-20 19:11:36 +00:00
Juergen Hoeller d49c067770 DispatcherServlet applies view name translation to error views as well (SPR-7298) 2010-06-20 19:06:56 +00:00
Juergen Hoeller 89fadb987c mvc:annotation-driven reliably detects JSR-303 and JAXB2 in an OSGi environment as well (SPR-7291) 2010-06-20 18:55:21 +00:00
Juergen Hoeller 037c277351 @MVC handler methods reliably resolve MultipartRequest arguments with HiddenHttpMethodFilter (SPR-7296) 2010-06-20 18:45:42 +00:00
Juergen Hoeller 5e5a8a09cf Jaxb2Marshaller's "marshallerProperties" Map accepts any value type (SPR-7292) 2010-06-20 18:28:07 +00:00
Juergen Hoeller 91560774a0 accept any EHCache 2.x version as well (SPR-7302) 2010-06-20 18:19:51 +00:00
Arjen Poutsma b31c34ed7d Upgrading version to 3.0.4 2010-06-15 14:18:29 +00:00
Juergen Hoeller 7b189d1124 avoid ConverterNotFoundException if source object is assignable to target type 2010-06-15 09:35:39 +00:00
Costin Leau bd88bbab4a SPR-6819
changed JPA dependency to provided
2010-06-15 06:33:20 +00:00
Oliver Gierke 420f8237c0 Rollback accidental commit :/. 2010-06-15 05:33:39 +00:00
Oliver Gierke 897aab9f59 Added missing imports.
Added additional annotation to test interface to make sure no ClassCastException appears.
2010-06-15 05:29:48 +00:00
Oliver Gierke a383633630 Added helper methods to access method parameter annotations. 2010-06-15 05:29:45 +00:00
Juergen Hoeller 4a0c2f8879 final touches for 3.0.3 2010-06-14 23:27:15 +00:00
Juergen Hoeller 0e59fc4a15 smarter guessing of the element type (SPR-7283) 2010-06-14 23:26:44 +00:00
Juergen Hoeller 96b1dc9db4 ConversionService fully supports conversion from String to MediaType now (through 'valueOf'; SPR-7282); revised exception handling in ObjectToObjectConverter, avoiding InvocationTargetExceptions 2010-06-14 23:23:49 +00:00
Juergen Hoeller 902938e95f smarter guessing of the element type (SPR-7283) 2010-06-14 22:58:18 +00:00
Juergen Hoeller 379bc5a8a6 properly support void.class in TypeDescriptor and GenericConversionService (SPR-7281) 2010-06-11 21:40:56 +00:00
Juergen Hoeller cbb90236dc polished VFS support (SPR-7197) 2010-06-11 19:54:58 +00:00
Juergen Hoeller 53ed9b282b added warnings regarding accidental usage of @Configurable on a managed bean (SPR-7216) 2010-06-11 13:48:52 +00:00
Juergen Hoeller 3d3f8f3219 added explicit section on autodetecting aspects through component scanning (SPR-7246) 2010-06-11 13:28:14 +00:00
Juergen Hoeller 28a765f32b fixed JExcel example code (SPR-7277) 2010-06-11 10:49:41 +00:00
Juergen Hoeller 65655b949f set Tiles 2.2 ELAttributeEvaluator on RendererFactory as well (SPR-7251) 2010-06-10 22:13:31 +00:00
Juergen Hoeller c8984d2e30 Portlet MVC, etc 2010-06-10 21:49:02 +00:00
Juergen Hoeller 11330baf77 DefaultListableBeanFactory checks for alias circle on registerAlias (avoiding endless loop; SPR-7274) 2010-06-10 21:45:47 +00:00
Juergen Hoeller 433b4eff8f MailSendException includes all messages as failed messages in case of a connect failure (SPR-7245) 2010-06-10 21:06:13 +00:00
Juergen Hoeller 2f4453a99c revised Portlet SessionStatus.setComplete() to avoid re-exposure of attributes in render phase (SPR-6126); shortened implicit model render parameter name to "implicitModel" (SPR-7149) 2010-06-09 20:09:53 +00:00
Arjen Poutsma 65885d1dfd SPR-7263 - TypeMismatchException instead of IllegalArgumentException: argument type mismatch for wrong RequestBody 2010-06-09 10:37:17 +00:00
Arjen Poutsma 723f94fd0e SPR-7263 - TypeMismatchException instead of IllegalArgumentException: argument type mismatch for wrong RequestBody 2010-06-09 10:35:41 +00:00
Juergen Hoeller 2a140addfd added EmbeddedValueResolver support to FormattingConversionServiceFactoryBean (SPR-7087) 2010-06-08 20:40:54 +00:00
Juergen Hoeller eb3a3a6de2 reuse a shared UrlPathHelper instance in order to avoid reinstantiation overhead (SPR-7269) 2010-06-08 14:14:08 +00:00
Juergen Hoeller e12fbd3e2b avoid EntityManager close() exception through isOpen() check (SPR-7215) 2010-06-08 11:06:02 +00:00
Juergen Hoeller 928f5423af avoid EntityManager close() exception through isOpen() check (SPR-7215) 2010-06-08 10:21:05 +00:00
Juergen Hoeller 65622bd546 revised DefaultLifecycleProcessor's handling of circular dependencies to avoid stack overflow (SPR-7266) 2010-06-08 10:08:33 +00:00
Juergen Hoeller 882289b06e getAllInterfacesForClass introspects parent interfaces as well (SPR-7247) 2010-06-08 00:05:31 +00:00
Juergen Hoeller 12cffc68c8 added XmlAwareFormHttpMessageConverter, taking over the 3.0.2-introduced XML multipart support (avoiding a package cycle) 2010-06-07 23:18:34 +00:00
Juergen Hoeller c58f46f056 preparations for 3.0.3 release 2010-06-07 23:01:16 +00:00
Juergen Hoeller 632c0e7c5e added XmlAwareFormHttpMessageConverter, taking over the 3.0.2-introduced XML multipart support (avoiding a package cycle) 2010-06-07 22:59:48 +00:00
Juergen Hoeller 392accd910 introduced EmbeddedValueResolverAware callback interface for convenient placeholder resolution 2010-06-07 22:41:21 +00:00
Juergen Hoeller 8446fd1b26 added assertions for correct postProcess invocation order 2010-06-07 22:36:19 +00:00
Juergen Hoeller 5f9b2db90b turn NotReadablePropertyException into JSR-303 oriented IllegalStateException 2010-06-07 22:30:11 +00:00
Juergen Hoeller 4cef52a86f polishing 2010-06-07 22:21:22 +00:00
Juergen Hoeller de866a0ff6 registerDependentBean resolves to the canonical bean name in order to handle alias references (SPR-7254) 2010-06-07 22:15:20 +00:00
Juergen Hoeller d684e49462 added "expose-proxy" attribute to aop namespace (enforcing AopContext proxy exposure with CGLIB; SPR-7261) 2010-06-07 21:28:05 +00:00
Juergen Hoeller fe1e7f0d6c added "expose-proxy" attribute to aop namespace (enforcing AopContext proxy exposure with CGLIB; SPR-7261) 2010-06-07 21:19:32 +00:00
Oliver Gierke 857faec1f3 SPR-7103 - Added more detailed documentation on ordering of model attribute and BindingResult. 2010-06-07 20:57:55 +00:00
Juergen Hoeller 5b420e20c7 revised TaskScheduler javadoc (SPR-7253) 2010-06-07 20:52:12 +00:00
Juergen Hoeller 78c906caaa JSP HiddenInputTag allows for using common HTML attributes (SPR-7249) 2010-06-07 20:32:52 +00:00
Juergen Hoeller 2ef3a86c4f polishing 2010-06-07 19:23:08 +00:00
Juergen Hoeller 53cdb9dfeb fixed JSP ErrorsTag to avoid invalid "*.errors" id, using form object name as id prefix instead (SPR-7258) 2010-06-07 19:22:53 +00:00
Juergen Hoeller cc238207f9 fixed registerResolvableDependency mechanism to correctly handle non-serializable factory objects (SPR-7264) 2010-06-07 18:08:44 +00:00
Juergen Hoeller 5330dc48aa fixed typo (SPR-7265) 2010-06-07 17:31:37 +00:00
Arjen Poutsma 4764fa53f0 SPR-7259 - ResponseStatus.reason() ignored for @ExceptionHandler methods 2010-06-07 13:33:43 +00:00
Arjen Poutsma f72c431e8a SPR-7257 - AbstractMarshaller incorrectly expects DOMResult to already have a node 2010-06-07 13:15:07 +00:00
Chris Beams 0dc29cb2d3 Added a test to prove that @Qualifier works in conjunction with @Bean methods after some confusion by users that it may not. 2010-06-02 12:58:59 +00:00
Andy Clement 5801af9ef5 SPR-7244: double indexing with a collection of different types of element 2010-05-28 20:31:16 +00:00
Arjen Poutsma d0393ea109 SPR-7233 - ResponseEntity having body, headers and HttpStatus mixed up in responseEntity.getBody() 2010-05-28 08:07:21 +00:00
Juergen Hoeller 75c5405d6f added test for getType against an abstract FactoryBean 2010-05-27 13:45:44 +00:00
Juergen Hoeller 3a5af35d37 CachedIntrospectionResults only caches GenericTypeAwarePropertyDescriptors if fully safe (SPR-7227) 2010-05-27 13:45:21 +00:00
Juergen Hoeller dea5918d66 CronTrigger defensively protects itself against accidental re-fires if a task runs too early (SPR-7004) 2010-05-26 20:35:42 +00:00
Juergen Hoeller 2136b04b65 added limit for parsed SQL cache to NamedParameterJdbcTemplate (SPR-7237); added configurable cache limit to CachingMetadataReaderFactory 2010-05-26 19:35:06 +00:00
David Syer b4af04ba9d SPR-7239: fix CronTrigger 2010-05-26 17:41:54 +00:00
Juergen Hoeller f0777d130f improved toString() 2010-05-26 13:59:20 +00:00
Juergen Hoeller 1532119787 ConversionService is able to apply Converters to interface-based array elements (SPR-7150); a context ConversionService is able to override an ApplicationContext's resource editors (SPR-7079) 2010-05-26 13:58:37 +00:00
Juergen Hoeller 6c6004a93b @Transactional qualifier value matches against @Qualifier annotations on @Bean methods as well (SPR-7232) 2010-05-26 09:46:03 +00:00
Juergen Hoeller b90fa49ebc polishing 2010-05-25 14:23:08 +00:00
Juergen Hoeller bca067abb2 ScheduledTaskRegistrar (as used for @Scheduled processing) properly shuts down its default executor (SPR-6901) 2010-05-25 14:22:49 +00:00
Juergen Hoeller 0c6b38b0b5 DataSourceUtils lets timeout exceptions through even for setReadOnly calls (revised; SPR-7226) 2010-05-25 14:10:28 +00:00
Juergen Hoeller 8800bab8a6 DataSourceUtils lets timeout exceptions through even for setReadOnly calls (revised; SPR-7226) 2010-05-25 13:57:56 +00:00
Juergen Hoeller ed3cb4217d expect user name to be null (SPR-7228) 2010-05-21 15:59:00 +00:00
Juergen Hoeller 66aca1e8b3 expect user name to be null (SPR-7228) 2010-05-21 15:44:10 +00:00
Juergen Hoeller d7f72fbbd4 DataSourceUtils lets timeout exceptions through even for setReadOnly calls (SPR-7226) 2010-05-20 20:58:02 +00:00
Juergen Hoeller 2676771255 parse default elements if they live in the default namespace or if their parent is from another namespace (SPR-7218) 2010-05-20 19:18:34 +00:00
Juergen Hoeller 3cf303cabd prepared for 3.0.3 release 2010-05-20 17:18:40 +00:00
Juergen Hoeller a6d9c90841 refined BeanDefinitionParserDelegate to only parse default elements if they actually live in the default namespace (SPR-7218) 2010-05-20 17:15:56 +00:00
Juergen Hoeller 0390c2b9fe added convenient "checkRefresh" bean property to TilesConfigurer (SPR-7225) 2010-05-20 16:49:53 +00:00
Juergen Hoeller f9736ec3f6 JodaTime 1.3 or higher required (SPR-7222) 2010-05-20 09:12:39 +00:00
Juergen Hoeller 6fe5871e91 check for "org.joda.time.LocalDate" in order to catch JodaTime 1.3 and higher only (SPR-7222) 2010-05-20 08:30:32 +00:00
Juergen Hoeller ecf2d8c5de fixed typos (SPR-7221) 2010-05-20 08:16:49 +00:00
Juergen Hoeller 469e30b507 refined LifecycleProcessor exception handling, properly wrapping a start exception from a bean (SPR-7106) 2010-05-19 19:44:57 +00:00
Oliver Gierke 8a3c56b6d5 Added myself and as author.
Added Dave and me in the copyright holder section, too.
2010-05-19 05:52:51 +00:00
Oliver Gierke 680bfbe718 SPR-7186 Added section on generic advice parameters 2010-05-19 05:52:47 +00:00
Oliver Gierke d600e35157 Fixed year in copyright. 2010-05-19 05:52:44 +00:00
Andy Clement 101d8381ef SPR-7209: parsing poorly formed Elvis expressions 2010-05-18 18:44:40 +00:00
Arjen Poutsma ae56f3a361 SPR-7211 - Extend HttpMessage interface to expose requestURL 2010-05-18 11:12:54 +00:00
Juergen Hoeller de326e5e95 ClassUtils recognizes "void" as primitive type name as well (SPR-7212) 2010-05-18 08:49:09 +00:00
Juergen Hoeller 2c2df7f555 consistent postProcessBeanFactory treatment for BeanDefinitionRegistryPostProcessors (SPR-7167) 2010-05-17 22:40:15 +00:00
Juergen Hoeller 2ad2022058 revised BeanWrapper's exception wrapping to consistently handle ConversionExceptions (SPR-7177) 2010-05-17 21:59:02 +00:00
Chris Beams 57a503b274 BeanDefinitionRegistryPostProcessors' postProcessBeanDefinitionRegistry() method now gets called before postProcessBeanFactory() (SPR-7167) 2010-05-17 16:21:36 +00:00
Arjen Poutsma 0b8140b50d Added DeprecatedBeanWarner 2010-05-17 14:31:48 +00:00
Juergen Hoeller a8ed98255f ServletContextResourcePatternResolver handles "/WEB-INF/lib/*.jar!/**/context.xml" style patterns (SPR-7198) 2010-05-17 12:41:32 +00:00
Juergen Hoeller 738d84f75c filter for duplicate listeners in "getApplicationListeners()" as well (SPR-7204) 2010-05-16 19:08:12 +00:00
Juergen Hoeller 7f24edc3d5 removed ServerSessionMessageListenerContainer coverage 2010-05-16 17:46:28 +00:00
Juergen Hoeller ff4f749adb fixed typos 2010-05-16 17:32:01 +00:00
Costin Leau 578e80c1cf SPR-7197
+ fix template
2010-05-15 09:22:56 +00:00
Costin Leau d9a664a588 SPR-7197
polish :)
2010-05-14 19:34:36 +00:00
Costin Leau e9ecf5d716 SPR-7197
+ removed compile time dependency on JBoss VFS
+ added support for JBoss AS 6.0 / JBoss VFS 3.0.0 infrastructure
2010-05-14 19:29:44 +00:00
Luke Taylor 27be8434f1 Rolled-back accidental .classpath changes 2010-05-14 16:23:48 +00:00
Luke Taylor 3f885d0302 Added DomUtils.getChildElements() method. Also refactored ConfigBeanDefinitionParser.parse() to use it. 2010-05-14 16:07:39 +00:00
Luke Taylor 9f9a27a1d8 SPR-7158: Added missing space in MVC docbook file 2010-05-14 14:04:56 +00:00
Thomas Risberg d22a6f9da9 fixed index test for parameter types (SPR-7199) 2010-05-14 12:52:59 +00:00
Juergen Hoeller 8ccd74b6c8 JSP Radiobutton/CheckboxesTag utilizes PropertyEditor/ConversionService for label rendering (SPR-7174) 2010-05-13 23:07:11 +00:00
Juergen Hoeller ceb668ac6c added getLastTaskInfo() method to StopWatch (SPR-7134) 2010-05-13 22:43:18 +00:00
Juergen Hoeller 68055ba4c9 AsyncAnnotationBeanPostProcessor consistently adds @Async processing as first Advisor in the chain (SPR-7147) 2010-05-13 22:13:29 +00:00
Juergen Hoeller ad5c7aeb31 added "idleConsumerLimit" bean property to DefaultMessageListenerContainer (SPR-7189) 2010-05-13 16:33:55 +00:00
Juergen Hoeller 59d2d35f4a polishing 2010-05-13 14:44:34 +00:00
Juergen Hoeller 103c1aa82f exclude abstract lazy-init beans from MBean exposure as well (SPR-6784) 2010-05-13 14:38:58 +00:00
Juergen Hoeller a1e4f4f406 MVC mappings properly apply even to welcome file entries that forward to a DispatcherServlet (SPR-7143) 2010-05-12 20:15:40 +00:00
Juergen Hoeller fa7472c057 MockHttpServletResponse supports multiple includes (SPR-7188) 2010-05-12 14:07:25 +00:00
Juergen Hoeller bd1b559d47 MockHttpServletResponse supports multiple includes (SPR-7188) 2010-05-12 14:05:21 +00:00
Thomas Risberg 15df7b11d0 added null check for parameter (SPR-7193) 2010-05-12 13:26:03 +00:00
Juergen Hoeller 4955a73047 added support for JAX-WS 2.1 WebServiceFeatures to JaxWsPortClientInterceptor/PortProxyFactoryBean (SPR-5712) 2010-05-12 12:32:03 +00:00
Juergen Hoeller 11bb7264a2 properly return null from getPersistenceUnitInfo again (SPR-7055) 2010-05-12 08:46:55 +00:00
Juergen Hoeller 853eab8b4c setTransactionIsolation on JDBC Connection only called when actually necessary (for PostgreSQL; SPR-7184) 2010-05-11 13:14:53 +00:00
Juergen Hoeller 15fe75b1a1 restored original jms namespace declaration 2010-05-10 21:31:13 +00:00
Mark Pollack dad714710f some infrastructure files for custom schema 2010-05-10 18:33:31 +00:00
Juergen Hoeller 365737b515 CachingConnectionFactory detects destination equality for WebSphere MQ as well (using toString; SPR-7148) 2010-05-07 16:53:59 +00:00
Juergen Hoeller 026523d24b set shared variables with configured ObjectWrapper (SPR-7165) 2010-05-07 15:06:27 +00:00
Andy Clement 2b0655b459 SPR-6941 2010-05-06 00:26:13 +00:00
Andy Clement f53621a86f SPR-7173, SPR-7100 2010-05-05 23:52:01 +00:00
Costin Leau 42cdfbcd89 SPR-7163
SPR-7161
+ update Petclinic references
+ minor corrections
2010-05-05 13:42:46 +00:00
Costin Leau 9919cc976b SPR-7158
+ doc typos
2010-05-04 19:15:09 +00:00
Costin Leau a45d33a158 SPR-7159
+ fix several typos
2010-05-04 18:49:09 +00:00
Juergen Hoeller c0aac20081 further 3.0.3 preparations 2010-05-03 14:47:38 +00:00
Juergen Hoeller b0afa0c472 only retrieve transaction manager bean if necessary (SPR-7153) 2010-05-03 12:51:54 +00:00
Juergen Hoeller 17a1362ed8 BeanDefinitionVisitor/PropertyPlaceholderConfigurer finds and resolves values in arrays as well (SPR-7136) 2010-05-03 12:26:32 +00:00
Arjen Poutsma dd8c18188f SPR-7160 - ShallowEtagHeaderFilter not adding ETag 2010-05-03 08:58:20 +00:00
Costin Leau 159f98728e SPR-7137
+ fixed incorrect message when unregistering services from passed in registries
2010-04-29 14:42:24 +00:00
Arjen Poutsma c1f18582e7 SPR-7117 - Add ability for CNVR to search view names that use file extensions 2010-04-29 11:06:31 +00:00
Arjen Poutsma f8a05da1c9 SPR-7146 - AppEngine : bug with SimpleClientHttpResponse.getHeaders 2010-04-29 09:20:44 +00:00
Arjen Poutsma a910ce68ff SPR-7145 - NullPointerException in AnnotationMethodHandlerAdapter if HttpHeaders in ResponseEntity are empty 2010-04-29 08:04:36 +00:00
Costin Leau aa216672ae SPR-7090
+ fix doc typos
2010-04-28 11:05:08 +00:00
Costin Leau 4ddcd35d13 SPR-6819
+ made JPA dependency implicit since the aspect will always require the JPA classes during the weaving process
2010-04-28 10:41:03 +00:00
Costin Leau 02cc37cc16 + sanitize class names (eliminate trailing .class for dot notation) 2010-04-28 10:33:54 +00:00
Costin Leau 03415960ff + minor doc update regarding Tomcat setup (so the Tomcat list is rendered properly) 2010-04-28 10:29:21 +00:00
Arjen Poutsma c2707150b1 SPR-7135 - org.springframework.http.MediaType#checkParameters fails to process a Content-Type like application/xml;charset="utf-8" 2010-04-27 08:26:51 +00:00
Juergen Hoeller 8ce4037af2 TilesConfigurer's "definitionsFactoryClass" property applies common Tiles DefinitionsFactory setup (SPR-7101) 2010-04-23 10:44:29 +00:00
Juergen Hoeller 101a5cd8ff factored out getRequestDispatcher template method (SPR-7118) 2010-04-22 21:46:56 +00:00
Juergen Hoeller 8df0403e99 further fixes for 3.0.3 2010-04-22 21:39:09 +00:00
Juergen Hoeller 07920fc3df polishing 2010-04-22 21:37:35 +00:00
Juergen Hoeller 87e327773e introduced AopProxyUtils.ultimateTargetClass (SPR-7074) 2010-04-22 21:36:53 +00:00
Juergen Hoeller b28310b051 added default InputSourceEditor for SAX InputSource construction with a URL String as system id (SPR-7099) 2010-04-22 19:02:05 +00:00
Juergen Hoeller 20d3085dc8 polishing 2010-04-22 17:38:49 +00:00
Juergen Hoeller 218ee6d24c added "boolean isRegisteredWithDestination()" method (SPR-7065) 2010-04-22 17:38:37 +00:00
Chris Beams 3f06a92b6b getBean(Class<?>) now filters out bean definitions for which isAutowireCandidate() is false (SPR-7120) 2010-04-22 16:34:36 +00:00
Juergen Hoeller 5057c4a69c DefaultMessageListenerContainer reacts to maxConcurrentConsumers reduction for long-lived tasks (SPR-7075) 2010-04-22 13:27:16 +00:00
Juergen Hoeller 4cab4a7545 introspect decorated definition for getType calls as well (SPR-7006) 2010-04-21 20:06:38 +00:00
Juergen Hoeller 3dbe38e418 added check for WebSphere's compliance mode (SPR-7064) 2010-04-21 18:42:59 +00:00
Michael Isvy c5f83686d2 line 149: fixed a typo.
Tomcat or IBM WebSphere that has itss own -->  Tomcat or IBM WebSphere that has its own
2010-04-21 11:46:26 +00:00
Juergen Hoeller 77074c6c87 property placeholders can deal with nested expressions which happen to use the same suffix (SPR-7098) 2010-04-21 09:22:20 +00:00
Arjen Poutsma 1e34e2725a SPR-7107 - RestTemplate/UriTemplate/UriUtils improperly encoding UTF-8 2010-04-21 07:55:56 +00:00
Costin Leau 7790dedff2 + disable some of the WAS failing tests 2010-04-21 07:38:54 +00:00
Juergen Hoeller 399b388ea5 fixed JSP SelectTag's support for rendering enum constants (SPR-7112) 2010-04-20 16:15:23 +00:00
Costin Leau 5af6d917e9 SPR-7064
+ fix method name
2010-04-20 13:33:16 +00:00
Costin Leau ea9eb853fa SPR-7064
+ added unit tests for WAS with complaint setting
2010-04-20 13:32:02 +00:00
Costin Leau 05360c095c SPR-7064
+ unit tests containing the differences between WAS and Tomcat
2010-04-20 12:12:57 +00:00
Juergen Hoeller 1ed05eceb9 remove trailing servlet path slash on WebSphere only (SPR-7064) 2010-04-20 11:43:20 +00:00
Juergen Hoeller 69c4cdf975 remove trailing servlet path slash on WebSphere only (SPR-7064) 2010-04-20 11:15:47 +00:00
Arjen Poutsma 3f6cc3f552 Added more tests. 2010-04-20 10:03:05 +00:00
Keith Donald e21a1c5a61 polish 2010-04-19 20:35:57 +00:00
Keith Donald 86906d1b4d checking in performance tests 2010-04-19 20:22:01 +00:00
Keith Donald 6e13cc9eaa thread safety for caching 2010-04-19 19:22:35 +00:00
Arjen Poutsma b25462ddf9 SPR-7107 - RestTemplate/UriTemplate/UriUtils improperly encoding UTF-8 2010-04-19 08:28:10 +00:00
Keith Donald e60389283d caching optmizations and performance tests 2010-04-19 03:58:28 +00:00
Keith Donald 066b4d542b polish 2010-04-19 01:47:34 +00:00
Keith Donald 594596f361 cache invalidation 2010-04-19 01:45:27 +00:00
Keith Donald bf03d0d56f converter caching 2010-04-18 21:43:00 +00:00
Juergen Hoeller 33252495cf fixed @ExceptionHandler resolution in case of multiple matches at different inheritance levels (SPR-7085) 2010-04-18 18:48:24 +00:00
Keith Donald a71514222a preserving desc context for collection/map elements 2010-04-18 14:09:41 +00:00
Keith Donald 8464ac90c7 promoted char sequence first 2010-04-17 20:22:30 +00:00
Keith Donald ebbf63f4e0 polish 2010-04-17 06:47:08 +00:00
Keith Donald e6018afe8b restored resource conversion test 2010-04-17 06:31:34 +00:00
Keith Donald b9aeba23ef fixed failing test 2010-04-17 06:28:06 +00:00
Keith Donald d98da7d240 fixed failing test 2010-04-17 04:50:01 +00:00
Keith Donald e7c99b2b62 no longer used 2010-04-17 04:43:54 +00:00
Keith Donald 64d6a42dfd improved conversion system logging, collection converter simplification/polish, several optimizations, annotation-driven formatting caching 2010-04-17 04:43:28 +00:00
Andy Clement bf1a95c771 SPR-7100: '_' supported as first char of identifier 2010-04-16 21:10:23 +00:00
Juergen Hoeller f6b56a591c PropertyTypeDescriptor detects underlying field with same lenient naming rules as CachedIntrospectionResults (SPR-7102) 2010-04-16 15:39:23 +00:00
Juergen Hoeller 2a19148eed changed "javax.persistence.criteria" import to an explicit Import-Package declaration (SPR-6636) 2010-04-15 22:16:17 +00:00
Juergen Hoeller 7048f32666 fixed canRead breakage 2010-04-15 16:13:50 +00:00
Juergen Hoeller b3b5b356d2 polishing 2010-04-15 14:57:08 +00:00
Juergen Hoeller 7355dff967 EvalTag skips implicit variable check if VariableResolver is null (for Jetty compatibility; SPR-7096) 2010-04-15 14:56:37 +00:00
David Syer eb7f8309e2 Update version in POMs to 3.0.3 2010-04-15 10:26:14 +00:00
Juergen Hoeller 67ba18f956 polishing 2010-04-14 12:18:05 +00:00
Juergen Hoeller 12ce250c6c fixed constructor argument caching for prototypes with multiple constructor matches (SPR-7084) 2010-04-14 12:11:56 +00:00
Arjen Poutsma e6b0a1d4d7 SPR-7081 - Add ignoreJafMediaTypes to ContentNegotiatingViewResolver 2010-04-13 08:37:59 +00:00
Juergen Hoeller 385298b808 JSP FormTag calculates proper default form action even when using a rewrite filter on WebSphere (SPR-7067) 2010-04-12 14:59:27 +00:00
Juergen Hoeller 03120b70d0 fixed URI construction to consider fragment as well (SPR-7083) 2010-04-09 15:26:43 +00:00
Juergen Hoeller 4d2a398cbc call setAccessible for public final field too (SPR-7078) 2010-04-08 12:15:18 +00:00
Costin Leau 353781021d SPR-6819
+ changed jpa dependency scope from optional to provided
2010-04-08 07:04:40 +00:00
Costin Leau 688dd1a018 SPR-7071
+ fix some Eclipse classpath entries
2010-04-08 06:39:41 +00:00
Juergen Hoeller d34d8764b0 fixed getOriginatingQueryString javadoc (SPR-7072) 2010-04-07 13:51:46 +00:00
Arjen Poutsma 28da6e0d98 SPR-7070 - MappingJacksonJsonView.renderedAttributes to be made visible to subclasses 2010-04-07 08:30:04 +00:00
Juergen Hoeller 4ee6735376 DefaultPersistenceUnitManager's getPersistenceUnitInfo method has 2.5 compatible signature again (SPR-7055) 2010-04-06 15:38:40 +00:00
Juergen Hoeller ff6abbd369 prepared for 3.0.3 release 2010-04-06 12:00:45 +00:00
Juergen Hoeller ecda2aee4a revised AspectJAnnotation for consistent use of final fields (SPR-7068) 2010-04-06 11:54:50 +00:00
Juergen Hoeller e2a9bc9c66 specific detection of CGLIB subclasses in order to properly handle CGLIB interfaces (SPR-7066) 2010-04-06 11:52:42 +00:00
Arjen Poutsma b5b60cafb7 SPR-7063 - MappingJacksonHttpMessageConverter breaks with Jackson 1.0.x 2010-04-06 11:39:50 +00:00
Arjen Poutsma 270fab4fd0 Updated to version 3.0.3 2010-04-02 13:12:58 +00:00
Arjen Poutsma f7f0d18e41 Removed empty mock package 2010-04-02 10:33:46 +00:00
Juergen Hoeller 386b7507c6 final preparations for 3.0.2 2010-04-02 08:54:00 +00:00
Arjen Poutsma 8a1a23af83 SPR-7060 - @ResponseStatus: The reason value is not used. 2010-04-02 08:39:26 +00:00
Chris Beams 580dc8e72a typed map and collection conversion routines now eagerly reject non-assignable required types and avoid spurious InvocationException stack traces in debug log (SPR-7058) 2010-04-02 08:00:48 +00:00
Ramnivas Laddad 66d2c6698b Improved fix for SPR-6850 by dealing with bounds separately from normal types 2010-04-01 23:37:08 +00:00
Juergen Hoeller 7f90e3bcf7 enable JPATraversableResolver to introspect test domain classes 2010-04-01 11:45:01 +00:00
Juergen Hoeller bc1abe6070 prepared for 3.0.2 release 2010-04-01 11:38:14 +00:00
Juergen Hoeller 6aa0e62597 compatibility with Hibernate 3.5 final 2010-04-01 11:37:35 +00:00
Juergen Hoeller 52179d8bfb fixed TemplateParserContext documentation (SPR-7059) 2010-04-01 10:59:58 +00:00
Juergen Hoeller ee686188b7 OSGi version range accepts JasperReports 3.x as well; fixed missing Spring version placeholder in context-support bundle 2010-04-01 10:57:15 +00:00
Juergen Hoeller 4a98fcb3f7 fixed ambiguous reference to Entry type 2010-04-01 10:36:57 +00:00
Juergen Hoeller 29ab58c4d8 ResourcePatternUtils provides plain PathMatchingResourcePatternResolver in case of a null ResourceLoader 2010-04-01 10:35:49 +00:00
Juergen Hoeller f6d05eaad4 reintroduced two-arg constructor (making STS warning disappear); always use a ResourcePatternResolver (through ResourcePatternUtils) 2010-04-01 10:31:15 +00:00
Arjen Poutsma 5105793228 javadoc 2010-04-01 10:14:20 +00:00
Arjen Poutsma 689e7b7af2 Introduced ResponseEntity, for access to the response status code 2010-04-01 10:08:51 +00:00
Juergen Hoeller 636e2f0f4c final preparations for 3.0.2 2010-03-31 15:38:11 +00:00
Juergen Hoeller 461b488eee polishing 2010-03-31 15:36:35 +00:00
Juergen Hoeller 6b93f41f3a AbstractInterceptorDrivenBeanDefinitionDecorator preserves lazy-init flag as well 2010-03-31 15:25:35 +00:00
Juergen Hoeller 092241a632 fixed decorated BeanDefinition condition for early type checking in AbstractBeanFactory (SPR-7006) 2010-03-31 15:21:48 +00:00
Juergen Hoeller 20f4e9023b UrlPathHelper cuts off trailing servlet-path slashes for root mappings (on WebSphere; SPR-7052) 2010-03-31 14:02:27 +00:00
Juergen Hoeller c24bafd644 polishing 2010-03-31 13:38:15 +00:00
Juergen Hoeller 21b4526063 accept UrlMap with any value type 2010-03-31 13:37:46 +00:00
Juergen Hoeller b2ff0b1df0 refined internal HandlerMapping/HandlerAdapter bean names 2010-03-31 13:37:11 +00:00
Juergen Hoeller 87d0da2d4c final preparations for 3.0.2 2010-03-30 23:37:29 +00:00
Juergen Hoeller ad78b5cdb5 polishing 2010-03-30 23:35:13 +00:00
Juergen Hoeller de84703c02 @ExceptionHandler methods consistently receive original exception as thrown by user methods 2010-03-30 23:28:21 +00:00
Juergen Hoeller b67b5ec408 clarified applicability of @ExceptionHandler in Portlet environments (SPR-6959) 2010-03-30 21:27:40 +00:00
Juergen Hoeller 65e88449aa DispatcherPortlet passes handler instance into HandlerExceptionResolver for action exception; DispatcherPortlet applies preHandleRender callbacks in case of action exception as well (SPR-6959) 2010-03-30 21:17:31 +00:00
Juergen Hoeller 20de98362a use simple type name in "missing parameter" exception text 2010-03-30 21:13:12 +00:00
Juergen Hoeller ea7ff5241d polishing 2010-03-30 21:12:40 +00:00
Juergen Hoeller ae877e92c7 improved getBean(Class) javadoc 2010-03-30 15:53:32 +00:00
Juergen Hoeller 16305530f2 adapted to common naming convention for internal attributes 2010-03-30 15:44:11 +00:00
Juergen Hoeller 282de41f06 AbstractInterceptorDrivenBeanDefinitionDecorator exposes decorated BeanDefinition for early type checking in AbstractBeanFactory (SPR-7006) 2010-03-30 15:40:47 +00:00
Juergen Hoeller 16eb915c95 ObjectFactoryCreatingFactoryBean creates a serializable ObjectFactory reference; added ProviderCreatingFactoryBean, exposing a serializable JSR-330 Provider reference (SPR-6998) 2010-03-30 14:45:43 +00:00
Juergen Hoeller 0eabef0720 added filter ordering comments (SPR-6594) 2010-03-30 10:46:51 +00:00
Juergen Hoeller 2c9753ad25 NativeWebRequest detects native MultipartRequest even when decorated (SPR-6594) 2010-03-30 10:24:39 +00:00
Juergen Hoeller 81e81ce77c WebRequestInterceptor exposes HttpServletResponse through NativeWebRequest (after downcast) 2010-03-30 09:21:09 +00:00
Arjen Poutsma 9cecaa769e SPR-7047 - XML MarshallingView assumes non-null value for object to be marshalled. 2010-03-30 08:34:29 +00:00
Juergen Hoeller 8c8eca7e05 refined use of generics 2010-03-29 23:08:32 +00:00
Juergen Hoeller fba8bcc7dc compatibility with JasperReports 3.x in terms of resource management (SPR-7048) 2010-03-29 23:07:53 +00:00
Juergen Hoeller fa719ad4c5 restored compatibility with Servlet 2.4 containers on all VMs (SPR-7044) 2010-03-29 13:17:49 +00:00
Arjen Poutsma 63dc53a5ea SPR-6861 - enable overwriting of createHttpInputMessage and createHttpOutputMessage in AnnotationMethodHandlerAdapter 2010-03-29 12:25:49 +00:00
Arjen Poutsma bc7679f9fc Documented HttpEntity 2010-03-29 12:02:22 +00:00
Arjen Poutsma a6d5d7c8e2 javadoc 2010-03-29 11:21:55 +00:00
Arjen Poutsma 122e4346bb Documented HttpEntity 2010-03-29 11:12:45 +00:00
Arjen Poutsma c18137d40a SPR-6728 - Document Spring MVC exception -> HTTP status code mappings 2010-03-29 10:28:05 +00:00
Sam Brannen a827ab88b1 [SPR-6523] Commented all paragraphs (i.e., for list, map, and set) related to collection merging with the util namespace until this issue has been addressed. 2010-03-27 19:10:54 +00:00
Chris Beams 351e72b6e2 incorrectly invoked factory methods now result in exceptions with more descriptive messages (SPR-5475) 2010-03-26 12:05:36 +00:00
Juergen Hoeller cbed1c1b4b fixed collection element conversion using ConversionService (SPR-6950) 2010-03-25 15:02:19 +00:00
Arjen Poutsma 124837e2c3 Added @Override annotations. 2010-03-25 13:02:19 +00:00
Arjen Poutsma 753a54096f SPR-7000 - AnnotationMethodHandlerAdapter gives priority to media type order over quality when selecting a method 2010-03-25 12:29:52 +00:00
Juergen Hoeller d50881d82b fixed collection element conversion using ConversionService (SPR-6950) 2010-03-25 11:53:41 +00:00
Arjen Poutsma f836601e0f SPR-7034 - XmlBeans UnMarshalling - does not work with RequestBody annotation 2010-03-25 11:52:32 +00:00
Chris Beams fbda55f141 corrected TypeUtils.isAssignable() failure to return true in certain valid wildcard bounding scenarios (SPR-6850) 2010-03-25 10:33:25 +00:00
Juergen Hoeller 10c358718e avoid NPE if runtimeTest is null (SPR-7032) 2010-03-25 10:22:16 +00:00
Arjen Poutsma 6f2062fb3a SPR-7031 - MappingJacksonJsonView should add headers for no-caching 2010-03-25 10:14:11 +00:00
Juergen Hoeller f42d4241b4 preparations for 3.0.2 2010-03-25 00:00:27 +00:00
Juergen Hoeller 3576bc4585 preparations for 3.0.2 2010-03-24 23:53:02 +00:00
Thomas Risberg 47389a0edd added com.springsource.javax.servlet.jsp dependency to fix problem with test (SPR-7033) 2010-03-24 23:24:16 +00:00
Juergen Hoeller ab139dffd0 added javadoc references to semantic definition of transaction attributes (SPR-7029) 2010-03-24 23:22:52 +00:00
Thomas Risberg a5f3d00977 added conf attribute for the struts dependency (SPR-7033) 2010-03-24 22:39:47 +00:00
Juergen Hoeller 53b6e1c1b0 fixed DataBinder's conversion error handling for direct field access with ConversionService (SPR-6953) 2010-03-24 17:40:45 +00:00
Juergen Hoeller 65b0a8fcb2 revised BeanTypeDescriptor into core PropertyTypeDescriptor; consider method annotations for return type (SPR-6979) 2010-03-24 16:27:33 +00:00
Juergen Hoeller 461c200ce6 restricted onApplicationEvent callbacks for local ApplicationContext only (SPR-6964) 2010-03-24 14:38:10 +00:00
Juergen Hoeller a614430899 allow for null keys and null values in rendered Map (SPR-7024) 2010-03-24 14:26:00 +00:00
Juergen Hoeller bc2440ea16 updated for JDK 1.5+ 2010-03-24 13:58:45 +00:00
Juergen Hoeller 6fb49f1de7 ignore failing serialization test for the time being 2010-03-24 10:52:20 +00:00
Chris Beams 6118d67321 updated JavaDoc regarding short-circuiting the BeanPostProcessor chain when returning null from BPP methods (SPR-6926) 2010-03-24 10:52:10 +00:00
Juergen Hoeller cbca6e1acb prevent findEditorByConvention AccessControlException on Google App Engine (SEC-1434) 2010-03-24 10:39:40 +00:00
Juergen Hoeller 2c2cf32b8a polishing 2010-03-24 10:35:50 +00:00
Juergen Hoeller 89755542da BeanPostProcessors are allowed to return a null bean value in the middle of the chain (SPR-6926) 2010-03-24 10:34:21 +00:00
Chris Beams 051b5f4f4f removed duplicate junit and aspectjweaver dependencies 2010-03-24 10:09:58 +00:00
Juergen Hoeller b370969690 added public "validateDatabaseSchema" method to Hibernate LocalSessionFactoryBean (SPR-3212) 2010-03-24 09:36:01 +00:00
Chris Beams a1f6eabbce SPR-7002: updated .classpath and pom to reflect new dependency upgrade from Jackson 1.0.0->1.4.2 2010-03-24 09:27:54 +00:00
Chris Beams 247c46e6ea SPR-7002: updated .classpath and pom to reflect new dependency upgrade from Jackson 1.0.0->1.4.2 2010-03-24 09:03:39 +00:00
Juergen Hoeller 915ca47cad updated to Jackson 1.4.2 2010-03-24 09:01:55 +00:00
Mark Fisher 0d8a020684 updated commons-pool version in .classpath to match ivy config 2010-03-23 21:44:52 +00:00
Mark Pollack 1e388a894e Change version of Hibernate Validator to 4.0.2 in pom.xml and eclipse .classpath to agree with version in ivy.xml 2010-03-23 16:44:46 +00:00
Juergen Hoeller 4e7752c9ba JCA listener containers delegate to wrapped Transaction handle (for Geronimo compatibility; SPR-6991) 2010-03-23 16:27:34 +00:00
Chris Beams c13e5f9f5b SPR-7009, SPR-6972: backed out unintentionally committed tests 2010-03-23 15:29:35 +00:00
Chris Beams 706a09c49e SPR-7009: TransactionInterceptor now extracts ultimate target class before evaluating @Transactional metadata to accommodate double-proxying cases 2010-03-23 12:06:30 +00:00
Chris Beams c38c09bc35 SPR-6972: removed import 2010-03-23 12:06:24 +00:00
Chris Beams 77bb68b967 SPR-6972: failed attempt to reproduce issue 2010-03-23 12:06:16 +00:00
Arjen Poutsma 212daa1995 SPR-7002 - RestTemplate fails to convert properly for Generic Type Container with MappingJacksonHttpMessageConverter 2010-03-23 11:15:13 +00:00
Arjen Poutsma f7ac7a395c SPR-6021 - Allow for using MultiValueMap in GET request for mapping multiple request params 2010-03-23 09:50:47 +00:00
Arjen Poutsma 465e84eda4 Revert: SPR-6021 - Allow for using MultiValueMap in GET request for mapping multiple request params 2010-03-23 08:52:59 +00:00
Chris Beams ec577f8e24 SPR-6538: context-support is no longer marked as an optional dependency within aspects and webmvc POMs 2010-03-23 08:15:57 +00:00
Juergen Hoeller 26470cc23a polishing 2010-03-22 18:31:41 +00:00
Juergen Hoeller 296aa96d71 AopUtils.getTargetClass(...) never returns null (SPR-7011) 2010-03-22 18:31:13 +00:00
Juergen Hoeller a2c3274b8e fixed double fixedField call for getFieldType (SPR-7019) 2010-03-22 15:08:57 +00:00
Chris Beams 5e19f2959e SPR-6888: ClassPathResource.getDescription() now fully qualifies resource path regardless of constructor used. 2010-03-22 14:54:39 +00:00
Juergen Hoeller 5dc59aaa7b avoid Synchronization List preparations upfront if possible (SPR-6999) 2010-03-22 14:31:58 +00:00
Arjen Poutsma c9289a4dcf SPR-6021 - Allow for using MultiValueMap in GET request for mapping multiple request params 2010-03-22 14:31:27 +00:00
Juergen Hoeller 19b4618fb5 avoid Synchronization List preparations upfront if possible (SPR-6999) 2010-03-22 14:23:02 +00:00
Arjen Poutsma 4c0744ee54 SPR-6978 - Dispatcher fails to invoke handler method when request method conflicts with request path 2010-03-22 14:12:32 +00:00
Arjen Poutsma b07d02f1bf SPR-7018 - Support for HttpEntity<?> in @MVC 2010-03-22 10:23:39 +00:00
Sam Brannen 69cbadf7e9 [SPR-6918] Now verifying support for @Value in conjunction with the Spring TestContext Framework. 2010-03-19 12:57:17 +00:00
Sam Brannen 0543036ec9 FooConfig, Foo, Bar, and BarFactory are now public static classes in order to avoid a bug with JDT/Spring IDE where the classes cannot be found in the XML application context. 2010-03-19 12:39:34 +00:00
Thomas Risberg 2ff2f0205d added metadata override to NUMERIC for NUMBER columns reported as DECIMAL but with zero decimal places (SPR-6912) 2010-03-18 14:19:30 +00:00
Christian Dupuis e22431188b made SortedResourcesFactoryBean ResourceLoaderAware to prevent specifying the ResourceLoader in the jdbc NamespaceHandlers; prevents leaking of class loader instances in tooling 2010-03-17 17:35:27 +00:00
Juergen Hoeller b8c0e153e3 do not insist on BeanDefinition presence for @Value resolution (for use in unit tests; SPR-6918) 2010-03-16 23:47:40 +00:00
Juergen Hoeller ff09482653 avoid ChainedTilesRequestContextFactory warn logging on Tiles 2.2 2010-03-16 23:27:18 +00:00
Andy Clement d932c043da SPR-6984: auto grow collections on write through indexer 2010-03-15 18:15:48 +00:00
Juergen Hoeller 0cb7e4dcb3 made getName() public; added isNullSafe() accessor (SPR-6980) 2010-03-14 22:19:56 +00:00
Christian Dupuis 2e5f1c22f6 fixed Eclipse classpath file 2010-03-14 17:58:46 +00:00
Chris Beams cf93e7c69e Fixed typo in javadoc on HttpRequestHandler 2010-03-14 11:26:06 +00:00
Juergen Hoeller 9da980d325 further fixes for 3.0.2 2010-03-12 23:12:40 +00:00
Juergen Hoeller 7da13e7ad1 compatibility with OpenJPA 2.0 (support for persistence.xml versioning; SPR-6975) 2010-03-12 23:10:06 +00:00
Juergen Hoeller a0e40a5610 avoid ChainedTilesRequestContextFactory warn logging on Tiles 2.1 2010-03-12 22:36:24 +00:00
Juergen Hoeller ac5c75690a fixed test failures 2010-03-12 20:55:44 +00:00
Juergen Hoeller 795a5e02cd polishing 2010-03-12 20:45:02 +00:00
Juergen Hoeller bb75662a7e @Transactional qualifiers work in unit tests as well (SPR-6892) 2010-03-12 20:44:41 +00:00
Juergen Hoeller 23cb161fb3 polishing 2010-03-12 19:45:17 +00:00
Juergen Hoeller eb1c039a6e WebContentInterceptor does not restrict HTTP methods by default anymore (SPR-6919) 2010-03-12 19:45:05 +00:00
Juergen Hoeller 4c39f90466 made CronSequenceGenerator public (SPR-6920) 2010-03-12 19:34:45 +00:00
Juergen Hoeller d4de1ac346 AbstractInterceptorDrivenBeanDefinitionDecorator copies autowire settings just like ScopedProxyUtils does (SPR-6974) 2010-03-12 19:18:39 +00:00
Arjen Poutsma 4880d1d461 SPR-6976 - Add debug log for HttpMessageConverter usage 2010-03-12 17:46:50 +00:00
Arjen Poutsma 5a8aa53232 SPR-6973 - SimpleUrlHandlerMapping wildcards cannot handle escaped newline characters 2010-03-12 16:56:16 +00:00
Arjen Poutsma 85b8befbd1 SPR-6970 - AbstractHttpMessageConverter canWrite logic the wrong way round?? 2010-03-12 16:43:57 +00:00
Christian Dupuis 4c4f19ec94 SPR-6977: updated copyright; added method comment 2010-03-12 16:10:03 +00:00
Christian Dupuis 145dcfd0c2 SPR-6977: added support for array parameter types 2010-03-12 15:09:24 +00:00
Arjen Poutsma 991c982e5b SPR-5866 - RestTemplate - access to Request Headers 2010-03-12 09:07:29 +00:00
Juergen Hoeller 1d6f374970 fixed typo (SPR-6967) 2010-03-11 21:30:39 +00:00
Juergen Hoeller eee72c52da mention actual endpoint address in connect failure exception message (SPR-6971) 2010-03-11 21:26:10 +00:00
Arjen Poutsma b0e3081636 SPR-5866 - RestTemplate - access to Request Headers 2010-03-11 17:41:30 +00:00
Arjen Poutsma 886eb665bf SPR-5866 - RestTemplate - access to Request Headers 2010-03-11 17:35:08 +00:00
Arjen Poutsma 70ee2ee7b1 SPR-5866 - RestTemplate - access to Request Headers 2010-03-11 17:33:54 +00:00
Arjen Poutsma f3f535623f Fixing the build 2010-03-11 16:54:47 +00:00
Arjen Poutsma 63076d0865 SPR-6969 - Introduce HttpEntity 2010-03-11 16:42:25 +00:00
Arjen Poutsma fc0a6ce40c Javadoc 2010-03-11 14:19:30 +00:00
Arjen Poutsma 88773ae7f1 a HTTP -> an HTTP 2010-03-11 12:57:52 +00:00
Andy Clement 81b10be1d0 SPR-6968: indexing via square brackets can now treat the index as an attempt at property access 2010-03-11 01:09:50 +00:00
Scott Andrews 50c5593740 SPR-6923 SpEL resolving nested property as outer object 2010-03-10 17:44:14 +00:00
Arjen Poutsma af4b22e5b9 SPR-5904 - Merged multipart support into FormHttpMessageConverter 2010-03-10 17:31:02 +00:00
Arjen Poutsma 6e55c8cd2f Fixing build. 2010-03-10 14:03:56 +00:00
Arjen Poutsma def90d1016 SPR-5904 - Multipart/mixed requests using RestTemplate 2010-03-10 13:53:29 +00:00
Juergen Hoeller f30b0a86f7 autowire="byType" ignores parameter name when choosing a primary bean, as defined (SPR-6917) 2010-03-10 13:46:31 +00:00
Juergen Hoeller 95ad7168bf changed doGetBean signature back to protected (SPR-6957) 2010-03-10 13:38:46 +00:00
Juergen Hoeller ccb312a974 SimpleJdbcCall's "returningResultSet" accepts any plain RowMapper now (SPR-6963) 2010-03-10 12:54:52 +00:00
Arjen Poutsma f588ab05fa Added readonly version of HttpHeaders 2010-03-10 10:00:03 +00:00
Andy Clement 2dd1134303 SPR-6941: part (1) correct exception handling when null cachedExecutor 2010-03-09 17:33:36 +00:00
Arjen Poutsma 0efb9d8023 SPR-5904 - Multipart/mixed requests using RestTemplate 2010-03-09 16:15:41 +00:00
Arjen Poutsma 21fd150894 SPR-6906 - Combination of ControllerClassNameHandlerMapping and @RequestMappings with file extensions results in exception 2010-03-09 10:29:01 +00:00
Arjen Poutsma ac9a625ccc SPR-6939 - XStreamMarshaller + JsonHierarchicalStreamDriver + JsonWriter.DROP_ROOT_MODE produce empty output 2010-03-09 09:53:51 +00:00
Andy Clement c31213e5cb SPR-6866: unhelpful NPE when expression badly formed 2010-03-09 00:55:03 +00:00
Ramnivas Laddad f82cc6458b Fixed SPR-6734 by resticting record/replay logic to only entity methods that originated in a test method 2010-03-08 20:42:22 +00:00
David Syer 8d7df01d73 RESOLVED - issue SPR-6955, SPR-6901 added DisposableBean to TaskExecutorFactoryBean 2010-03-08 12:13:30 +00:00
Arjen Poutsma 5303ab68aa Atom Feed HttpMessageConverter 2010-03-05 14:32:36 +00:00
Arjen Poutsma c91ff130d5 SPR-6946 - RestTemplate should not encode fragments (#'s) 2010-03-05 11:40:52 +00:00
Juergen Hoeller 54d0346084 do not call isCurrentlyInCreation with null argument (in order to meet newly enforced assertions within the BeanFactory) 2010-03-05 10:49:24 +00:00
Juergen Hoeller 4f926c82bf added bean name assertions 2010-03-04 22:36:35 +00:00
Juergen Hoeller b07b146965 fixed @Configurable issue with null bean name (SPR-6947) 2010-03-04 22:33:59 +00:00
Juergen Hoeller cfbc5224e3 fixed exception propagation issue with Hessian 4.0 (SPR-6899) 2010-03-04 22:22:47 +00:00
Arjen Poutsma a0c41a0e03 SPR-6906 - Combination of ControllerClassNameHandlerMapping and @RequestMappings with file extensions results in exception 2010-03-04 15:17:09 +00:00
Juergen Hoeller 8fe5151f84 some further 3.0.2 entries 2010-03-04 13:58:23 +00:00
Juergen Hoeller 77f8b070cd polishing 2010-03-04 13:58:02 +00:00
Arjen Poutsma 4f4f3fab7d SPR-6934 - AnnotationMethodHandlerAdapter should take into account request accept header ordering 2010-03-04 13:54:24 +00:00
Juergen Hoeller 0444ab236a fixed TypeDescriptor toString for MethodParameter annotations (SPR-6924) 2010-03-04 13:50:43 +00:00
Juergen Hoeller 9ede9fe697 "conversionService" bean gets ignored if not of type ConversionService (SPR-6916) 2010-03-04 11:27:09 +00:00
Juergen Hoeller 3e98b26b77 fixed typo (SPR-6936) 2010-03-04 11:17:12 +00:00
Juergen Hoeller 0aee6e9f5b use target factory's ClassLoader in case of a raw EntityManagerFactory (SPR-6733) 2010-03-04 11:13:28 +00:00
Arjen Poutsma eddc5b8898 SPR-6935 - @ResponseBody with method that return void throws "Could not resolve view exception". 2010-03-04 10:51:27 +00:00
Juergen Hoeller 57993d871e WebApplicationObjectSupport's initServletContext will be called only once in any scenario (SPR-6914) 2010-03-03 16:26:47 +00:00
Arjen Poutsma 3c8a47bd06 SPR-6877 - AnnotationMethodHandlerAdapter.handleResponseBody prioritizes messageConverter over MediaType 2010-03-03 11:14:30 +00:00
Arjen Poutsma 7f8c91a52d SPR-6902 - @ResponseBody does not work with @ExceptionHandler 2010-03-03 10:33:58 +00:00
Arjen Poutsma 62f9f477f5 SPR-6877 - AnnotationMethodHandlerAdapter.handleResponseBody prioritizes messageConverter over MediaType 2010-03-03 10:18:59 +00:00
Arjen Poutsma 894875ce8d SPR-6907 - JibxMarshaller - provide access to jibx's writeDocType 2010-03-02 12:49:31 +00:00
Arjen Poutsma 9d1c3fa9ac SPR-6907 - JibxMarshaller - provide access to jibx's writeDocType 2010-03-02 11:56:22 +00:00
Arjen Poutsma d207c2294d Fixed wrong encoding of URI templates with @-signs (SPR-6874) 2010-03-02 11:30:36 +00:00
Arjen Poutsma e653a9cd03 javadoc 2010-03-02 10:53:15 +00:00
Arjen Poutsma 5675046cb7 SPR-6876 - RequestMethod does not appear to factor into @RequestMapping uniqueness in some cases 2010-03-02 09:52:43 +00:00
Costin Leau 20a8039642 + improve template for spring-context so that the import-package is updated automatically 2010-02-25 15:46:54 +00:00
Juergen Hoeller 4bda92fd8a newArg(Type)PreparedStatementSetter declares PreparedStatementSetter interface as return type (SPR-6897) 2010-02-24 14:32:22 +00:00
Sam Brannen 97adfdd398 Removed misleading comments regarding javax.inject.Qualifier. 2010-02-23 23:07:44 +00:00
Sam Brannen a5b5df450e [SPR-6879] @DirtiesContext is now an @Inherited annotation. 2010-02-23 17:44:59 +00:00
Sam Brannen 80b8fb8b83 [SPR-6879] @DirtiesContext is now an @Inherited annotation. 2010-02-23 17:43:00 +00:00
Juergen Hoeller ef227c5d01 HibernateJpaDialect borrows JDBC Connection on demand (supporting aggressive release; SPR-6895) 2010-02-23 16:13:04 +00:00
Michael Isvy 9e5b129ba5 SPR-6885
updates based on Chris Beams' comments.
2010-02-23 15:46:52 +00:00
Juergen Hoeller 12b30843c5 widened AbstractFactoryBean's "getObjectType" signature to return any Class as well (SPR-6872) 2010-02-23 13:00:12 +00:00
Juergen Hoeller 09f02bc620 use WeakHashMap for DataSource-keyed cache (SPR-6887) 2010-02-23 10:47:51 +00:00
Chris Beams 3d2611484a adding .gitignore 2010-02-22 23:52:56 +00:00
Michael Isvy 6af91773ee SPR-6885
Improved documentation for JavaConfig's use of CGLIB for all @Configuration annotated classes
2010-02-22 13:50:41 +00:00
Juergen Hoeller 9e71af86f8 polishing 2010-02-22 11:49:19 +00:00
Juergen Hoeller 60ff93e5ac avoid invalid id characters in ErrorsTag as well (SPR-6862) 2010-02-22 11:48:08 +00:00
Chris Beams f25d2a9416 Removed hard-coded local path from .core/.classpath; removed duplicate asm entry in .context/.classpath 2010-02-22 01:55:38 +00:00
David Syer fd4b9cf6a3 SPR-6881: remove extra dependency 2010-02-21 17:51:48 +00:00
David Syer 1a351db6e0 Update Central POMs to 3.0.2 2010-02-21 15:32:18 +00:00
Chris Beams 5b537e9604 minor typo fixes 2010-02-21 02:13:41 +00:00
Juergen Hoeller 6c69f47acf regressions 2010-02-20 16:29:07 +00:00
Juergen Hoeller 44ef114981 fixed @RequestParam(required=false) regression for @InitBinder methods (SPR-6878) 2010-02-20 16:14:14 +00:00
Juergen Hoeller 67b342d923 fixed indexed property regression (SPR-6871) 2010-02-20 15:53:09 +00:00
Juergen Hoeller 5063c6dd00 upgraded to Hibernate Validator 4.0.2 and Jackson 1.4.2 2010-02-19 13:58:19 +00:00
Costin Leau 8d0bb00188 + make use or property placeholders inside template.mf 2010-02-19 09:43:22 +00:00
Arjen Poutsma fe59d4a787 setting things up for 3.0.2 2010-02-18 17:42:14 +00:00
Juergen Hoeller e65610555e final preparations for 3.0.1 release 2010-02-18 11:29:28 +00:00
Arjen Poutsma 68b4c7df6e SPR-6752 - RestTemplate throws IllegalArgumentException when HTTP status is not in the HttpStatus enum 2010-02-18 11:15:17 +00:00
Juergen Hoeller 103ac0359d DefaultRequestToViewNameTranslator strips trailing slashes as well (SPR-6830) 2010-02-18 10:47:22 +00:00
Ben Hale fff4c77dbe Updated spring-build to 2.5.0 2010-02-18 10:26:35 +00:00
Juergen Hoeller b960bd579d preparations for 3.0.1 release 2010-02-18 00:07:02 +00:00
Juergen Hoeller 5f7f37f1c1 polishing 2010-02-18 00:06:16 +00:00
Juergen Hoeller 572abbcff9 do not ever consider Object as a candidate type for autowiring by type (SPR-6600) 2010-02-18 00:04:08 +00:00
Juergen Hoeller e74b33242b fixed regression: method-level patterns without type-level pattern do not need to start with a slash (SPR-6598) 2010-02-17 23:26:06 +00:00
Juergen Hoeller b54a099f49 marked spring-tx as a required dependency (SPR-6737) 2010-02-17 22:50:01 +00:00
Juergen Hoeller c39b529c93 added vararg variants of query methods to JdbcTemplate (as known from SimpleJdbcTemplate; SPR-6858) 2010-02-17 22:19:49 +00:00
Juergen Hoeller 54acebd086 UriTemplate properly quotes variable values (SPR-6854) 2010-02-17 21:58:56 +00:00
Juergen Hoeller 36940c5fc8 only activate EL support if JSP ExpressionFactory actually available (SPR-6852) 2010-02-17 21:54:21 +00:00
Michael Isvy 6aa05994ae SPR-6855
Documentation on Spring-Struts 1 integration needs to be updated
2010-02-17 15:59:52 +00:00
Juergen Hoeller d3560706df final preparations for 3.0.1 release 2010-02-16 18:21:50 +00:00
Juergen Hoeller 64f0200675 polishing 2010-02-16 18:21:25 +00:00
Juergen Hoeller 64fc4c23ea revised EvalTag implementation 2010-02-16 18:16:47 +00:00
Juergen Hoeller 4ae1709313 relaxed generic Class declaration in HttpMessageConverter's canRead/canWrite/read signatures (SPR-6848) 2010-02-16 17:46:16 +00:00
Arjen Poutsma 19cdd558d3 Improved Jaxb2Marshaller.supports() 2010-02-16 14:25:55 +00:00
Arjen Poutsma 58f63f6142 Improved Jaxb2Marshaller.supports() 2010-02-16 14:13:18 +00:00
Juergen Hoeller 60ac239091 BeanDefinitionReader and ClassPath/FileSystemXmlApplicationContext use varargs where possible (SPR-6849) 2010-02-16 11:59:29 +00:00
Michael Isvy c0f4d9c893 fixed SPR-6846 2010-02-15 22:45:26 +00:00
Juergen Hoeller ccc7d0f53f fixed interaction with ControllerClassNameHandlerMapping (as reported by Rossen) 2010-02-15 18:27:30 +00:00
Juergen Hoeller 87eb3f970e store a static WebApplicationContext reference if the Spring jars get deployed in the same web application as the ContextLoader (SPR-5652) 2010-02-15 18:02:19 +00:00
Juergen Hoeller db2d323d96 store a static WebApplicationContext reference if the Spring jars get deployed in the same web application as the ContextLoader (SPR-5652) 2010-02-15 17:58:52 +00:00
Juergen Hoeller 0598eafb84 polishing 2010-02-15 17:37:57 +00:00
Juergen Hoeller b5e826976c fixed interaction with ControllerClassNameHandlerMapping (as reported by Rossen) 2010-02-15 17:37:44 +00:00
Juergen Hoeller 5e1065838b fixed isProxyFactoryBeanDefinition check (SPR-6842) 2010-02-15 17:04:13 +00:00
Juergen Hoeller a6af91f7b2 avoid rendering invalid ids (SPR-6840) 2010-02-15 13:45:47 +00:00
Costin Leau e8a4ddd3e0 + fix test by disabling autowiring 2010-02-15 13:23:47 +00:00
Juergen Hoeller 18bd4a8337 improved "no matching factory method found" exception message (SPR-6837) 2010-02-15 13:01:46 +00:00
Juergen Hoeller 97059f4e18 @RequestParam/RequestHeader/CookieValue's defaultValue allows for declaring empty String (SPR-6791) 2010-02-15 12:10:55 +00:00
Juergen Hoeller 83231997c0 final preparations for 3.0.1 release 2010-02-15 00:50:21 +00:00
Juergen Hoeller 870507cc36 context-specific "conversionService" bean may refer to annotation-configured converter beans (SPR-6800) 2010-02-15 00:42:39 +00:00
Juergen Hoeller 9adb01a4a6 added PropertyPlaceholderConfigurer test 2010-02-15 00:22:06 +00:00
Juergen Hoeller b3b4c7aaad fixed checkboxes comparison for multi-list (SPR-6505) 2010-02-15 00:17:50 +00:00
Juergen Hoeller cdee538129 fixed rendering of select options for multi-list (SPR-6799) 2010-02-15 00:04:30 +00:00
Juergen Hoeller d9112d071b fixed error message 2010-02-14 23:59:53 +00:00
Keith Donald f4631b1cb6 Spring eval docs 2010-02-12 20:43:55 +00:00
Keith Donald d075b82372 Spring eval docs 2010-02-12 20:43:40 +00:00
Keith Donald 62eb6cb473 Spring eval docs 2010-02-12 20:42:35 +00:00
Keith Donald 9c35130fdc Added spring:eval note 2010-02-12 20:03:23 +00:00
Keith Donald b825e398ae added jsp.* import to catch jsp.el 2010-02-12 17:54:13 +00:00
Keith Donald 6390e897b8 eval tag tidying 2010-02-12 17:42:41 +00:00
Andy Clement 117b138233 SPR-6745: metadata (annotations) attached to property accessors allowing formatting of values during conversion 2010-02-12 01:50:52 +00:00
Keith Donald 0f65a0f239 bug 2010-02-12 00:43:27 +00:00
Keith Donald e1a0625a15 conversion service lookup in request 2010-02-12 00:33:27 +00:00
Juergen Hoeller 315c16de5f relaxed test conditions 2010-02-12 00:02:32 +00:00
Juergen Hoeller 5f781e6266 generified PagedListHolded (SPR-6825) 2010-02-11 23:24:45 +00:00
Juergen Hoeller 09998b2434 relaxed test conditions 2010-02-11 23:15:15 +00:00
Keith Donald daa45dd424 updated template.mf to depend on spring-expression 2010-02-11 23:10:18 +00:00
Keith Donald c927e7dc7c added spring expression dependency to maven pom 2010-02-11 23:01:58 +00:00
Keith Donald f23b55dc13 spring:eval tag initial commit 2010-02-11 22:53:49 +00:00
Juergen Hoeller 16aa399040 optional EL support (only when Tiles EL module present); got rid of tiles-servlet-wildcard dependency (implemented wildcard support locally) 2010-02-11 17:03:37 +00:00
Juergen Hoeller 3db5a299bb canConvert checks Collection/Map element types as well (SPR-6564) 2010-02-11 12:23:57 +00:00
Juergen Hoeller cef44f6d53 made PersistenceAnnotationBeanPostProcessor's JNDI API references optional - for compatibility with Google App Engine (SPR-6679) 2010-02-11 11:36:33 +00:00
Costin Leau caaa45c9ef + fixed internal caching for LocalVariableTableParameterNameDiscoverer 2010-02-11 11:35:39 +00:00
Costin Leau 6389097ac1 + improved javadoc 2010-02-11 10:38:59 +00:00
Costin Leau c9975504c6 + improved LocalVariableTableParameterNameDiscoverer discovery and memory usage
+ added extra tests
2010-02-11 10:38:33 +00:00
Juergen Hoeller 06cd013b31 Tiles 2.2 etc 2010-02-10 23:25:43 +00:00
Juergen Hoeller 99c5a70ce3 added optional JPA dependency to spring-aspects POM (SPR-6819) 2010-02-10 23:02:31 +00:00
Juergen Hoeller d87a947ef2 reverted to fixed definition path 2010-02-10 21:45:13 +00:00
Sam Brannen 69cb15f27f [SPR-6821] Removed lingering reference to StandardScopes. 2010-02-10 21:35:26 +00:00
Juergen Hoeller ef024db318 polishing 2010-02-10 21:29:13 +00:00
Juergen Hoeller bef30a838c support for Tiles 2.2.1 (preserving compatibility with Tiles 2.1.2 and above; SPR-6097) 2010-02-10 21:26:42 +00:00
Keith Donald bfd61d6303 mvc namespace docs 2010-02-10 20:16:38 +00:00
Keith Donald 61958b6b3b comments about tutorials 2010-02-10 15:38:54 +00:00
Juergen Hoeller 03e9e4568f avoid double closing in case of shutdown hook (SPR-6793) 2010-02-10 13:49:51 +00:00
Ben Hale 63f574e741 Updated spring-build to see new maven targets 2010-02-10 11:38:33 +00:00
Juergen Hoeller b670b19429 setAutoGrowNestedPaths throws an IllegalStateException if being called too late (SPR-6718) 2010-02-09 15:54:48 +00:00
Juergen Hoeller aafe8ef9be added "lenientFallback" flag to AbstractRoutingDataSource (SPR-6809) 2010-02-09 15:39:54 +00:00
Juergen Hoeller f0bb45ae28 included qualifier value in debug log for each transaction (SPR-6811) 2010-02-09 14:57:17 +00:00
Juergen Hoeller 3322368106 fixed TilesConfigurer's init-param handling; added simple bootstrap test for Tiles (SPR-6606) 2010-02-09 12:32:32 +00:00
Costin Leau 7aec01bbac SPR-5379
+ added clarifications to section 3.4.5.2 Excluding a bean from autowiring
2010-02-09 12:23:12 +00:00
Costin Leau a9386f5c79 SPR-5246
+ clarify order of annotation and XML injection
2010-02-09 11:17:07 +00:00
Juergen Hoeller c5c38c6664 non-matching @Transactional qualifier value will lead to IllegalStateException (SPR-6810) 2010-02-08 18:32:38 +00:00
Juergen Hoeller 6c0d934b92 do not try to convert read-only Collections/Maps (SPR-6808) 2010-02-08 12:29:21 +00:00
Sam Brannen 81649d5c3b Removed unused import. 2010-02-07 15:57:57 +00:00
Juergen Hoeller b25dc7cc55 compatibility with Hibernate 3.5 beta 4 (SPR-6804, SPR-6805) 2010-02-06 16:15:12 +00:00
Juergen Hoeller 3833444778 plenty of new entries for 3.0.1 2010-02-04 20:32:36 +00:00
Juergen Hoeller d7b79dc9a9 fixed lookup log message (SPR-6746) 2010-02-04 18:40:39 +00:00
Juergen Hoeller 4778c4b750 support for Hessian 4.0.x (SPR-6041) 2010-02-04 18:36:21 +00:00
Costin Leau 0590184557 + downgraded slf4j to 1.5.6 to solve IllegalAcessError with Hibernate 3.3 2010-02-04 17:10:31 +00:00
Juergen Hoeller 5279a07673 @SessionAttributes works when used on an annotated controller interface with AOP proxying (SPR-6797) 2010-02-04 16:53:44 +00:00
Juergen Hoeller 59360f4f65 added warning about pointing to a custom transaction manager bean (SPR-5174) 2010-02-04 16:47:57 +00:00
Juergen Hoeller 5f166f6799 added warning about annotated controller interfaces (SPR-6655) 2010-02-04 15:52:15 +00:00
Juergen Hoeller 56e119e822 @SessionAttributes works when used on an annotated controller interface with AOP proxying (SPR-6797) 2010-02-04 15:39:58 +00:00
Arjen Poutsma 7832381dd2 SPR-6788: fixed compareTo() consistency with equals 2010-02-04 14:19:11 +00:00
Chris Beams 0f7f749ada Updated Eclipse .classpath to aspectj 1.6.8 2010-02-04 13:45:14 +00:00
Juergen Hoeller 82178b8d93 ignore IllegalStateException when removing shutdown hook (SPR-6793) 2010-02-04 12:30:39 +00:00
Costin Leau 0fd4a45070 + upgrade to AspectJ 1.6.8
+ externalize some of the jar versions
+ align the versions of some dependencies between pom.xml and ivy.xml
2010-02-04 11:46:21 +00:00
Costin Leau ac93b81a78 SPR-6794
+ fix test
2010-02-04 11:33:58 +00:00
Arjen Poutsma 2047b9b6b3 SPR-6788: fixed compareTo() consistency with equals 2010-02-04 11:08:09 +00:00
Costin Leau 4f0876de39 SPR-6794
+ added setter for encoding (in case the default UTF-8 is not enough)
2010-02-04 10:13:04 +00:00
Costin Leau fab29dfee7 + add explicit dependency on commons-pool to prevent version 1.3 from being used (since it contains a memory leak) 2010-02-04 10:05:54 +00:00
Costin Leau 0224cbc3de SPR-6794
+ used UTF-8 as the implicit encoding for reading scripts
2010-02-04 10:04:48 +00:00
Arjen Poutsma 44626054ce SPR-6786: added more checks for quality factors & charsets 2010-02-04 09:47:52 +00:00
Juergen Hoeller 4d09809f17 ApplicationListeners will reliably get invoked through their proxy (if any) 2010-02-03 23:52:56 +00:00
Juergen Hoeller ce6f14bd8b refined addApplicationListener to work any time during the refresh phase 2010-02-03 23:09:42 +00:00
Juergen Hoeller d96a6914a8 ApplicationListeners will get detected lazily as well (e.g. on @Bean's concrete result); inner bean ApplicationListeners will be invoked through their proxy (if any) 2010-02-03 22:54:59 +00:00
Juergen Hoeller 4d897e7ab5 lenient evaluation of boolean 'true' attribute expressions in JSP form tag library (SPR-6790) 2010-02-03 21:56:17 +00:00
Juergen Hoeller 41ecbc6814 fixed WebSphereUowTransactionManager regression: correctly roll back in case of exception (SPR-6695) 2010-02-03 19:41:14 +00:00
Arjen Poutsma 6e21c17253 SPR-6788 - The class MediaType has a natural ordering that is inconsistent with equals, which is generally recommended or should otherwise at least be indicated in the javadoc 2010-02-03 14:02:44 +00:00
Arjen Poutsma 0135a9451a SPR-6786 - The method org.springframework.http.MediaType.parseMediaType does not always throw IllegalArgumentException as the documentantion claims 2010-02-03 13:52:39 +00:00
Arjen Poutsma 0c6b99e489 SPR-6788 - The class MediaType has a natural ordering that is inconsistent with equals, which is generally recommended or should otherwise at least be indicated in the javadoc 2010-02-03 11:38:31 +00:00
Juergen Hoeller a44ec9f4f7 fixed JmsTemplate example (SPR-6789) 2010-02-03 00:29:49 +00:00
Andy Clement 5ca1f11ce2 SPR-6763: more methods on StandardEvaluationContext supporting add/remove from resolver/accessor strategies 2010-02-02 21:38:33 +00:00
Andy Clement 66f708392e SPR-6764: filtering strategy for SpEL method invocation 2010-02-02 19:38:44 +00:00
Arjen Poutsma 4343714c6d SPR-6788 - The class MediaType has a natural ordering that is inconsistent with equals, which is generally recommended or should otherwise at least be indicated in the javadoc 2010-02-02 13:14:19 +00:00
Andy Clement 644f3065b6 SPR-6610: don't wrap runtime exceptions thrown from methods invoked via an expression 2010-02-01 20:13:08 +00:00
Keith Donald 45f79530db with dependencies distribution added 2010-02-01 19:59:05 +00:00
Andy Clement 4c35697c79 SPR-6760: method called twice if exits via exception in a 'normal' case 2010-02-01 19:53:34 +00:00
Juergen Hoeller e3cdabfaac fixed MBeanExporter regression: do not try to expose abstract beans (SPR-6784) 2010-02-01 17:56:03 +00:00
Juergen Hoeller abdc35c893 component-scan's scoped-proxy attribute applies to scope-annotated singleton beans as well (SPR-6683) 2010-02-01 16:51:46 +00:00
Juergen Hoeller 56d2c9daf5 component-scan's scoped-proxy attribute applies to scope-annotated singleton beans as well (SPR-6683) 2010-02-01 16:30:21 +00:00
Arjen Poutsma 208c2d9c8b SPR-6785 - Improve message error when the MarshallingView modelKey attribute is not valid 2010-02-01 15:25:29 +00:00
Juergen Hoeller 1dbb64580c throw NotSerializableException if no serialization id is available 2010-02-01 14:52:43 +00:00
Juergen Hoeller 5f5e7c3262 polishing 2010-02-01 14:51:54 +00:00
Juergen Hoeller db71811c5a SharedEntityManagerCreator's EntityManager proxies are fully serializable now (SPR-6684) 2010-02-01 14:48:18 +00:00
Juergen Hoeller df54c8613d TransactionInterceptor is able to serialize "transactionManagerBeanName" as well (SPR-6680) 2010-02-01 14:45:11 +00:00
Juergen Hoeller 2d525901ff proxies with AspectJ pointcuts are fully serializable within a BeanFactory now (SPR-6681) 2010-02-01 14:43:35 +00:00
Costin Leau dcf0244566 SPR-3786
+ add note on annotation-based injection vs XML
+ provide a nicer introduction to annotation based chapter
2010-02-01 14:36:38 +00:00
Juergen Hoeller 83c018a0b4 call processConfigBeanDefinitions lazily if postProcessBeanDefinitionRegistry hasn't been called 2010-01-31 16:10:11 +00:00
Juergen Hoeller b53ccb3807 widened FactoryBean's "getObjectType" signature to return any Class<?> (SPR-6692) 2010-01-31 16:01:14 +00:00
Juergen Hoeller 8ab9da4461 introduced BeanDefinitionRegistryPostProcessor extension to BeanFactoryPostProcessor; @Configuration classes support definition of BeanFactoryPostProcessor beans as well (SPR-6455, SPR-6611) 2010-01-31 15:58:27 +00:00
Juergen Hoeller a897e3f01f refined DefaultLifecycleProcessor's start/stop logging and stop exception handling (SPR-6769, SPR-6770) 2010-01-31 15:52:13 +00:00
Juergen Hoeller 59b8a139d7 JndiObjectFactoryBean explicitly only chooses public interfaces as default proxy interfaces (SPR-5869) 2010-01-31 14:59:27 +00:00
Juergen Hoeller 9c44f9252d fixed cron example (SPR-6772) 2010-01-31 14:17:44 +00:00
Juergen Hoeller 6070a498fe BeanNameAutoProxyCreator detects alias matches for specified bean names as well (SPR-6774) 2010-01-31 14:12:48 +00:00
Juergen Hoeller 6b2b5c4c23 introduced BeanDefinitionRegistryPostProcessor extension to BeanFactoryPostProcessor; @Configuration classes support definition of BeanFactoryPostProcessor beans as well (SPR-6455, SPR-6611) 2010-01-31 14:05:28 +00:00
Juergen Hoeller 2d6ea2f4fe fixed JPA multi-unit setup example (SPR-6781) 2010-01-31 12:59:59 +00:00
Chris Beams fbd797e50b RESOLVED - issue SPR-6779: imported @Configuration classes do not get enhanced and fail to satisfy scoping requirements
refactoring, polishing.
2010-01-29 23:31:53 +00:00
Chris Beams 110b032ad9 IN PROGRESS - issue SPR-6779: imported @Configuration classes do not get enhanced and fail to satisfy scoping requirements
All tests in ImportedConfigurationClassEnhancementTests now pass.  The fix was simple - imported @Configuration class bean definitions were not getting marked with the attribute that indicates that they are indeed @Configuration class bean definitions.  To make this happen, ConfigurationClassPostProcessor's protected checkConfigurationClassCandidate(beanDef) method is being called from within ConfigurationClassBeanDefinitionReader when imported @Configuration classes are being processed.  This is quick and dirty, and the subsequent check-in will refactor the solution appropriately.
2010-01-29 20:55:03 +00:00
Chris Beams 5fdee47841 Unit test cornering bug SPR-6779, 'imported @Configuration classes do not get enhanced and fail to satisfy scoping requirements' 2010-01-29 19:48:25 +00:00
Costin Leau ee2b1cde82 SPR-6775
+ remove class definitions for sticking around (by forcing eager metadata initialization)
+ improve cache size by eliminating the numbers of method metadata objects created
+ improve lookup access on method metadata
2010-01-29 14:27:49 +00:00
Costin Leau 39f81760f8 SPR-6775
+ increase size to 256
2010-01-28 16:03:07 +00:00
Costin Leau b32c4cfb8a SPR-6775
+ replace the vanilla hashmap with a quick-and-dirty, JDK based, fixed LRU cache
2010-01-28 15:51:20 +00:00
Arjen Poutsma f2fdf9fa6b SPR-6771 - HttpMessageConverter should accept Class<? extends T> on can read 2010-01-28 09:23:34 +00:00
Chris Beams 1cda8cb6fa Updated documentation to point out that AnnotationConfigWebApplicationContext can accept both fully-qualified class names as well as base packages to the contextConfigLocation init-param. 2010-01-28 03:42:42 +00:00
Juergen Hoeller d13f0c8052 fixed namespace example (SPR-6766) 2010-01-27 13:48:57 +00:00
Arjen Poutsma 0a4a09a09d SPR-6759 - Jetty 7 doesn't like ShallowEtagHeaderFilter 2010-01-27 13:02:02 +00:00
Costin Leau 1bbe93e535 SPR-3709
+ improved example to work with multi-nested declarations
+ used JDK 5 syntax
+ added documentation code into trunk (including unit test) for easier future reference
2010-01-27 12:25:04 +00:00
Arjen Poutsma b1e2a2ec3c SPR-6577 - MarshallingView auto detect model with Jaxb2Marshaller chooses the wrong object 2010-01-27 10:52:08 +00:00
Costin Leau 71d7b22d5e SPR-3771
+ added table summarizing the Aware interfaces in Spring 3
2010-01-26 17:02:21 +00:00
Costin Leau 1152d51c6f SPR-4493
+ added some clarifications
+ improved the document structure
2010-01-26 14:31:44 +00:00
Arjen Poutsma ead5df4546 SPR-6649 - Request mapping incorrectly receiving all dispatches for a controller 2010-01-26 10:47:36 +00:00
Costin Leau 2f840b1097 SPR-6646
+ replaced handleRequest() with setSynchronizeOnSession() which is final
2010-01-26 10:07:40 +00:00
Juergen Hoeller 0968e9fbd0 LinkedMultiValueMap should implement Serializable (SPR-6765) 2010-01-25 20:04:01 +00:00
Costin Leau bc37c50972 SPR-4493
SPR-6756
2010-01-25 17:03:05 +00:00
Ben Hale 0c2a710787 Upgrade to spring-build 2010-01-23 17:27:51 +00:00
Ben Hale f614150421 Fixed up POM bug 2010-01-23 12:01:54 +00:00
Ben Hale 2afb58e74e Upgraded spring-build 2010-01-23 09:28:22 +00:00
Ben Hale 693a83ba88 Upgraded spring-build 2010-01-23 00:15:00 +00:00
Ben Hale 1305d6ac11 Separated out unit test projects 2010-01-23 00:03:05 +00:00
Ben Hale 265b82013d Updates to allow nightly snapshots of maven central-compatible artifacts 2010-01-22 20:16:25 +00:00
Juergen Hoeller 8c791b529b fixed instrumentation jar names (SPR-6753) 2010-01-22 19:23:11 +00:00
Juergen Hoeller 0f75210408 changed exception wording from "recursive" to "cyclic" (SPR-6755) 2010-01-22 19:10:19 +00:00
Juergen Hoeller dd93a40e7a added test for expression re-evaluation 2010-01-22 16:03:17 +00:00
Juergen Hoeller 6fcca3cd93 accept Set<?> instead of Set<Object> (SPR-6742) 2010-01-22 10:03:13 +00:00
Juergen Hoeller 3339356a55 fixed typo (SPR-6748) 2010-01-22 10:02:12 +00:00
Thomas Risberg b7f143ae58 updated reference documentation with references to "spring-agent.jar" to use "org.springframework.instrument-{version}.jar" (SPR-6597) 2010-01-21 16:49:05 +00:00
Juergen Hoeller bcfef8a4e1 support for JPA 2.0 TypedQuery interface and query vendor interfaces (SPR-6733) 2010-01-21 12:04:26 +00:00
Juergen Hoeller 975dcd7bbf fixed inaccuracies (SPR-6723, SPR-6725) 2010-01-20 22:19:13 +00:00
Juergen Hoeller 0a6f2348b8 WebRequest is a resolvable dependency in Servlet/Portlet web application contexts (SPR-6727) 2010-01-20 22:09:13 +00:00
Juergen Hoeller 1b6f3f1f22 Query call chaining works with shared EntityManager proxy outside of transaction as well (SPR-6726) 2010-01-20 15:39:17 +00:00
Juergen Hoeller 081d81e5b0 fixed getPropertyTypeDescriptor to work for nested indexed property as well as for array property (SPR-6710) 2010-01-20 15:31:20 +00:00
Juergen Hoeller 5abd3b99b9 fixed getPropertyTypeDescriptor to work for nested indexed property as well (SPR-6710) 2010-01-20 15:10:22 +00:00
Juergen Hoeller a70bb40b3d updated LocalValidatorFactoryBean documentation (SPR-6609) 2010-01-20 11:13:50 +00:00
Juergen Hoeller 8bf2e2459e added default PropertyEditor for java.util.UUID (SPR-6696) 2010-01-20 09:32:03 +00:00
Juergen Hoeller 45448463b8 collect exceptions across all constructors that have been tried (SPR-6720) 2010-01-20 09:29:50 +00:00
Juergen Hoeller 1896efd048 removed references to Perl5RegexpMethodPointcut (SPR-6721) 2010-01-20 09:24:31 +00:00
Juergen Hoeller 6ffb750171 updated CustomEditorConfigurer example to recommended style (SPR-5971) 2010-01-20 09:20:30 +00:00
Juergen Hoeller d9ed1e953e fixed documentation bugs 2010-01-19 14:40:50 +00:00
Juergen Hoeller 9e642e75b2 removed Commons Collection reference from javadoc (SPR-6716) 2010-01-19 14:20:54 +00:00
Juergen Hoeller a6769d60c0 fixed support for JPA 2.0 persistence schema (SPR-6711) 2010-01-18 19:26:52 +00:00
Juergen Hoeller 7a792f6c23 fixed support for JPA 2.0 persistence schema (SPR-6711) 2010-01-18 19:17:52 +00:00
Juergen Hoeller 95c695eb2f fixed BeanPostProcessor invocation for null bean (SPR-6700) 2010-01-18 18:51:28 +00:00
Juergen Hoeller 7097a9e965 proceed in case of resolution failure for a single resource entry in the list 2010-01-18 18:27:30 +00:00
Juergen Hoeller c31f245dc9 added test for system placeholders in PropertyPlaceholerConfigurer's Resource array property 2010-01-18 15:52:52 +00:00
Juergen Hoeller 88ff3c9a23 only try to restore attribute if the value differs (ignoring Portlet spec attributes; SPR-6712) 2010-01-18 15:51:00 +00:00
Chris Beams f82563fb6f polishing 2010-01-18 15:45:10 +00:00
Chris Beams 4c05eaeb16 Resolved SPR-6602, relating to FactoryBean behavior in @Configuration classes. See issue and code comments for full details. 2010-01-18 08:54:45 +00:00
Arjen Poutsma 1cd0a9750d SPR-6467 - Allow ContentNegotiatingViewResolver to be strict ant return a 406 if no view found 2010-01-15 16:37:58 +00:00
Arjen Poutsma 0cb9271b95 Test for SPR-6690 2010-01-15 11:17:27 +00:00
Arjen Poutsma 8d5fc2bf91 SPR-6686 - @ResponseBody throws HttpMediaTypeNotAcceptableException if client accepts "*/*" 2010-01-15 10:23:59 +00:00
Juergen Hoeller f7952fccc8 fixed sample code (SPR-6687) 2010-01-14 17:01:40 +00:00
Juergen Hoeller 23b0f82173 fixed link to blog entry (SPR-6691) 2010-01-14 16:55:33 +00:00
Juergen Hoeller 0cc0a9bc2b added "concurrency" property to Default/SimpleMessageListenerContainer and JmsActivationSpecConfig, supporting placeholders for the jms namespace "concurrency" attribute now (SPR-6232) 2010-01-14 11:17:15 +00:00
Juergen Hoeller 998aa14981 fixed resolveRootDirResource regression (SPR-6592) 2010-01-13 18:24:16 +00:00
David Syer b077d5ba97 SPR-6678: fix poms for 3.0.1 2010-01-13 11:07:08 +00:00
David Syer e4d8651aa9 RESOLVED - issue SPR-6668: Small Connection leak in DataSourceInitializer
http://jira.springframework.org/browse/SPR-6668
2010-01-13 11:00:41 +00:00
Juergen Hoeller e195c39d3c unresolvable placeholders will be ignored by default for Resource array properties as well (SPR-6654) 2010-01-12 19:50:18 +00:00
Juergen Hoeller 7cbd9e1d93 fixed type assignability check for wildcarded Map (SPR-6676) 2010-01-12 15:31:30 +00:00
Juergen Hoeller 1ff99f2569 MBeanClientInterceptor understands CompositeData/TabularData arrays (SPR-6548) 2010-01-12 15:10:07 +00:00
Juergen Hoeller 2e032889ef added "alwaysTranslate" flag (SPR-6630) 2010-01-12 13:26:22 +00:00
Juergen Hoeller fd3a39dc98 MimeMessageHelper encodes from, to, cc, bcc String addresses with given encoding as well (SPR-6530) 2010-01-12 13:19:50 +00:00
Juergen Hoeller 38cf127c8b mark spring-aop as required for spring-context (SPR-6578) 2010-01-12 12:49:16 +00:00
Juergen Hoeller 0ba8375546 full support for JPA 2.0 PersistenceUnitInfo SPI (for compatibility with Hibernate 3.5 beta 3; SPR-6408) 2010-01-12 12:39:56 +00:00
Juergen Hoeller 5c41e2c6e1 made comment prefix configurable (SPR-6667) 2010-01-12 10:15:04 +00:00
Mark Fisher 410dd0aa9f SPR-6670 @Scheduled now supports property placeholders for cron expressions. 2010-01-11 20:20:33 +00:00
Mark Fisher 1284086ffa SPR-6669 @Scheduled may now be used as a meta-annotation 2010-01-11 18:36:48 +00:00
David Syer 543515e36c RESOLVED - issue SPR-6666: CronTrigger/CronSequenceGenerator fails to handle daylight saving timezone changes 2010-01-11 16:05:12 +00:00
Arjen Poutsma bb3c8e5c87 SPR-6640 - PathVariable does not work properly after updated to 3.0 GA 2010-01-11 11:27:43 +00:00
Juergen Hoeller a70f525d4e fixed toString handling (SPR-5582) 2010-01-09 18:39:03 +00:00
Juergen Hoeller 4ca54fb415 fixed @Scheduled processing to kick in once only even in an ApplicationContext hierarchy (SPR-6656) 2010-01-08 16:00:07 +00:00
Juergen Hoeller 2ef40d2422 fixed typos 2010-01-08 15:47:20 +00:00
Juergen Hoeller b9a3d3f392 polishing 2010-01-07 23:29:13 +00:00
Juergen Hoeller 38f5c7a1d5 added assertion 2010-01-07 23:28:25 +00:00
Juergen Hoeller b56328aa9e replaced references to "spring-agent.jar" with "org.springframework.instrument.jar" (SPR-6597) 2010-01-07 13:32:42 +00:00
Juergen Hoeller 4a90266f8e expose offending value through public "getValue()" method (SPR-6629) 2010-01-07 13:27:40 +00:00
Juergen Hoeller 8af7f27942 ApplicationListeners will only be executed once per event (even for scripted objects; SPR-6589) 2010-01-07 12:58:18 +00:00
Juergen Hoeller 8bda9cd2bf fixed StandardEvaluationContext code sample 2010-01-07 11:59:31 +00:00
Juergen Hoeller a939c4ea4e polishing 2010-01-06 22:24:30 +00:00
Juergen Hoeller c270d347cf DefaultLifecycleProcessor etc 2010-01-06 22:23:55 +00:00
Juergen Hoeller 2ba1dd47b0 allow for identifying a specific JBossWorkManagerMBean (SPR-6648) 2010-01-06 22:15:58 +00:00
Juergen Hoeller 431fd5bb22 allow for overriding specific DefaultLifecycleProcessor hooks (SPR-6617) 2010-01-06 19:48:48 +00:00
Juergen Hoeller 819f4be08e added lock timeout error code for H2 (SPR-6612) 2010-01-06 19:35:15 +00:00
Mark Fisher 4ab4fa7042 SPR-6644 The 'id' value from an 'executor' element in the task namespace is now used as the thread name prefix for the resulting ThreadPoolTaskExecutor instance. 2010-01-05 22:27:47 +00:00
Juergen Hoeller 265084cb6c fixed retriever cache putting 2010-01-05 14:46:15 +00:00
Juergen Hoeller a7a03356f4 revised JSP-based views to never fail when trying to setting forward attributes (SPR-6623) 2010-01-05 14:03:27 +00:00
Juergen Hoeller 4931e8b229 fixed "inner vs. nested class" terminology (SPR-6608) 2010-01-05 14:01:30 +00:00
Juergen Hoeller b594192425 refactored to pass along original ServletContext (for WebLogic and Resin JSP compatibility; SPR-6606) 2010-01-05 13:27:53 +00:00
Juergen Hoeller e5d4ffc166 reset retriever cache when adding/removing listeners (SPR-6624) 2010-01-05 13:09:03 +00:00
Juergen Hoeller f7b0a2c0a2 fixed JavaConfig sample code (SPR-6637, SPR-6638) 2010-01-05 12:58:41 +00:00
Juergen Hoeller 9ca6003533 fixed scoped proxy unwrapping (SPR-6625) 2010-01-05 12:52:28 +00:00
Juergen Hoeller e328083d11 updated manifest for new JPA 2.0 criteria package (SPR-6636) 2010-01-05 12:50:22 +00:00
Chris Beams d1b3f57320 Resolved SPR-6618. Restrictions were too tight on overloaded bean methods and were preventing it altogether. Overloading is now allowed, as long as there is no ambiguity at runtime which bean method should be invoked. 2009-12-30 19:42:12 +00:00
Juergen Hoeller 75d0f9b95c initial preparations for 3.0.1 release 2009-12-28 18:58:07 +00:00
Juergen Hoeller 0fb4af6b59 generic ApplicationListener event type gets detected through proxy as well 2009-12-28 18:57:15 +00:00
Chris Beams d2f28ccf41 SJC-273 resolved minor @Configuration documentation error 2009-12-28 07:00:49 +00:00
Juergen Hoeller bddb38d787 fixed getBeansWithAnnotation to ignore beans with non-determinable type (SPR-6579) 2009-12-23 19:11:19 +00:00
Christian Dupuis f3274624b3 STS-723: fixed ViewControllerBeanDefinitionParser to not rely on instance state for handler mapping and handler adapter bean names 2009-12-22 16:52:33 +00:00
Arjen Poutsma 4160fc85f2 Updated build for 3.0.1 2009-12-17 10:53:15 +00:00
Chris Beams f6228b91e5 Resolved SPR-6187: touch-ups based on mfisher's feedback. 2009-12-16 08:44:54 +00:00
Juergen Hoeller f208988563 polishing 2009-12-15 21:37:59 +00:00
Juergen Hoeller fd1bfeefe4 avoid hard-coded AOP dependency for ScopedObject check 2009-12-15 21:20:51 +00:00
Juergen Hoeller 198911e0d2 removed hard ScopedProxyUtils dependency in ConfigurationClassEnhancer 2009-12-15 20:45:45 +00:00
Juergen Hoeller 776f0490f9 prepared for 3.0 GA release 2009-12-15 20:21:07 +00:00
Juergen Hoeller 2ec39f5000 TypedValue.NULL_TYPED_VALUE -> TypedValue.NULL 2009-12-15 20:19:24 +00:00
Juergen Hoeller dc99df2972 use TypeDescriptor.forObject instead of constructor; enforce use of TypeDescriptor.valueOf through making the constructor private 2009-12-15 20:18:31 +00:00
Keith Donald 7fb19d658b primitive desc caching 2009-12-15 19:55:10 +00:00
Keith Donald 2fef141a00 TypeDescriptor.valueOf usage in favor of constants; TypedValue usage simplification 2009-12-15 19:41:52 +00:00
Keith Donald f37d7082a2 moved public methods up 2009-12-15 18:51:28 +00:00
Keith Donald 39325958bc moved static factory methods up 2009-12-15 18:50:17 +00:00
Juergen Hoeller d6f4f4c7b4 BeanValidationPostProcessor runs in before-initialization phase by default (SPR-6565) 2009-12-15 18:04:44 +00:00
Keith Donald 943c46b07d value of optmization 2009-12-15 17:52:52 +00:00
Keith Donald 8ff801648d object to String not supported test case 2009-12-15 16:07:43 +00:00
Keith Donald 5c7c56a6b3 ObjectToObject converter now only matches public methods/constructors; private class method invocations also supported now through a makeAccessible call 2009-12-15 15:53:11 +00:00
Keith Donald b64945988b general polishing 2009-12-15 15:09:25 +00:00
Keith Donald bb93f5967f removed generic warning 2009-12-15 14:00:27 +00:00
Juergen Hoeller 1c33206042 catch ConversionException and ConvertedNotFoundException in BeanWrapper's convertIfNecessary as well, in order to support constructor resolution (SPR-6563) 2009-12-15 12:53:36 +00:00
Juergen Hoeller 2153b2fbd5 introspect element type in case of incoming Collection/Map in order to not accidentally say canConvert=true (SPR-6564) 2009-12-15 12:36:22 +00:00
Juergen Hoeller 5f9f69958e refined PropertyEditor exposure for the ConversionService case 2009-12-15 11:34:19 +00:00
Chris Beams 0057481a0a SPR-6187: Document @Configuration classes and AnnotationConfig[Web]ApplicationContext 2009-12-15 11:04:25 +00:00
Juergen Hoeller f52986ea15 introduced TypeDescriptor.OBJECT and TypeDescriptor.STRING 2009-12-15 10:21:16 +00:00
Juergen Hoeller 1b0c6b848d only try to convert to String if canConvert returns true 2009-12-15 09:59:11 +00:00
Chris Beams 2764024351 JavaDoc on AnnotationConfigApplicationContext#scan(String...) 2009-12-15 07:24:12 +00:00
Juergen Hoeller 83a7cb9177 SpelExpressionParser etc 2009-12-15 02:05:34 +00:00
Juergen Hoeller 086aeb0aac rearranged spel subpackages in order to avoid package dependency cycle; introduced SpelParserConfiguration object to replace bit flags 2009-12-15 02:03:16 +00:00
Juergen Hoeller b5b1962530 removed MultipartRequest mixin interface again (avoiding a package dependency cycle) 2009-12-15 00:51:32 +00:00
Keith Donald 5b87793521 html multi-page doc now only generates files per chapter consistent with Spring 2.5 2009-12-15 00:18:46 +00:00
Juergen Hoeller 18b5cd101e ConverterRegistry etc 2009-12-14 21:42:54 +00:00
Juergen Hoeller 86475593bb added special handling of String array values for required fields, e.g. for WebRequestDataBinder (SPR-6552) 2009-12-14 21:42:17 +00:00
Juergen Hoeller 26b3443299 added unit test for setRequiredFields with @MVC (SPR-6552) 2009-12-14 21:32:26 +00:00
Juergen Hoeller 6622c71935 revised default converters; renamed ConverterRegistry's addGenericConverter to addConverter 2009-12-14 21:14:26 +00:00
Costin Leau c2e1f113f5 SPR-5764
+ improved JBoss LTW by using the proper class loader for loading reflection types
2009-12-14 18:56:16 +00:00
Chris Beams 77a70f256c further tweaks on logging section 2009-12-14 17:27:27 +00:00
Chris Beams 56dcd9296a minor usage/grammar improvements in logging section 2009-12-14 17:09:52 +00:00
Costin Leau cb4bc58dbd + improved javadoc (no code changes) 2009-12-14 15:52:01 +00:00
Costin Leau b963906bd1 SPR-6447
+ moved petclinic to spring-samples (https://src.springframework.org/svn/spring-samples/petclinic)
2009-12-14 15:51:33 +00:00
Thomas Risberg d016a1cc2f updated version for 3.0 GA release 2009-12-14 12:58:09 +00:00
David Syer c8d65f078b SPR-6558: correct maven repository locations 2009-12-14 07:17:36 +00:00
Keith Donald d7a8d499be long style formatting tests 2009-12-14 02:02:09 +00:00
Juergen Hoeller 2f539cded9 prepared for 3.0 GA release 2009-12-14 00:58:44 +00:00
Juergen Hoeller 6635a5d96d @ManagedBean coverage in javadoc 2009-12-14 00:58:04 +00:00
Juergen Hoeller cb9619f62b support @ManagedBean for name retrieval in AnnotationBeanNameGenerator as well; support @ManagedBean and @Named for direct use only 2009-12-14 00:53:56 +00:00
Juergen Hoeller 59d9f73f46 ignore client proxies for export 2009-12-13 23:50:48 +00:00
Juergen Hoeller 3cfac84bff updated javadoc (SPR-6546) 2009-12-13 23:45:16 +00:00
Juergen Hoeller 1b8a67d5d7 reimplemented bean lookup to avoid getBeanNamesForType(Object.class) 2009-12-13 23:30:07 +00:00
Juergen Hoeller dc6c1dc727 MBeanExporter detects FactoryBean-exported resources independent from declaration order 2009-12-13 23:28:07 +00:00
Juergen Hoeller db6e807421 removed getBeansWithAnnotation(Class,boolean,boolean) method from ListableBeanFactory; reimplemented getBeansWithAnnotation(Class) to avoid use of getBeanNamesForType(Object.class) 2009-12-13 23:24:43 +00:00
Juergen Hoeller d7a1630381 removed getBeansWithAnnotation(Class,boolean,boolean) method from ListableBeanFactory; reimplemented getBeansWithAnnotation(Class) to avoid use of getBeanNamesForType(Object.class) 2009-12-13 23:23:34 +00:00
Juergen Hoeller 929665d284 fixed accidental breakage in bean class resolution with tempClassLoader 2009-12-13 16:07:03 +00:00
Juergen Hoeller 9d2f7934de fixed non-Lifecycle-FactoryBean with exposed Lifecycle object case (SPR-6545) 2009-12-13 15:47:52 +00:00
Juergen Hoeller 35354ad520 polishing 2009-12-13 15:30:52 +00:00
Juergen Hoeller 42c7be4590 SmartLifecycle retrieval fix, properly taking FactoryBeans into account (SPR-6545) 2009-12-13 15:28:34 +00:00
Juergen Hoeller a0c4d2c13c detect Lifecycle-implementing FactoryBeans as well (SPR-6545) 2009-12-13 14:08:08 +00:00
Juergen Hoeller 5f9b444319 bean properties of type enum array/collection can be populated with comma-separated String (SPR-6547) 2009-12-13 13:21:30 +00:00
Juergen Hoeller b497f6ccad fixed JSR-303 Validator delegation code (SPR-6557) 2009-12-13 12:31:34 +00:00
David Syer 63996cbb06 SPR-6541: move spring repository placeholder into a profile (build) and the other repositories into another profile (legacy-build) 2009-12-13 10:03:59 +00:00
Christian Dupuis 7c6c1c3ad8 some minor adjustments to the mvc namespace to make it work in the tools 2009-12-11 23:03:49 +00:00
Keith Donald 14b69148f9 file names based on section id now; updated sec ids to match conventions 2009-12-11 19:01:25 +00:00
Keith Donald b673087a87 polish 2009-12-11 18:26:12 +00:00
Keith Donald 541cf2de80 removed unused method; polishing 2009-12-11 18:24:44 +00:00
Keith Donald 753d0b0c91 removed generic warning 2009-12-11 18:19:43 +00:00
Keith Donald 027bd24260 polish 2009-12-11 18:16:38 +00:00
Keith Donald 4f4732df45 javadoc polishing 2009-12-11 17:56:41 +00:00
Keith Donald 8d4b9c0810 javadoc 2009-12-11 16:55:33 +00:00
Keith Donald 5ce16e01eb broke out collection to string converter logic from collection to object 2009-12-11 14:45:21 +00:00
David Syer 143ce57e76 SPR-6541: consolidate repositories into a profile (-P build) 2009-12-11 06:23:46 +00:00
Juergen Hoeller e1d5c7310a updated JPA 2.0 support to the final spec (supporting the "getCriteriaBuilder" method) 2009-12-10 21:42:48 +00:00
Juergen Hoeller 859f422cbf component scanning autodetects the new EE 6 "javax.annotation.ManagedBean" stereotype 2009-12-10 20:40:02 +00:00
Juergen Hoeller 77f07da49d autodetect GlassFish V3 as well (SPR-6152) 2009-12-10 18:42:59 +00:00
Keith Donald 96de14ef2e SPR-6537 initial commit; more extensive testing to follow 2009-12-10 17:36:58 +00:00
Keith Donald dd1bbde891 removed generic warning 2009-12-10 16:21:30 +00:00
Arjen Poutsma 04e08d6952 Updated docbook files to use Docbook 4.5 DTDs, so it uses the locally cached versions 2009-12-10 15:22:55 +00:00
Arjen Poutsma 4c76b48fd6 Updated Multipart documentation 2009-12-10 12:37:28 +00:00
Juergen Hoeller dc1b500430 preparations for 3.0 GA 2009-12-09 22:44:11 +00:00
Juergen Hoeller 1e1964a060 reintroduced createBinder template method in Servlet/Portlet AnnotationMethodHandlerAdapter (SPR-6534) 2009-12-09 22:29:43 +00:00
Juergen Hoeller 2ce5090d00 polishing 2009-12-09 17:54:02 +00:00
Juergen Hoeller 8334a03e03 added "converters" property to FormattingConversionServiceFactoryBean as well 2009-12-09 17:53:25 +00:00
Juergen Hoeller bc6b707a22 revised GenericConverter's "getConvertibleTypes()" signature to return Set of ConvertiblePair 2009-12-09 17:52:19 +00:00
Juergen Hoeller 010e72c35a GenericConversionService prefers matches against inherited interfaces over superclasses (SPR-6297) 2009-12-09 16:16:55 +00:00
Juergen Hoeller ad29a2376d PropertyPlaceholderConfigurer is compatible with Spring 2.5 extensions such as GigaSpaces again (SPR-6514) 2009-12-09 16:09:12 +00:00
Juergen Hoeller 3ffc2ba48d revised section on inheriting annotations from interfaces 2009-12-09 15:32:58 +00:00
Juergen Hoeller 31144591b0 revised javadoc (SPR-5720) 2009-12-09 15:24:47 +00:00
Juergen Hoeller 8b0a4921d9 removed unnecessary logging 2009-12-09 14:59:44 +00:00
Costin Leau 74022861c5 SPR-6492
+ upgrade to JRuby 1.4.0
2009-12-09 10:57:54 +00:00
Chris Beams 481dd31006 Renamed tests for AnnotationConfig[Web]ApplicationContext; added tests for scan() and register() methods. 2009-12-08 15:29:27 +00:00
Juergen Hoeller 736c7212db SmartLifecycle beans will get auto-started on demand even if marked as lazy-init (SPR-6515) 2009-12-08 13:27:15 +00:00
Juergen Hoeller 93b17042a2 SmartLifecycle beans will get auto-started on demand even if marked as lazy-init (SPR-6515) 2009-12-08 12:17:01 +00:00
Juergen Hoeller e65ba99e23 use varargs for scan method as well 2009-12-08 10:17:27 +00:00
Costin Leau 95ddeff17d SPR-6492
EBR-551
+ seems I spoke too soon - JRuby is still not in the EBR
2009-12-08 09:19:32 +00:00
Costin Leau 085aecd51f SPR-6492
+ upgrade to JRuby 1.4.0
2009-12-08 08:57:48 +00:00
Juergen Hoeller c4d8f6b3eb extended registerAfterCompletionWithExistingTransaction's exception handling to detect JBoss RollbackException as well (SPR-6450) 2009-12-07 20:53:21 +00:00
Juergen Hoeller 5fdc29f152 polishing 2009-12-07 20:33:33 +00:00
Juergen Hoeller 1d005e12af fail when @DateTimeFormat is being used without JodaTime on the classpath (SPR-6508) 2009-12-07 20:33:03 +00:00
Juergen Hoeller 61f23710eb relaxed warning about ambiguous setters to only be logged in case of actual write access (SPR-6399) 2009-12-07 18:57:32 +00:00
Arjen Poutsma 27e0642543 SPR-6502 - Broken @RequestMapping inheritance 2009-12-07 16:44:51 +00:00
Juergen Hoeller 09a55c8ede import works with relative resources in other classpath roots again (SPR-6493) 2009-12-07 15:16:36 +00:00
Arjen Poutsma 231c8337d2 SPR-6529 - DateTimeFormatAnnotationFormatterFactory calls String.isEmpty(), which exists only in JDK1.6+ 2009-12-07 14:41:30 +00:00
Juergen Hoeller 93abbd0ef7 newTransactionStatus reverted to its original role, just without preparing synchronization (SPR-6521) 2009-12-07 14:27:27 +00:00
Arjen Poutsma 8678652f3e SPR-6528 - PathVariables of type double 2009-12-07 14:25:21 +00:00
Arjen Poutsma 976f920db2 SPR-6482 - @RequestMapping handled incorrectly when value contains "." (dot) character 2009-12-07 13:59:07 +00:00
Juergen Hoeller f36e8252c8 polishing 2009-12-07 09:43:16 +00:00
Juergen Hoeller f72769a621 added order property to AnnotationMethodHandlerAdapter (SPR-6516) 2009-12-07 09:42:44 +00:00
Juergen Hoeller abf6a7ee18 made parse and decorate non-final (SPR-6526) 2009-12-07 09:16:00 +00:00
Andy Clement 33a7bbb485 SPR-6525: avoid need to use #root for method parameter references 2009-12-06 23:21:07 +00:00
Sam Brannen e01c2eafa1 Fixed copy-n-paste errors. 2009-12-04 23:31:28 +00:00
David Syer f4763a801f SPR-5327: Duh: broken build - invalid XML. 2009-12-04 21:39:32 +00:00
Sam Brannen 11d2921767 Removed reference to the British musical and multimedia group "the the". ;) 2009-12-04 20:43:45 +00:00
Juergen Hoeller 0ea5b5ef0b opened up RestTemplate method signatures to Map<String, ?> and Object array instead of enforcing String values 2009-12-04 18:29:53 +00:00
David Syer ad3fa505f3 SPR-5327: tweak the build.xml for core to try and make commons-logging optional in generated poms 2009-12-04 18:26:25 +00:00
David Syer 1202f67cc8 SPR-5327: tweak the ivy.xml so that commons-logging is a separate configuration. It already comes out as optional in the generated poms (including core), which isn't great, but I can't see what is causing that 2009-12-04 18:25:31 +00:00
Juergen Hoeller 12892eef98 fixed String size constraint example (SPR-6517) 2009-12-04 17:29:06 +00:00
Juergen Hoeller 0d413c7e36 reverted schema update implementation for Hibernate 3.2 compatibility (SPR-6509) 2009-12-04 17:19:47 +00:00
David Syer 604a9f077d SPR-5327: update artifact ids 2009-12-04 16:15:20 +00:00
David Syer fae06dc156 SPR-6092: clarify jar name in test docs 2009-12-04 15:21:51 +00:00
David Syer 5013664ec5 BATCH-5327: Correct name of SLF4J 2009-12-04 14:00:58 +00:00
David Syer ebd15e3287 SPR-6092: add section on Ivy 2009-12-04 12:47:47 +00:00
David Syer 0400ccc11f SPR-5327: tidy up aopalliance dependency 2009-12-04 11:33:56 +00:00
David Syer d1dfa873b7 SPR-6092: add section on EBR/Maven and tidy up references to jar files throughout 2009-12-04 11:21:04 +00:00
Juergen Hoeller 95fb766d10 initial preparations for 3.0 GA 2009-12-04 00:58:38 +00:00
Juergen Hoeller e161c93f8d full support for formatters on array/collection elements (SPR-6504) 2009-12-04 00:34:40 +00:00
Juergen Hoeller 388edd7aaa lenient property name casing, beyond standard JavaBeans conventions (SPR-6491) 2009-12-03 23:34:37 +00:00
Juergen Hoeller 0a36596468 do not register default formatters for Date and Calendar (requiring explicit use of @DateTimeFormat there) 2009-12-03 23:26:08 +00:00
Juergen Hoeller 73a75220a8 do not register a default NumberFormatter (SPR-6490) 2009-12-03 22:41:44 +00:00
Juergen Hoeller ac3a1d9132 added since tag 2009-12-03 16:30:51 +00:00
Juergen Hoeller fcfe94139c updated required Hibernate version 2009-12-03 13:18:39 +00:00
Juergen Hoeller b16e502c16 fixed typo 2009-12-03 13:17:08 +00:00
Juergen Hoeller 0b577dd558 fixed dependencies 2009-12-03 13:15:33 +00:00
Sam Brannen 4093935275 JavaDoc polishing 2009-12-02 09:34:12 +00:00
David Syer 277d153604 Add trailing / to repository URLs on S3 (improves build time for clients) 2009-12-02 08:26:13 +00:00
1503 changed files with 66866 additions and 35857 deletions
+13
View File
@@ -0,0 +1,13 @@
.springBeans
.DS_Store
target
integration-repo
ivy-cache
jmx.log
jxl.log
jmx.log
org.springframework.jdbc/derby.log
org.springframework.spring-parent/.classpath
org.springframework.spring-parent/.project
org.springframework.test/test-output/
spring-build/lib/docbook
+10 -5
View File
@@ -1,10 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="build-spring-framework" default="precommit">
<path id="bundles">
<path id="unit.test.bundles">
<pathelement location="../org.springframework.instrument"/>
<pathelement location="../org.springframework.instrument.tomcat"/>
<pathelement location="../org.springframework.asm"/>
<pathelement location="../org.springframework.core"/>
<pathelement location="../org.springframework.expression"/>
<pathelement location="../org.springframework.beans"/>
@@ -13,17 +12,23 @@
<pathelement location="../org.springframework.transaction"/>
<pathelement location="../org.springframework.oxm"/>
<pathelement location="../org.springframework.jms"/>
<pathelement location="../org.springframework.aspects"/>
<pathelement location="../org.springframework.jdbc"/>
<pathelement location="../org.springframework.web"/>
<pathelement location="../org.springframework.orm"/>
<pathelement location="../org.springframework.context.support"/>
<pathelement location="../org.springframework.aspects"/>
<pathelement location="../org.springframework.web.servlet"/>
<pathelement location="../org.springframework.web.portlet"/>
<pathelement location="../org.springframework.test"/>
<pathelement location="../org.springframework.web.struts"/>
<pathelement location="../org.springframework.spring-library"/>
</path>
<path id="bundles">
<pathelement location="../org.springframework.spring-parent"/>
<pathelement location="../org.springframework.asm"/>
<path refid="unit.test.bundles" />
<pathelement location="../org.springframework.integration-tests"/>
<pathelement location="../org.springframework.spring-library"/>
</path>
<property file="${basedir}/../build.properties"/>
@@ -32,7 +37,7 @@
<import file="${basedir}/publish-documentation.xml"/>
<import file="${basedir}/../spring-build/multi-bundle/default.xml"/>
<target name="precommit" depends="clean,clean-integration,test"/>
<target name="precommit" depends="clean, clean-integration, test"/>
<presetdef name="javadoc.links">
<javadoc>
-131
View File
@@ -1,131 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="generate-poms" xmlns:ivy="antlib:org.apache.ivy.ant">
<property file="${basedir}/../build.properties"/>
<import file="${basedir}/../spring-build/multi-bundle/default.xml"/>
<path id="modules-to-process">
<pathelement location="../org.springframework.instrument"/>
<pathelement location="../org.springframework.instrument.tomcat"/>
<pathelement location="../org.springframework.asm"/>
<pathelement location="../org.springframework.core"/>
<pathelement location="../org.springframework.expression"/>
<pathelement location="../org.springframework.beans"/>
<pathelement location="../org.springframework.aop"/>
<pathelement location="../org.springframework.context"/>
<pathelement location="../org.springframework.transaction"/>
<pathelement location="../org.springframework.oxm"/>
<pathelement location="../org.springframework.jms"/>
<pathelement location="../org.springframework.aspects"/>
<pathelement location="../org.springframework.jdbc"/>
<pathelement location="../org.springframework.web"/>
<pathelement location="../org.springframework.orm"/>
<pathelement location="../org.springframework.context.support"/>
<pathelement location="../org.springframework.web.servlet"/>
<pathelement location="../org.springframework.web.portlet"/>
<pathelement location="../org.springframework.test"/>
<pathelement location="../org.springframework.web.struts"/>
</path>
<condition property="maven.extension" value=".bat" else="">
<os family="windows"/>
</condition>
<property name="mvn.exe" value="mvn${maven.extension}"/>
<target name="test">
<echo message="pom version = ${project.version}"/>
</target>
<target name="generate-pom" depends="ivy.init">
<all-bundles target="do-generate-pom" buildpathRef="modules-to-process"/>
</target>
<target name="generate-pom-test">
<all-bundles target="do-generate-pom-test" buildpathRef="modules-to-process"/>
</target>
<target name="do-generate-pom" depends="ivy.init">
<delete file="pom.xml" quiet="true"/>
<delete file="central-pom.xml" quiet="true"/>
<ivy:makepom ivyfile="ivy.xml" pomfile="pom.xml">
<mapping conf="compile" scope="compile"/>
<mapping conf="test" scope="test"/>
<mapping conf="provided" scope="provided"/>
<mapping conf="runtime" scope="runtime"/>
</ivy:makepom>
<xmlproperty file="../org.springframework.spring-library/pom.xml"/>
<replaceregexp file="pom.xml"
match="&lt;version>.*?&lt;/version>"
replace="&lt;version>@project-version@&lt;/version>" />
<exec executable="${mvn.exe}" failonerror="true">
<arg line="org.springframework.build.repository:org.springframework.build.repository.maven:create-central"/>
</exec>
<move file="pom.xml" tofile="pom-bundle.xml"/>
<move file="central-pom.xml" tofile="pom.xml"/>
<replace file="pom.xml">
<replacetoken><![CDATA[ <version>@project-version@</version>]]></replacetoken>
<replacevalue><![CDATA[ <version>@project-version@</version>
<parent>
<groupId>org.springframework</groupId>
<artifactId>spring-parent</artifactId>
<relativePath>../org.springframework.spring-parent</relativePath>
<version>@project-version@</version>
</parent>
]]></replacevalue>
</replace>
<replace file="pom.xml" token="@project-version@" value="${project.version}"/>
<replace file="pom.xml" token="latest.integration" value="${project.version}"/>
<fixcrlf srcDir="."
eol="lf"
eof="remove"
includes="pom.xml"/>
</target>
<target name="remove-unresolved-references">
<!-- TODO in spring-context these are only found in S2 bundle repo, not maven central -->
<replace file="pom.xml">
<replacetoken><![CDATA[<dependency>
<groupId>com.oracle.oc4j</groupId>
<artifactId>oracle.classloader</artifactId>
<version>10.1.3.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.sun.enterprise</groupId>
<artifactId>com.sun.enterprise.loader</artifactId>
<version>1.0</version>
<scope>provided</scope>
</dependency>
]]></replacetoken>
<replacevalue><![CDATA[]]></replacevalue>
</replace>
</target>
<target name="do-generate-pom-test">
<exec executable="${mvn.exe}" failonerror="true">
<env key="MAVEN_TERMINATE_CMD" value="on" />
<arg line="-P stage,fast install"/>
</exec>
</target>
</project>
@@ -1,8 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="package-bundle">
<import file="publish-maven.xml"/>
<target name="package" depends="ivy.init">
<dist-jar/>
<src-jar/>
@@ -1,8 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="package-library">
<import file="publish-maven.xml"/>
<target name="package" depends="ivy.init">
<dist-jar/>
</target>
+7 -8
View File
@@ -41,7 +41,6 @@
<exclude name="*/target/**"/>
<exclude name="integration-repo/**"/>
<exclude name="ivy-cache/**"/>
<!--exclude name="ivy-cache/repository/org.apache.velocity/org.apache.velocity.docbookframework.dist/**"/-->
<exclude name="spring-build/lib/docbook/**" />
<exclude name="**/*OLD*/**"/>
</fileset>
@@ -56,19 +55,19 @@
<zip destfile="${package.output.file}">
<zipfileset dir="${package.dir}">
<exclude name="${package.basename}/docs/**"/>
<exclude name="${package.basename}/projects/ivy-cache/**"/>
</zipfileset>
</zip>
<zip destfile="${artifacts.dir}/${package.basename}-with-docs.zip">
<zipfileset dir="${package.dir}">
<exclude name="${package.basename}/projects/ivy-cache/**"/>
</zipfileset>
<zipfileset dir="${package.dir}"/>
</zip>
<!--zip destfile="${artifacts.dir}/${package.basename}-with-dependencies.zip">
<zipfileset dir="${package.dir}"/>
</zip-->
<zip destfile="${artifacts.dir}/${package.basename}-dependencies.zip">
<zipfileset dir="${basedir}/../ivy-cache/repository">
<exclude name="org.apache.velocity/org.apache.velocity.docbookframework.dist/**"/>
</zipfileset>
</zip>
</target>
</project>
-101
View File
@@ -1,101 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<!--
This POM cannot be used to build Spring; it is a work in progress and should only be used as
part of a Maven repository upload bundle using artifacts created by the spring build system.
-->
<modelVersion>4.0.0</modelVersion>
<groupId>org.springframework</groupId>
<artifactId>spring</artifactId>
<packaging>pom</packaging>
<version>3.0.0.BUILD-SNAPSHOT</version>
<name>Spring Framework</name>
<description>Spring is a layered Java/J2EE application platform, based on code published in Expert
One-on-One J2EE Design and Development by Rod Johnson (Wrox, 2002). </description>
<url>http://www.springframework.org</url>
<issueManagement>
<system>JIRA</system>
<url>http://jira.springframework.org/browse/SPR</url>
</issueManagement>
<ciManagement>
<system>Bamboo</system>
<url>https://build.springframework.org/browse/SPR</url>
</ciManagement>
<inceptionYear>2003</inceptionYear>
<organization>
<name>SpringSource</name>
<url>http://www.springsource.com</url>
</organization>
<licenses>
<license>
<name>The Apache Software License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<url>https://fisheye.springframework.org/browse/spring-framework</url>
<connection>scm:svn:https://src.springframework.org/svn/spring-framework/trunk</connection>
<developerConnection>scm:svn:https://src.springframework.org/svn/spring-framework/trunk</developerConnection>
</scm>
<mailingLists>
<mailingList>
<name> Spring Forum
</name>
<post>http://forum.springframework.org</post>
<archive>http://forum.springframework.org</archive>
</mailingList>
</mailingLists>
<modules>
<module>../org.springframework.spring-parent</module>
<module>../org.springframework.instrument</module>
<module>../org.springframework.instrument.tomcat</module>
<module>../org.springframework.asm</module>
<module>../org.springframework.core</module>
<module>../org.springframework.expression</module>
<module>../org.springframework.beans</module>
<module>../org.springframework.aop</module>
<module>../org.springframework.context</module>
<module>../org.springframework.transaction</module>
<module>../org.springframework.oxm</module>
<module>../org.springframework.jms</module>
<module>../org.springframework.aspects</module>
<module>../org.springframework.jdbc</module>
<module>../org.springframework.web</module>
<module>../org.springframework.orm</module>
<module>../org.springframework.context.support</module>
<module>../org.springframework.web.servlet</module>
<module>../org.springframework.web.portlet</module>
<module>../org.springframework.test</module>
<module>../org.springframework.web.struts</module>
</modules>
<profiles>
<profile>
<id>staging</id>
<distributionManagement>
<site>
<id>staging</id>
<url>file:///${user.dir}/target/staging</url>
</site>
<repository>
<id>staging</id>
<url>file:///${user.dir}/target/staging</url>
</repository>
<snapshotRepository>
<id>staging</id>
<url>file:///${user.dir}/target/staging</url>
</snapshotRepository>
</distributionManagement>
</profile>
</profiles>
</project>
@@ -3,10 +3,10 @@
<!-- Main targets -->
<target name="publish-documentation" depends="publish-documentation.init">
<sshexec host="spring02.managed.contegix.com" username="${username}" keyfile="${key.file}" passphrase="${passphrase}"
<sshexec host="static.springsource.org" username="${username}" keyfile="${key.file}" passphrase="${passphrase}"
command="mkdir /opt/www/domains/springframework.org/www/htdocs/spring/docs/${bundle.version}"/>
<scp remoteToDir="${username}@spring02.managed.contegix.com:/opt/www/domains/springframework.org/www/htdocs/spring/docs/${bundle.version}"
<scp remoteToDir="${username}@static.springsource.org:/opt/www/domains/springframework.org/www/htdocs/spring/docs/${bundle.version}"
keyfile="${key.file}" passphrase="${passphrase}" sftp="true" verbose="true">
<fileset dir="${package.output.dir}">
<include name="changelog.txt" />
@@ -16,7 +16,7 @@
<fileset dir="${package.docs.dir}" />
</scp>
<sshexec host="spring02.managed.contegix.com" username="${username}" keyfile="${key.file}" passphrase="${passphrase}"
<sshexec host="static.springsource.org" username="${username}" keyfile="${key.file}" passphrase="${passphrase}"
command="rm /opt/www/domains/springframework.org/www/htdocs/spring/docs/3.0.x ; ln -s /opt/www/domains/springframework.org/www/htdocs/spring/docs/${bundle.version} /opt/www/domains/springframework.org/www/htdocs/spring/docs/3.0.x"/>
</target>
-95
View File
@@ -1,95 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="publish-maven-central-only-pom" xmlns:maven="antlib:org.apache.maven.artifact.ant">
<description>
This build file publishes to a maven repository and two ways.
1. Publish jar, source-jar, and pom artifacts.
2. Publish only the pom artifact.
The additional complexity in the implementation is due to a bug in the maven ant tasks version 2.0.8 that
prevents deploying to a local file repository on windows.
</description>
<condition property="is.windows" value="windows">
<os family="windows"/>
</condition>
<!-- top level targets -->
<target name="publish-maven-central-only-pom-artifacts" depends="publish-central-only-pom-windows,publish-central-only-pom-unix">
</target>
<target name="publish-maven-central-code-artifacts" depends="publish-central-windows,publish-code-unix">
</target>
<target name="publish-maven-milestone-only-pom-artifacts" depends="maven.init">
<maven:deploy>
<remoteRepository url="s3://${publish.bucket}/maven/bundles/${adjusted.release.type}">
<authentication username="${accessKey}" passphrase="${secretKey}"/>
</remoteRepository>
<pom file="${local.pom.output.file}"/>
</maven:deploy>
</target>
<target name="publish-maven-milestone-code-artifacts" depends="maven.init">
<maven:deploy file="${jar.output.file}">
<remoteRepository url="s3://${publish.bucket}/maven/bundles/${adjusted.release.type}">
<authentication username="${accessKey}" passphrase="${secretKey}"/>
</remoteRepository>
<pom file="${pom.output.file}"/>
<attach file="${source-jar.output.file}" classifier="sources"/>
</maven:deploy>
</target>
<target name="install-pom" depends="maven.init">
<maven:install>
<pom file="${local.pom.output.file}"/>
</maven:install>
</target>
<!-- Supporting targets -->
<!-- POM only deployment -->
<target name="publish-central-only-pom-windows" depends="maven.init" if="is.windows">
<maven:deploy>
<!-- Due to http://jira.codehaus.org/browse/MANTTASKS-103 in 2.0.8 on windows, fixed in 2.0.9 -->
<!-- Assuming using local file, value of variable should be of the form L:\temp\maven-repo-test -->
<remoteRepository id="localDisk" url="file:${maven.central.repository}"/>
<pom file="${local.pom.output.file}"/>
</maven:deploy>
</target>
<target name="publish-central-only-pom-unix" depends="maven.init" unless="is.windows">
<maven:deploy>
<remoteRepository url="${maven.central.repository}"/>
<pom file="${local.pom.output.file}"/>
</maven:deploy>
</target>
<!-- jar, source-jar and POM deployment -->
<target name="publish-central-windows" depends="maven.init">
<maven:deploy file="${jar.output.file}">
<!-- Due to http://jira.codehaus.org/browse/MANTTASKS-103 in 2.0.8 on windows, fixed in 2.0.9 -->
<!-- Assuming using local file, value of variable should be of the form L:\temp\maven-repo-test -->
<remoteRepository id="localDisk" url="file:${maven.central.repository}"/>
<pom file="${local.pom.output.file}"/>
<attach file="${source-jar.output.file}" classifier="sources"/>
</maven:deploy>
</target>
<target name="publish-code-unix" depends="maven.init" unless="is.windows">
<maven:deploy file="${jar.output.file}">
<remoteRepository url="${maven.central.repository}"/>
<pom file="${local.pom.output.file}"/>
<attach file="${source-jar.output.file}" classifier="sources"/>
</maven:deploy>
</target>
</project>
+6 -6
View File
@@ -7,7 +7,7 @@
<target name="publish-package" depends="aws.init">
<checksum file="${package.output.file}" algorithm="sha1"/>
<checksum file="${artifacts.dir}/${package.basename}-with-docs.zip" algorithm="sha1"/>
<!--checksum file="${artifacts.dir}/${package.basename}-with-dependencies.zip" algorithm="sha1"/-->
<checksum file="${artifacts.dir}/${package.basename}-dependencies.zip" algorithm="sha1"/>
<aws:s3 accessKey="${accessKey}" secretKey="${secretKey}">
<upload bucketName="dist.${bucket.basename}" file="${package.output.file}"
@@ -30,15 +30,15 @@
<upload bucketName="dist.${bucket.basename}" file="${artifacts.dir}/${package.basename}-with-docs.zip.sha1"
toFile="${adjusted.release.type}/${project.key}/${package.basename}-with-docs.zip.sha1" publicRead="true"/>
<!--upload bucketName="dist.${bucket.basename}" file="${artifacts.dir}/${package.basename}-with-dependencies.zip"
toFile="${adjusted.release.type}/${project.key}/${package.basename}-with-dependencies.zip" publicRead="true">
<upload bucketName="dist.${bucket.basename}" file="${artifacts.dir}/${package.basename}-dependencies.zip"
toFile="${adjusted.release.type}/${project.key}/${package.basename}-dependencies.zip" publicRead="true">
<metadata name="project.name" value="Spring Framework"/>
<metadata name="release.type" value="${release.type}"/>
<metadata name="bundle.version" value="${bundle.version}"/>
<metadata name="package.file.name" value="${package.basename}-with-dependencies.zip"/>
<metadata name="package.file.name" value="${package.basename}-dependencies.zip"/>
</upload>
<upload bucketName="dist.${bucket.basename}" file="${artifacts.dir}/${package.basename}-with-dependencies.zip.sha1"
toFile="${adjusted.release.type}/${project.key}/${package.basename}-with-dependencies.zip.sha1" publicRead="true"/-->
<upload bucketName="dist.${bucket.basename}" file="${artifacts.dir}/${package.basename}-dependencies.zip.sha1"
toFile="${adjusted.release.type}/${project.key}/${package.basename}-dependencies.zip.sha1" publicRead="true"/>
</aws:s3>
</target>
</project>
-58
View File
@@ -1,58 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="publish-spring-framework" xmlns:maven="antlib:org.apache.maven.artifact.ant">
<property file="${basedir}/../build.properties"/>
<import file="${basedir}/../spring-build/multi-bundle/default.xml"/>
<path id="modules-with-code-artifacts">
<pathelement location="../org.springframework.instrument"/>
<pathelement location="../org.springframework.instrument.tomcat"/>
<pathelement location="../org.springframework.asm"/>
<pathelement location="../org.springframework.core"/>
<pathelement location="../org.springframework.expression"/>
<pathelement location="../org.springframework.beans"/>
<pathelement location="../org.springframework.aop"/>
<pathelement location="../org.springframework.context"/>
<pathelement location="../org.springframework.transaction"/>
<pathelement location="../org.springframework.oxm"/>
<pathelement location="../org.springframework.jms"/>
<pathelement location="../org.springframework.aspects"/>
<pathelement location="../org.springframework.jdbc"/>
<pathelement location="../org.springframework.web"/>
<pathelement location="../org.springframework.orm"/>
<pathelement location="../org.springframework.context.support"/>
<pathelement location="../org.springframework.web.servlet"/>
<pathelement location="../org.springframework.web.portlet"/>
<pathelement location="../org.springframework.test"/>
<pathelement location="../org.springframework.web.struts"/>
</path>
<path id="modules-with-only-pom-artifacts">
<pathelement location="../org.springframework.spring-library"/>
<pathelement location="../org.springframework.spring-parent"/>
</path>
<!-- for milestones -->
<target name="publish-maven-milestone" depends="publish-maven-milestone-only-pom">
<all-bundles target="publish-maven-milestone-code-artifacts" buildpathRef="modules-with-code-artifacts"/>
</target>
<target name="publish-maven-milestone-only-pom">
<all-bundles target="publish-maven-milestone-only-pom-artifacts" buildpathRef="modules-with-only-pom-artifacts"/>
</target>
<!-- for releases -->
<target name="publish-maven-central-release" depends="publish-maven-central-only-pom-release">
<all-bundles target="publish-maven-central-code-artifacts" buildpathRef="modules-with-code-artifacts"/>
</target>
<target name="publish-maven-central-only-pom-release">
<all-bundles target="publish-maven-central-only-pom-artifacts" buildpathRef="modules-with-only-pom-artifacts"/>
</target>
</project>
@@ -3,6 +3,386 @@ SPRING FRAMEWORK CHANGELOG
http://www.springsource.org
Changes in version 3.0.7 (2011-12-22)
-------------------------------------
* fixed GenericTypeResolver to consistently return null if not resolvable
* added proper "contentLength()" implementation to ByteArrayResource
* refined Resource "exists()" check for HTTP URLs to always return false for 404 status
* LocaleEditor and StringToLocaleConverter do not restrict variant part through validation
* LinkedCaseInsensitiveMap overrides putAll method as well (for IBM JDK 1.6 compatibility)
* ConversionService prevents Converter from trying to convert to a subtype of its actual target type
* ConversionService is able to work with "Collections.emptyList()" as target type (again)
* CollectionCollection/MapToMapConverter preserve original Collection/Map if no converted elements
* fixed nested element conversion with a DataBinder + ConversionService + PropertyEditor
* restored DataBinder's ability to bind to an auto-growing List with unknown element type
* optimized DefaultListableBeanFactory's PropertyDescriptor caching for concurrent access
* context:property-placeholder's "file-encoding" attribute value is being applied correctly
* SpringValidatorAdapter accepts non-indexed set paths (for Hibernate Validator compatibility)
* fixed AbstractAsyncExecutionAspect's setExecutor method to correctly wrap in a TaskExecutorAdapter
* @Transactional qualifiers match against transaction manager definitions in parent contexts as well
* TransactionSynchronizationManager eagerly cleans up void ResourceHolders on any access
* updated H2 error codes in sql-error-codes.xml
* fixed NamedParameterJdbcTemplate to use correct maximum type for queryForInt/Long
* SimpleJdbcTestUtils executeSqlScript properly closes its LineNumberReader after use
* Hibernate synchronization properly unbinds Session even in case of afterCompletion exception
* JDO PersistenceManager synchronization performs close attempt after completion (if necessary)
* JPA EntityManagerFactoryUtils silently ignores IllegalArgumentExceptions from setHint calls
* added "forwarder" property to ConnectorServerFactoryBean, accepting an MBeanServerForwarder
* JmsInvokerClientInterceptor/FactoryBean always uses createConnection/createSession when on JMS 1.1
* RmiClientInterceptor detects nested SocketException as connect failure as well
* Servlet/PortletContextResource's getFile prefers "file:" URL resolution over calling getRealPath
* Portlet session mutex uses global session attribute to be shared among all portlets in the session
* fixed ServletServerHttpRequest to reconstruct from "request.getParameterMap()" for form POST only
* fixed @RequestMapping header matching to correctly process negated header conditions
* added "getObjectMapper()" accessor to MappingJacksonHttpMessageConverter
* ResourceHttpRequestHandler sends content without content-type header if no media type found
* AbstractCachingViewResolver allows for caching unresolved view names ("cacheUnresolved"=true)
* fixed "formMultiSelect"/"formCheckboxes" FreeMarker macros to compare against actual field value
Changes in version 3.0.6 (2011-08-18)
-------------------------------------
* fixed aspects bundle to declare dependencies for @Async aspect as well
* ProxyCreationContext uses "ThreadLocal.remove()" over "ThreadLocal.set(null)" as well
* DefaultListableBeanFactory is only deserializable through a SerializedBeanFactoryReference
* DefaultListableBeanFactory's getBean(name, type) attempts type conversion if necessary
* DefaultListableBeanFactory allows for init methods to register further bean definitions (again)
* XmlBeanDefinitionReader accepts description subelement within map entry as well (as per the XSD)
* ConfigurationClassPostProcessor supports use of same processor instance with several factories
* fixed potential InjectionMetadata NPE when using SpringBeanAutowiringInterceptor
* SpringBeanAutowiringSupport is able to process @Value annotations on any given target instance
* overridden @PersistenceContext annotations on subclass methods are being processed correctly
* BeanDefinitionVisitor now actually visits factory method names
* restored support for String-to-ContextResource conversion
* restored original GenericConversionService behavior with respect to empty collections/maps
* restored original FormattingConversionService behavior with respect to the use of subtypes
* added "formatters" property to FormattingConversionServiceFactoryBean
* collection/array conversion returns original collection if possible (instead of first element)
* fixed collection element resolution when using a ConversionService with a DataBinder
* DataBinder uses a default limit of 256 for array/collection auto-growing
* added "autoGrowNestedPaths" property to ConfigurableWebBindingInitializer
* Servlet/PortletRequestDataBinder perform unwrapping for MultipartRequest as well
* fixed AbstractBindingResult to avoid NPE in "hashCode()" if target is null
* fixed several HttpHeaders issues (charset handling, quoting/unquoting)
* SimpleClientHttpRequest uses fixed-length streaming mode (always sets content-length header)
* added "connectTimeout" and "readTimeout" properties to Simple/CommonsClientHttpRequestFactory
* explicit status code in RedirectView respected in HTTP 1.0 compatibility mode
* FormHttpMessageConverter correctly processes POST requests
* ResourceHttpRequestHandler does not set Content-Length header for 304 response
* ResourceHttpRequestHandler detects invalid directory traversal in given path
* LocaleChangeInterceptor validates locale values in order to prevent XSS vulnerability
* HtmlUtils properly escapes single quotes as well
* added support for web.xml context-param "springJspExpressionSupport" (explicit "true"/"false")
* ContextLoader and FrameworkServlet support "contextId" parameter for custom serialization id
* RemoteExporter uses an opaque proxy for 'serviceInterface' (no AOP interfaces exposed)
* added "acceptProxyClasses" flag to RemoteInvocationSerializingExporter
* refined WebLogic RMI descriptor to only mark 'getTargetInterfaceName' method as idempotent
* EhCacheManagerFactoryBean properly closes "ehcache.xml" input stream, if any
* revised JMS CachedConnectionFactory to avoid unnecessary rollback calls on Session return
* fixed JMS CachedConnectionFactory to fully synchronize its Session list
* fixed NamedParameterJdbcTemplate's handling of arrays as query parameters
* fixed JPA 2.0 timeout hints to correctly specify milliseconds
* updated Quartz package to support Quartz 1.8 as well (note: not supporting Quartz 2.0 yet)
* fixed @Rule execution order in SpringJUnit4ClassRunner to match standard JUnit 4 behavior
Changes in version 3.0.5 (2010-10-20)
-------------------------------------
* support for Hibernate 3.6 final
* added core serializer abstraction with default implementations using Java Serialization
* consistent use of JDK 1.5's "ThreadLocal.remove()" over "ThreadLocal.set(null)"
* fixed JodaTimeContextHolder to use a non-inheritable ThreadLocal and expose a reset method
* revised "ClassUtils.isAssignable" semantics to cover primitives vs wrappers in both directions
* optimized AnnotationUtils findAnnotation performance for repeated search on same interfaces
* ConversionService protects itself against infinite recursion in ObjectToCollectionConverter
* fixed TypeDescriptor to correctly resolve nested collections and their element types
* BeanWrapper does not attempt to populate Map values on access (just auto-grows Map itself)
* fixed Autowired/CommonAnnotationBeanPostProcessor to prevent race condition in skipping check
* fixed @Value injection to correctly cache temporary null results for non-singleton beans
* ApplicationContext registers context-specific ClassArrayEditor for its bean ClassLoader
* refined ApplicationContext singleton processing to not fail for manually registered null instances
* fixed ApplicationContext event processing for repeated invocations to non-singleton listener beans
* optimized @Bean error messages for static factory methods as well as for argument type mismatches
* modified expression parsing to pass full TypeDescriptor context through to ConversionService calls
* adapted expression parser's Constructor/MethodResolver to accept TypeDescriptors instead of raw types
* SpEL supports projection on any kind of Collection (not just on Lists and arrays)
* SpEL MapAccessor consistently rejects "target.key" style access to Maps if no such key is found
* SpEL method invocations prefer method with fewest parameters (e.g. no-arg over vararg)
* AspectJExpressionPointcut uses bean ClassLoader for initializing the AspectJ pointcut parser
* added AnnotationAsyncExecutionAspect as AspectJ-based variant of @Async processing
* added mode="proxy"/"aspectj" and proxy-target-class options to task:annotation-driven
* JDBC bundle uses local ClassLoader as bean ClassLoader for "sql-error-codes.xml" parsing
* EmbeddedDatabaseFactory shuts down database when failing to populate it in "initDatabase()"
* embedded database support now also works with Derby >= 10.6
* "jdbc:embedded-database" uses id as database name to allow multiple ones in parallel
* ResourceDatabasePopulator throws descriptive ScriptStatementFailedException with resource details
* added configurable Connection/Statement/ResultSet target types to Jdbc4NativeJdbcExtractor
* added OracleJdbc4NativeJdbcExtractor with pre-configured Oracle JDBC API types
* DefaultLobHandler's "wrapAsLob" mode works with PostgreSQL's "getAsciiStream()" requirement
* ResultSetWrappingSqlRowSet (as used by JdbcTemplate's "queryForRowSet") supports column labels now
* LocalSessionFactoryBean's "entityCacheStrategies" works with region names on Hibernate 3.6 as well
* fixed DefaultMessageListenerContainer's no-message-received commit to work without Session caching
* DefaultMessageListenerContainer's skips no-message-received commit on Tibco (avoiding a deadlock)
* JaxWsPortClientInterceptor does not fall back to annotation-specified name as portName anymore
* UriTemplate is serializable now
* fixed AnnotationMethodHandlerAdapter's caching to avoid concurrency issues in RequestMappingInfo
* fixed @MVC processing of parameter-level annotations to work with interface-based proxies again
* revised @RequestParam processing to support CSV-to-array/collection binding with ConversionService
* fixed EvalTag's EvaluationContext caching to properly handle JSP tag caching across requests
* AbstractJasperReportsView only sets locale model attributes if not present already
* DispatcherPortlet throws custom NoHandlerFoundException instead of misleading UnavailableException
* DispatcherPortlet copies all action parameters to render parameters in case of an action exception
* DispatcherPortlet's default resource serving explicitly prevents access to WEB-INF and META-INF
* Portlet @ExceptionHandler methods allow for writing the response directly (like in the Servlet case)
* MockHttpServletRequest/HttpSession/etc returns independent Enumeration from "getAttributeNames()"
Changes in version 3.0.4 (2010-08-19)
-------------------------------------
* support for Hibernate Core 3.6, Hibernate Validator 4.1, EclipseLink 2.1, EHCache 2.2
* OSGi manifest version range accepts EHCache 2.x as well
* added "contentLength()" method to Resource abstraction
* URL-based Resource variants introspect "last-modified" and "content-length" response headers
* refined "exists()" check for UrlResource (HEAD request) and ClassPathResource (URL resolution)
* ConversionService is able to deal with empty collections and nested collections (fixed regression)
* ConversionService properly handles nested Resource arrays in Map values (fixed regression)
* ConversionService does not accidentally use copy constructor for same type
* fixed double ConversionFailedException nesting for ObjectToObjectConverter invocations
* BeanWrapper preserves annotation information for individual array/list/map elements
* Spring's constructor resolution consistently finds non-public multi-arg constructors
* revised constructor argument caching, avoiding a race condition for converted argument values
* SpEL passes full collection type context (generics, annotations) to ConversionService
* SpEL 'select last' operator now works consistently with maps
* BeanWrapper/DataBinder's "autoGrowNestedPaths" works for Maps as well
* fixed concurrency issue in TypedStringValue, showing for nested typed Maps in prototype beans
* fixed WeakReferenceMonitor to never stop its monitoring thread if an entry has been registered
* fixed CronTrigger to correctly parse month parts expressed as numbers (1-12 instead of 0-11)
* TaskExecutorFactoryBean (as used by task:executor) exposes full ThreadPoolTaskExecutor type
* JmsResourceHolder does not ignore IllegalStateException from locally synchronized transaction
* fixed JMS CachingConnectionFactory to correctly cache a producer without fixed destination as well
* DefaultMessageListenerContainer triggers Session commit even if no message has been received
* DefaultMessageListenerContainer supports client id setting even for non-shared Connections
* Spring's MessageEndpointFactory classes are now JCA 1.6 compliant as well
* AbstractJaxWsServiceExporter supports "bindingType" bean property, overriding @BindingType
* AbstractJaxWsServiceExporter supports "webServiceFeatures" bean property on JAX-WS 2.2
* JaxWsPortProxyFactoryBean takes "wsdlDocumentUrl", "namespaceUri" etc defaults from @WebService
* Jaxb2Marshaller's "marshallerProperties" Map accepts any value type
* SpringTemplateLoader for FreeMarker supports last-modified timestamp through Resource abstraction
* HibernateJpaDialect correctly closes borrowed connections even for nested JDBC executions
* DefaultJdoDialect supports JDO 3.0 query timeout facility (as supported by DataNucleus 2.1)
* transaction names based on method id from most specific method (target class instead of interface)
* added "validationMessageSource" to LocalValidatorFactoryBean, for Spring-based validation messages
* Spring field error arguments include actually declared annotation attributes in alphabetical order
* JSR-303 Pattern message resolvable through Spring MessageSource (despite special characters)
* DispatcherServlet applies default view name translation to error views as well
* mvc:annotation-driven reliably detects JSR-303 and JAXB2 in an OSGi environment as well
* revised @MVC handler method resolution with respect to handler methods on generic interfaces
* @MVC handler methods reliably resolve MultipartRequest arguments with HiddenHttpMethodFilter
* WebDataBinder and @MVC request params detect and introspect MultipartFile arrays as well
* fixed @PathVariable regression in combination with ConversionService usage on DataBinder
* @CookieValue returns decoded cookie value in a Servlet environment (analogous to @RequestParam)
* MVC HandlerExceptionResolvers prevent caching for exception views if preventResponseCaching=true
* @ExceptionHandler works for inherited method and CGLIB proxies on Portlet controllers as well
* Portlet @MVC's implicit render model will be updated at the end of the event phase
* Portlet AbstractController consistently uses session mutex if "synchronizeOnSession" is active
* PortletWrappingController supports Portlet 2.0 resource and event requests as well
* fixed JSP EvalTag to render null result as empty String instead of "null" String
* JSP EvalTag resolves "@myBeanName" references in expressions against the WebApplicationContext
* added support for static resource serving: ResourceHttpRequestHandler, mvc:resources
* revised DispatcherServlet's last-modified handling to properly work with scoped controllers
* MockMultipartHttpServletRequest pre-defines method "POST" and content type "multipart/form-data"
Changes in version 3.0.3 (2010-06-15)
-------------------------------------
* Spring autodetects JodaTime 1.3 or higher (as required), ignoring older JodaTime versions
* clarified that Spring's Jackson support requires Jackson 1.3 or higher
* JPA 2.0 support tested and supported with Hibernate 3.5.2 and OpenJPA 2.0.0 GA as well
* revised VFS support for Spring's component scanning to work on JBoss AS 6.0.0 M3 as well
* fixed URIEditor's URI construction to consider fragment as well
* added default InputSourceEditor for SAX InputSource construction with a URL String as system id
* CachedIntrospectionResults only caches GenericTypeAwarePropertyDescriptors if fully safe
* revised BeanWrapper's exception wrapping to consistently handle ConversionExceptions
* DefaultListableBeanFactory checks for alias circle on registerAlias (avoiding endless loop)
* ConversionService is able to apply Converters to interface-based array elements
* ConversionService fully supports conversion from String to MediaType now (through 'valueOf')
* revised exception handling in ObjectToObjectConverter, avoiding InvocationTargetExceptions
* a context ConversionService is able to override an ApplicationContext's resource editors
* refined LifecycleProcessor exception handling, properly wrapping a start exception from a bean
* revised DefaultLifecycleProcessor's handling of circular dependencies to avoid stack overflow
* fixed constructor argument caching for prototypes with multiple constructor matches
* specific detection of CGLIB subclasses in order to properly handle CGLIB interfaces
* registerDependentBean resolves to the canonical bean name in order to handle alias references
* fixed registerResolvableDependency mechanism to correctly handle non-serializable factory objects
* added "expose-proxy" attribute to aop namespace (enforcing AopContext proxy exposure with CGLIB)
* revised AbstractInterceptorDrivenBeanDefinitionDecorator for further alignment with auto-proxying
* BeanDefinitionVisitor/PropertyPlaceholderConfigurer finds and resolves values in arrays as well
* property placeholders can deal with nested expressions which happen to use the same suffix
* SpEL's Elvis operator is able to deal with #{${myProp}?:defaultValue} case if myProp is empty
* introduced EmbeddedValueResolverAware callback interface for convenient placeholder resolution
* @Transactional qualifier value matches against @Qualifier annotations on @Bean methods as well
* setTransactionIsolation on JDBC Connection only called when actually necessary (for PostgreSQL)
* added limit for parsed SQL cache to NamedParameterJdbcTemplate (default is 256; configurable)
* CachingConnectionFactory detects destination equality for WebSphere MQ as well (using toString)
* DefaultPersistenceUnitManager's getPersistenceUnitInfo method has 2.5 compatible signature again
* DefaultMessageListenerContainer reacts to maxConcurrentConsumers reduction for long-lived tasks
* added "idleConsumerLimit" bean property to DefaultMessageListenerContainer (default is 1)
* AsyncAnnotationBeanPostProcessor consistently adds @Async processing as first Advisor in the chain
* ScheduledTaskRegistrar (as used for @Scheduled processing) properly shuts down its default executor
* CronTrigger defensively protects itself against accidental re-fires if a task runs too early
* MailSendException includes all messages as failed messages in case of a connect failure
* added support for JAX-WS 2.1 WebServiceFeatures to JaxWsPortClientInterceptor/PortProxyFactoryBean
* added XmlAwareFormHttpMessageConverter, taking over the 3.0.2-introduced XML multipart support
* ServletContextResourcePatternResolver handles "/WEB-INF/lib/*.jar!/**/context.xml" style patterns
* fixed MVC mapping regression for servlet url-pattern "/" case on servers other than WebSphere
* MVC mappings properly apply even to welcome file entries that forward to a DispatcherServlet
* fixed @ExceptionHandler resolution in case of multiple matches at different inheritance levels
* revised Portlet SessionStatus.setComplete() to avoid re-exposure of attributes in render phase
* shortened Portlet MVC's implicit model render parameter name to "implicitModel"
* added convenient "checkRefresh" bean property to TilesConfigurer
* TilesConfigurer's "definitionsFactoryClass" property applies common Tiles DefinitionsFactory setup
* JSP FormTag calculates proper default form action even when using a rewrite filter on WebSphere
* JSP HiddenInputTag allows for using common HTML attributes (equivalent to LabelTag)
* fixed JSP ErrorsTag to avoid invalid "*.errors" id, using form object name as id prefix instead
* fixed JSP SelectTag's support for rendering enum constants
* JSP Radiobutton/CheckboxesTag utilizes PropertyEditor/ConversionService for label rendering
* MockHttpServletResponse supports multiple includes
Changes in version 3.0.2 (2010-04-02)
-------------------------------------
* fixed cross-module version ranges in OSGi manifests
* fixed contents of org.springframework.web.struts jar
* upgraded to Hibernate Validator 4.0.2 and Jackson 1.4.2
* compatibility with Hibernate 3.5 final (native and also as a JPA 2.0 provider)
* compatibility with OpenJPA 2.0 (support for JPA 2.0 persistence.xml versioning)
* compatibility with Hessian 4.0 (in terms of exception propagation)
* compatibility with JasperReports 3.x (in terms of resource management)
* restored full compatibility with Servlet 2.4 containers on all VMs
* PropertyEditor lookup fallback works on Google App Engine as well
* fixed TypeDescriptor/MethodParameter toString for all cases in debug log messages
* widened AbstractFactoryBean's "getObjectType" signature to return any Class as well
* BeanPostProcessors are allowed to return a null bean value in the middle of the chain
* autowire="byType" ignores parameter name when choosing a primary bean, as defined
* ObjectFactoryCreatingFactoryBean creates a serializable ObjectFactory reference
* added ProviderCreatingFactoryBean, exposing a serializable JSR-330 Provider reference
* "conversionService" bean will be ignored if it is not of type ConversionService
* revised AbstractInterceptorDrivenBeanDefinitionDecorator for alignment with auto-proxying
* SimpleJdbcCall's "returningResultSet" accepts any plain RowMapper now
* added public "validateDatabaseSchema" method to Hibernate LocalSessionFactoryBean
* HibernateJpaDialect borrows JDBC Connection on demand (supporting aggressive release)
* JCA listener containers delegate to wrapped Transaction handle (for Geronimo compatibility)
* @Transactional qualifiers work in unit tests as well (TransactionalTestExecutionListener)
* @Value processing works in test instances (using the test context framework) as well now
* @DirtiesContext is now inherited for class-level usage
* NativeWebRequest detects native MultipartRequest when decorated by HiddenHttpMethodFilter
* WebRequestInterceptor exposes HttpServletResponse through NativeWebRequest (after downcast)
* WebContentInterceptor does not restrict HTTP methods by default anymore
* WebApplicationObjectSupport's initServletContext will be called only once in any scenario
* DispatcherPortlet passes handler instance into HandlerExceptionResolver for action exception
* DispatcherPortlet applies preHandleRender callbacks in case of action exception as well
* UrlPathHelper cuts off trailing servlet-path slashes for root mappings (on WebSphere)
* introduced support for HttpEntity and ResponseEntity wrappers, adding context to body values
* fixed DataBinder's conversion error handling for direct field access with ConversionService
* @InitBinder methods support all applicable Spring 3.0 parameter annotations as well
* fixed @RequestParam(required=false) regression for @InitBinder methods
* @ExceptionHandler methods consistently receive original exception
* fixed indexed property binding regression in form tag library
* fixed @Configurable issue with null bean name
Changes in version 3.0.1 (2010-02-18)
-------------------------------------
* upgraded to AspectJ 1.6.8
* full support for JPA 2.0 persistence schema and PersistenceUnitInfo SPI
* support for JPA PersistenceContext/Unit injection on Google App Engine
* support for Hibernate 3.5 (as native Hibernate API and as JPA 2.0 provider)
* support for Tiles 2.2.1 (preserving compatibility with Tiles 2.1.2 and above)
* consistent treatment of unresolvable placeholders for Resource and Resource array properties
* ConversionFailedException exDLBFposes offending value through public "getValue()" method
* fixed BeanFactory's "getBeansWithAnnotation" to ignore beans with non-determinable type
* widened FactoryBean's "getObjectType" signature to return any Class (Class<?>)
* do not ever consider Object as a candidate type for autowiring by type (autowire="byType")
* BeanDefinitionReader and ClassPath/FileSystemXmlApplicationContext use varargs where possible
* introduced BeanDefinitionRegistryPostProcessor extension to BeanFactoryPostProcessor
* @Configuration classes support definition of BeanFactoryPostProcessor beans
* component-scan's scoped-proxy attribute applies to scope-annotated singleton beans as well
* generic ApplicationListener event type gets detected through AOP proxy as well
* ApplicationListeners will only be executed once per event (even for scripted objects)
* ApplicationListeners will get detected lazily as well (e.g. on @Bean's concrete result)
* inner bean ApplicationListeners will be invoked through their proxy (if any)
* fixed SimpleApplicationEventMulticaster's retriever caching to allow for proper removal
* context-specific "conversionService" bean may refer to annotation-configured converter beans
* refined DefaultLifecycleProcessor's start/stop logging and stop exception handling
* DefaultLifecycleProcessor allows for overriding specific hooks in subclasses
* BeanNameAutoProxyCreator detects alias matches for specified bean names
* proxies with AspectJ pointcuts are fully serializable within a BeanFactory now
* SharedEntityManagerCreator's EntityManager proxies are fully serializable now
* Query call chaining works with shared EntityManager proxy outside of transaction as well
* TransactionInterceptor is able to serialize "transactionManagerBeanName" as well
* non-matching @Transactional qualifier value will lead to IllegalStateException
* fixed WebSphereUowTransactionManager regression: correctly roll back in case of exception
* JndiObjectFactoryBean explicitly only chooses public interfaces as default proxy interfaces
* added vararg variants of query methods to JdbcTemplate (as known from SimpleJdbcTemplate)
* MBeanClientInterceptor/MBeanProxyFactoryBean understands CompositeData/TabularData arrays
* added "workManagerMBeanName" property to JBossWorkManagerTaskExecutor
* task:executor's id value is now used as thread name prefix of ThreadPoolTaskExecutor
* fixed @Scheduled processing to kick in once only even in an ApplicationContext hierarchy
* fixed MediaType's Comparable behavior to do a full comparison, aligned with equals behavior
* added "sortBySpecificity" method to MediaType, for typical use with accept header matching
* MimeMessageHelper encodes from, to, cc, bcc String addresses with given encoding as well
* changed HttpStatus.REQUEST_TOO_LONG constant to REQUEST_ENTITY_TOO_LARGE
* relaxed generic Class declaration in HttpMessageConverter's canRead/canWrite/read signatures
* fixed "mvc:view-controller" to work in a fully isolated fashion on Spring Dynamic Modules
* DefaultRequestToViewNameTranslator strips trailing slashes as well (can also be turned off)
* @RequestParam/RequestHeader/CookieValue's defaultValue allows for declaring empty String
* @SessionAttributes works when used on an annotated controller interface with AOP proxying
* WebRequest is a resolvable dependency in Servlet/Portlet web application contexts
* revised JSP-based views to never fail when trying to set Servlet API forward attributes
* lenient evaluation of boolean 'true' attribute expressions in JSP form tag library
* added new spring:eval tag for evaluating SpEL expressions from JSP pages
* SpringBeanAutowiringSupport works in extra ClassLoaders as well (e.g. WebLogic JAX-WS)
Changes in version 3.0.0.GA (2009-12-16)
----------------------------------------
* component scanning autodetects the new EE 6 "javax.annotation.ManagedBean" stereotype
* updated JPA 2.0 support to the final spec (tested compatibility with EclipseLink 2.0 GA)
* full support for GlassFish V3 GA (includes component scanning and load-time weaving)
* upgraded to JRuby 1.4 (while remaining compatible with JRuby 1.1 and above)
* bean property names are matched leniently ("title" and "Title"; "ISBN" and "iSBN")
* bean properties of type enum array/collection can be populated with comma-separated String
* removed getBeansWithAnnotation(Class,boolean,boolean) method from ListableBeanFactory
* PropertyPlaceholderConfigurer is compatible with Spring 2.5 extensions (again)
* SmartLifecycle beans will get auto-started on demand even if marked as lazy-init
* MBeanExporter detects FactoryBean-exported resources independent from declaration order
* refactored SpelExpressionParser to accept SpelParserConfiguration object with boolean flags
* revised TypeDescriptor's valueOf and forObject factory methods with some level of caching
* revised GenericConverter's "getConvertibleTypes" signature to return Set of ConvertiblePair
* GenericConversionService prefers matches against inherited interfaces over superclasses
* renamed ConverterRegistry's addGenericConverter(GenericConverter) method to addConverter
* no default converters for Object-to-Map and Map-To-Object anymore
* default converter for String-to-Properties parsing only applies for actual Properties objects
* default ObjectToStringConverter only stringifies objects that indicate proper toString behavior
* added "converters" property to FormattingConversionServiceFactoryBean as well
* full support for formatters and formatting annotations on array/collection elements
* no default number formatter (relying on plain java.lang.Number parsing and rendering)
* no default formatters for Date/Calendar (requiring explicit use of @DateTimeFormat)
* BeanValidationPostProcessor runs in before-initialization phase (before init methods) by default
* removed MultipartRequest mixin interface again (avoiding a package dependency cycle)
* revised RestTemplate method signatures to accept Object values instead of just Strings
* revised path variable extraction to properly deal with dots in variable values (again)
* reintroduced createBinder template method in Servlet/Portlet AnnotationMethodHandlerAdapter
Changes in version 3.0.0.RC3 (2009-12-01)
-----------------------------------------
+15 -14
View File
@@ -1,26 +1,27 @@
SPRING FRAMEWORK 3.0 (December 2009)
------------------------------------
http://www.springframework.org
SPRING FRAMEWORK 3.0.7 (December 2011)
--------------------------------------
http://www.springsource.org
1. INTRODUCTION
Spring Framework 3.0 is the next generation of the Spring: fully Java 5 based,
EL enabled, REST enabled, and with support for JSR-330 (Dependency Injection)
and JSR-303 (Bean Validation).
Spring Framework 3.0 is the next generation of Spring: fully Java 5 based,
EL enabled, REST enabled, and with support for JSR-330 (Dependency
Injection) and JSR-303 (Bean Validation).
2. RELEASE NOTES
This release comes with complete reference documentation. For further details,
consult the provided javadoc for specific packages and classes.
This release comes with complete reference documentation. For further
details, consult the provided javadoc for specific packages and classes.
3. DISTRIBUTION JAR FILES
The Spring Framework module jar files can be found in the 'dist' directory. Note that
this release does not contain a 'spring.jar' file anymore, in contrast to previous Spring
generations. Furthermore, the jar file names follow bundle repository conventions now.
The Spring Framework module jar files can be found in the 'dist'
directory. Note that this release does not contain a 'spring.jar' file
anymore, in contrast to previous Spring generations. Furthermore, the jar
file names now follow bundle repository conventions.
4. GETTING STARTED
Please consult the blog examples at http://blog.springsource.com as well as the sections
of interest in the reference documentation. Sample applications and related material
will be provided as separate downloads.
Please consult the blog examples at http://blog.springsource.com as well
as sections of interest in the reference documentation. Sample
applications and related material are provided as separate downloads.
+30 -23
View File
@@ -1,23 +1,30 @@
version=3.0.0
release.type=integration
natural.name=spring-framework
project.name=Spring Framework
project.key=SPR
ivy.cache.dir=${basedir}/../ivy-cache
integration.repo.dir=${basedir}/../integration-repo
javadoc.exclude.package.names=org/springframework/samples/**
javadoc.max.memory=256M
test.vm.args=-Xmx1024M -XX:MaxPermSize=512M -XX:+HeapDumpOnOutOfMemoryError
compiler.args=-enableJavadoc -warn:none
# For when releasing
#release.type=release
#build.stamp=RELEASE
# For when releasing milestones
#release.type=milestone
#build.stamp=M1
# For development in trunk
#release.type=integration
#build.stamp=BUILD-SNAPSHOT
version=3.0.8
# osgi ranges
spring.osgi.range.nq=${version:[=.=.=, =.=.+1)}
spring.osgi.range="${spring.osgi.range.nq}"
aj.osgi.range="[1.5.4, 2.0.0)"
#
#release.type=integration
natural.name=spring-framework
project.name=Spring Framework
project.key=SPR
ivy.cache.dir=${basedir}/../ivy-cache
integration.repo.dir=${basedir}/../integration-repo
license.dir=${basedir}/../build-spring-framework/resources
javadoc.exclude.package.names=org/springframework/samples/**
javadoc.max.memory=256M
test.vm.args=-Xmx1024M -XX:MaxPermSize=512M -XX:+HeapDumpOnOutOfMemoryError
compiler.args=-enableJavadoc -warn:none
# For when releasing
#release.type=release
#build.stamp=RELEASE
# For when releasing milestones
#release.type=milestone
#build.stamp=M1
# For development in trunk
release.type=integration
build.stamp=BUILD-SNAPSHOT
+5 -2
View File
@@ -1,2 +1,5 @@
org.testng.version=5.10.0
org.junit.version=4.7.0
#common dependency versions
aspectj.version=1.6.8.RELEASE
slf4j.version=1.5.3
junit.version=4.7.0
testng.version=5.10.0
+22 -21
View File
@@ -1,21 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src/main/java"/>
<classpathentry kind="src" path="src/main/resources"/>
<classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
<classpathentry kind="src" output="target/test-classes" path="src/test/resources"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="var" path="IVY_CACHE/org.aopalliance/com.springsource.org.aopalliance/1.0.0/com.springsource.org.aopalliance-1.0.0.jar" sourcepath="/IVY_CACHE/org.aopalliance/com.springsource.org.aopalliance/1.0.0/com.springsource.org.aopalliance-sources-1.0.0.jar"/>
<classpathentry kind="var" path="IVY_CACHE/org.apache.commons/com.springsource.org.apache.commons.logging/1.1.1/com.springsource.org.apache.commons.logging-1.1.1.jar" sourcepath="/IVY_CACHE/org.apache.commons/com.springsource.org.apache.commons.logging/1.1.1/com.springsource.org.apache.commons.logging-sources-1.1.1.jar"/>
<classpathentry kind="var" path="IVY_CACHE/org.easymock/com.springsource.org.easymock/2.5.1/com.springsource.org.easymock-2.5.1.jar" sourcepath="/IVY_CACHE/org.easymock/com.springsource.org.easymock/2.5.1/com.springsource.org.easymock-sources-2.5.1.jar"/>
<classpathentry kind="var" path="IVY_CACHE/com.jamonapi/com.springsource.com.jamonapi/2.4.0/com.springsource.com.jamonapi-2.4.0.jar" sourcepath="/IVY_CACHE/com.jamonapi/com.springsource.com.jamonapi/2.4.0/com.springsource.com.jamonapi-sources-2.4.0.jar"/>
<classpathentry kind="var" path="IVY_CACHE/net.sourceforge.cglib/com.springsource.net.sf.cglib/2.2.0/com.springsource.net.sf.cglib-2.2.0.jar" sourcepath="/IVY_CACHE/net.sourceforge.cglib/com.springsource.net.sf.cglib/2.1.3/com.springsource.net.sf.cglib-sources-2.1.3.jar"/>
<classpathentry kind="var" path="IVY_CACHE/org.apache.log4j/com.springsource.org.apache.log4j/1.2.15/com.springsource.org.apache.log4j-1.2.15.jar" sourcepath="/IVY_CACHE/org.apache.log4j/com.springsource.org.apache.log4j/1.2.15/com.springsource.org.apache.log4j-sources-1.2.15.jar"/>
<classpathentry kind="var" path="IVY_CACHE/org.junit/com.springsource.org.junit/4.7.0/com.springsource.org.junit-4.7.0.jar" sourcepath="/IVY_CACHE/org.junit/com.springsource.org.junit/4.7.0/com.springsource.org.junit-sources-4.7.0.jar"/>
<classpathentry kind="var" path="IVY_CACHE/org.apache.commons/com.springsource.org.apache.commons.pool/1.3.0/com.springsource.org.apache.commons.pool-1.3.0.jar" sourcepath="/IVY_CACHE/org.apache.commons/com.springsource.org.apache.commons.pool/1.3.0/com.springsource.org.apache.commons.pool-sources-1.3.0.jar"/>
<classpathentry kind="var" path="IVY_CACHE/org.aspectj/com.springsource.org.aspectj.weaver/1.6.5.RELEASE/com.springsource.org.aspectj.weaver-1.6.5.RELEASE.jar" sourcepath="IVY_CACHE/org.aspectj/com.springsource.org.aspectj.weaver/1.6.5.RELEASE/com.springsource.org.aspectj.weaver-sources-1.6.5.RELEASE.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/org.springframework.beans"/>
<classpathentry combineaccessrules="false" kind="src" path="/org.springframework.core"/>
<classpathentry kind="lib" path="/org.springframework.asm/target/artifacts/org.springframework.asm.jar" sourcepath="/org.springframework.asm/target/artifacts/org.springframework.asm-sources.jar"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src/main/java"/>
<classpathentry kind="src" path="src/main/resources"/>
<classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
<classpathentry kind="src" output="target/test-classes" path="src/test/resources"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="var" path="IVY_CACHE/org.aopalliance/com.springsource.org.aopalliance/1.0.0/com.springsource.org.aopalliance-1.0.0.jar" sourcepath="/IVY_CACHE/org.aopalliance/com.springsource.org.aopalliance/1.0.0/com.springsource.org.aopalliance-sources-1.0.0.jar"/>
<classpathentry kind="var" path="IVY_CACHE/org.apache.commons/com.springsource.org.apache.commons.logging/1.1.1/com.springsource.org.apache.commons.logging-1.1.1.jar" sourcepath="/IVY_CACHE/org.apache.commons/com.springsource.org.apache.commons.logging/1.1.1/com.springsource.org.apache.commons.logging-sources-1.1.1.jar"/>
<classpathentry kind="var" path="IVY_CACHE/org.easymock/com.springsource.org.easymock/2.5.1/com.springsource.org.easymock-2.5.1.jar" sourcepath="/IVY_CACHE/org.easymock/com.springsource.org.easymock/2.5.1/com.springsource.org.easymock-sources-2.5.1.jar"/>
<classpathentry kind="var" path="IVY_CACHE/com.jamonapi/com.springsource.com.jamonapi/2.4.0/com.springsource.com.jamonapi-2.4.0.jar" sourcepath="/IVY_CACHE/com.jamonapi/com.springsource.com.jamonapi/2.4.0/com.springsource.com.jamonapi-sources-2.4.0.jar"/>
<classpathentry kind="var" path="IVY_CACHE/net.sourceforge.cglib/com.springsource.net.sf.cglib/2.2.0/com.springsource.net.sf.cglib-2.2.0.jar" sourcepath="/IVY_CACHE/net.sourceforge.cglib/com.springsource.net.sf.cglib/2.1.3/com.springsource.net.sf.cglib-sources-2.1.3.jar"/>
<classpathentry kind="var" path="IVY_CACHE/org.apache.log4j/com.springsource.org.apache.log4j/1.2.15/com.springsource.org.apache.log4j-1.2.15.jar" sourcepath="/IVY_CACHE/org.apache.log4j/com.springsource.org.apache.log4j/1.2.15/com.springsource.org.apache.log4j-sources-1.2.15.jar"/>
<classpathentry kind="var" path="IVY_CACHE/org.junit/com.springsource.org.junit/4.7.0/com.springsource.org.junit-4.7.0.jar" sourcepath="/IVY_CACHE/org.junit/com.springsource.org.junit/4.7.0/com.springsource.org.junit-sources-4.7.0.jar"/>
<classpathentry kind="var" path="IVY_CACHE/org.apache.commons/com.springsource.org.apache.commons.pool/1.3.0/com.springsource.org.apache.commons.pool-1.3.0.jar" sourcepath="/IVY_CACHE/org.apache.commons/com.springsource.org.apache.commons.pool/1.3.0/com.springsource.org.apache.commons.pool-sources-1.3.0.jar"/>
<classpathentry kind="var" path="IVY_CACHE/org.aspectj/com.springsource.org.aspectj.weaver/1.6.8.RELEASE/com.springsource.org.aspectj.weaver-1.6.8.RELEASE.jar" sourcepath="IVY_CACHE/org.aspectj/com.springsource.org.aspectj.weaver/1.6.8.RELEASE/com.springsource.org.aspectj.weaver-sources-1.6.8.RELEASE.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/org.springframework.beans"/>
<classpathentry combineaccessrules="false" kind="src" path="/org.springframework.core"/>
<classpathentry kind="lib" path="/org.springframework.asm/target/artifacts/org.springframework.asm.jar" sourcepath="/org.springframework.asm/target/artifacts/org.springframework.asm-sources.jar"/>
<classpathentry kind="var" path="IVY_CACHE"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
+1
View File
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="org.springframework.aop">
<property file="${basedir}/../build.properties"/>
<property file="${basedir}/../build.versions"/>
<import file="${basedir}/../build-spring-framework/package-bundle.xml"/>
<import file="${basedir}/../spring-build/standard/default.xml"/>
</project>
+7 -4
View File
@@ -11,6 +11,7 @@
<configurations>
<include file="${spring.build.dir}/common/default-ivy-configurations.xml"/>
<conf name="commons-logging" extends="runtime" description="JARs needed to run with Commons Logging"/>
<conf name="aspectj" extends="runtime" description="JARs needed to run with AspectJ"/>
<conf name="bytecode-proxy" extends="runtime" description="JARs needed to run with CGLIB bytecode proxies"/>
<conf name="jamon" extends="runtime" description="JARs needed to run with JamonAPI"/>
@@ -20,21 +21,23 @@
<publications>
<artifact name="${ant.project.name}"/>
<artifact name="${ant.project.name}-sources" type="src" ext="jar"/>
<artifact name="license" type="license" ext="txt"/>
<artifact name="notice" type="notice" ext="txt"/>
</publications>
<dependencies>
<dependency org="com.jamonapi" name="com.springsource.com.jamonapi" rev="2.4.0" conf="optional, jamon->compile"/>
<dependency org="net.sourceforge.cglib" name="com.springsource.net.sf.cglib" rev="2.2.0" conf="optional, bytecode-proxy->compile"/>
<dependency org="org.aopalliance" name="com.springsource.org.aopalliance" rev="1.0.0" conf="compile->compile"/>
<dependency org="org.apache.commons" name="com.springsource.org.apache.commons.logging" rev="1.1.1" conf="compile->compile"/>
<dependency org="org.apache.commons" name="com.springsource.org.apache.commons.pool" rev="1.4.0" conf="optional, pooling->compile"/>
<dependency org="org.aspectj" name="com.springsource.org.aspectj.weaver" rev="1.6.5.RELEASE" conf="optional, aspectj->compile"/>
<dependency org="org.apache.commons" name="com.springsource.org.apache.commons.logging" rev="1.1.1" conf="compile, commons-logging->compile"/>
<dependency org="org.apache.commons" name="com.springsource.org.apache.commons.pool" rev="1.5.3" conf="optional, pooling->compile"/>
<dependency org="org.aspectj" name="com.springsource.org.aspectj.weaver" rev="${aspectj.version}" conf="optional, aspectj->compile"/>
<dependency org="org.springframework" name="org.springframework.beans" rev="latest.integration" conf="compile->compile"/>
<dependency org="org.springframework" name="org.springframework.core" rev="latest.integration" conf="compile->compile"/>
<!-- test dependencies -->
<dependency org="org.apache.log4j" name="com.springsource.org.apache.log4j" rev="1.2.15" conf="test->runtime"/>
<dependency org="org.easymock" name="com.springsource.org.easymock" rev="2.5.1" conf="test->compile"/>
<dependency org="org.junit" name="com.springsource.org.junit" rev="4.7.0" conf="test->runtime"/>
<dependency org="org.junit" name="com.springsource.org.junit" rev="${junit.version}" conf="test->runtime"/>
<dependency org="org.springframework" name="org.springframework.asm" rev="latest.integration" conf="test->runtime"/>
</dependencies>
+3 -3
View File
@@ -4,12 +4,12 @@
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
<packaging>jar</packaging>
<version>3.0.0.BUILD-SNAPSHOT</version>
<version>3.0.8.BUILD-SNAPSHOT</version>
<parent>
<groupId>org.springframework</groupId>
<artifactId>spring-parent</artifactId>
<relativePath>../org.springframework.spring-parent</relativePath>
<version>3.0.0.BUILD-SNAPSHOT</version>
<version>3.0.8.BUILD-SNAPSHOT</version>
</parent>
<dependencies>
@@ -35,7 +35,7 @@
<dependency>
<groupId>commons-pool</groupId>
<artifactId>commons-pool</artifactId>
<version>1.4</version>
<version>1.5.3</version>
<optional>true</optional>
</dependency>
<dependency>
@@ -34,6 +34,6 @@ public interface TargetClassAware {
* (typically a proxy configuration or an actual proxy).
* @return the target Class, or <code>null</code> if not known
*/
Class getTargetClass();
Class<?> getTargetClass();
}
@@ -1,5 +1,5 @@
/*<
* Copyright 2002-2007 the original author or authors.
* Copyright 2002-2010 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -39,7 +39,7 @@ public interface TargetSource extends TargetClassAware {
* target class.
* @return the type of targets returned by this {@link TargetSource}
*/
Class getTargetClass();
Class<?> getTargetClass();
/**
* Will all calls to {@link #getTarget()} return the same object?
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2008 the original author or authors.
* Copyright 2002-2010 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,6 +18,7 @@ package org.springframework.aop.aspectj;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.Type;
import java.util.HashMap;
import java.util.Map;
@@ -139,9 +140,7 @@ public abstract class AbstractAspectJAdvice implements Advice, AspectJPrecedence
private boolean argumentsIntrospected = false;
// The actual type is java.lang.reflect.Type,
// but for JDK 1.4 compatibility we use Object as the static type.
private Object discoveredReturningGenericType;
private Type discoveredReturningGenericType;
// Note: Unlike return type, no such generic information is needed for the throwing type,
// since Java doesn't allow exception types to be parameterized.
@@ -295,7 +294,7 @@ public abstract class AbstractAspectJAdvice implements Advice, AspectJPrecedence
return this.discoveredReturningType;
}
protected Object getDiscoveredReturningGenericType() {
protected Type getDiscoveredReturningGenericType() {
return this.discoveredReturningGenericType;
}
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2007 the original author or authors.
* Copyright 2002-2010 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -69,21 +69,11 @@ public class AspectJAfterReturningAdvice extends AbstractAspectJAdvice implement
*/
private boolean shouldInvokeOnReturnValueOf(Method method, Object returnValue) {
Class type = getDiscoveredReturningType();
Object genericType = getDiscoveredReturningGenericType();
Type genericType = getDiscoveredReturningGenericType();
// If we aren't dealing with a raw type, check if generic parameters are assignable.
return (ClassUtils.isAssignableValue(type, returnValue) &&
(genericType == null || genericType == type || GenericTypeMatcher.isAssignable(genericType, method)));
}
/**
* Inner class to avoid a static JDK 1.5 dependency for generic type matching.
*/
private static class GenericTypeMatcher {
public static boolean isAssignable(Object genericType, Method method) {
return TypeUtils.isAssignable((Type) genericType, method.getGenericReturnType());
}
(genericType == null || genericType == type ||
TypeUtils.isAssignable(genericType, method.getGenericReturnType())));
}
}
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2009 the original author or authors.
* Copyright 2002-2010 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,6 +16,8 @@
package org.springframework.aop.aspectj;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.lang.reflect.Method;
import java.util.HashSet;
import java.util.Map;
@@ -52,6 +54,7 @@ import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.BeanFactoryAware;
import org.springframework.beans.factory.BeanFactoryUtils;
import org.springframework.beans.factory.FactoryBean;
import org.springframework.beans.factory.config.ConfigurableBeanFactory;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
@@ -75,28 +78,24 @@ import org.springframework.util.StringUtils;
public class AspectJExpressionPointcut extends AbstractExpressionPointcut
implements ClassFilter, IntroductionAwareMethodMatcher, BeanFactoryAware {
private static final Set<PointcutPrimitive> DEFAULT_SUPPORTED_PRIMITIVES = new HashSet<PointcutPrimitive>();
private static final Set<PointcutPrimitive> SUPPORTED_PRIMITIVES = new HashSet<PointcutPrimitive>();
static {
DEFAULT_SUPPORTED_PRIMITIVES.add(PointcutPrimitive.EXECUTION);
DEFAULT_SUPPORTED_PRIMITIVES.add(PointcutPrimitive.ARGS);
DEFAULT_SUPPORTED_PRIMITIVES.add(PointcutPrimitive.REFERENCE);
DEFAULT_SUPPORTED_PRIMITIVES.add(PointcutPrimitive.THIS);
DEFAULT_SUPPORTED_PRIMITIVES.add(PointcutPrimitive.TARGET);
DEFAULT_SUPPORTED_PRIMITIVES.add(PointcutPrimitive.WITHIN);
DEFAULT_SUPPORTED_PRIMITIVES.add(PointcutPrimitive.AT_ANNOTATION);
DEFAULT_SUPPORTED_PRIMITIVES.add(PointcutPrimitive.AT_WITHIN);
DEFAULT_SUPPORTED_PRIMITIVES.add(PointcutPrimitive.AT_ARGS);
DEFAULT_SUPPORTED_PRIMITIVES.add(PointcutPrimitive.AT_TARGET);
SUPPORTED_PRIMITIVES.add(PointcutPrimitive.EXECUTION);
SUPPORTED_PRIMITIVES.add(PointcutPrimitive.ARGS);
SUPPORTED_PRIMITIVES.add(PointcutPrimitive.REFERENCE);
SUPPORTED_PRIMITIVES.add(PointcutPrimitive.THIS);
SUPPORTED_PRIMITIVES.add(PointcutPrimitive.TARGET);
SUPPORTED_PRIMITIVES.add(PointcutPrimitive.WITHIN);
SUPPORTED_PRIMITIVES.add(PointcutPrimitive.AT_ANNOTATION);
SUPPORTED_PRIMITIVES.add(PointcutPrimitive.AT_WITHIN);
SUPPORTED_PRIMITIVES.add(PointcutPrimitive.AT_ARGS);
SUPPORTED_PRIMITIVES.add(PointcutPrimitive.AT_TARGET);
}
private static final Log logger = LogFactory.getLog(AspectJExpressionPointcut.class);
private final Map<Method, ShadowMatch> shadowMatchCache = new ConcurrentHashMap<Method, ShadowMatch>(32);
private PointcutParser pointcutParser;
private Class pointcutDeclarationScope;
private String[] pointcutParameterNames = new String[0];
@@ -105,26 +104,15 @@ public class AspectJExpressionPointcut extends AbstractExpressionPointcut
private BeanFactory beanFactory;
private PointcutExpression pointcutExpression;
private transient PointcutExpression pointcutExpression;
private transient Map<Method, ShadowMatch> shadowMatchCache = new ConcurrentHashMap<Method, ShadowMatch>(32);
/**
* Create a new default AspectJExpressionPointcut.
*/
public AspectJExpressionPointcut() {
this(DEFAULT_SUPPORTED_PRIMITIVES);
}
/**
* Create a new AspectJExpressionPointcut with the given supported primitives.
* @param supportedPrimitives Set of {@link org.aspectj.weaver.tools.PointcutPrimitive}
* instances
*/
public AspectJExpressionPointcut(Set supportedPrimitives) {
this.pointcutParser =
PointcutParser.getPointcutParserSupportingSpecifiedPrimitivesAndUsingContextClassloaderForResolution(
supportedPrimitives);
this.pointcutParser.registerPointcutDesignatorHandler(new BeanNamePointcutDesignatorHandler());
}
/**
@@ -134,7 +122,6 @@ public class AspectJExpressionPointcut extends AbstractExpressionPointcut
* @param paramTypes the parameter types for the pointcut
*/
public AspectJExpressionPointcut(Class declarationScope, String[] paramNames, Class[] paramTypes) {
this(DEFAULT_SUPPORTED_PRIMITIVES);
this.pointcutDeclarationScope = declarationScope;
if (paramNames.length != paramTypes.length) {
throw new IllegalStateException(
@@ -199,15 +186,30 @@ public class AspectJExpressionPointcut extends AbstractExpressionPointcut
* Build the underlying AspectJ pointcut expression.
*/
private PointcutExpression buildPointcutExpression() {
PointcutParser parser = initializePointcutParser();
PointcutParameter[] pointcutParameters = new PointcutParameter[this.pointcutParameterNames.length];
for (int i = 0; i < pointcutParameters.length; i++) {
pointcutParameters[i] = this.pointcutParser.createPointcutParameter(
pointcutParameters[i] = parser.createPointcutParameter(
this.pointcutParameterNames[i], this.pointcutParameterTypes[i]);
}
return this.pointcutParser.parsePointcutExpression(
return parser.parsePointcutExpression(
replaceBooleanOperators(getExpression()), this.pointcutDeclarationScope, pointcutParameters);
}
/**
* Initialize the underlying AspectJ pointcut parser.
*/
private PointcutParser initializePointcutParser() {
ClassLoader cl = (this.beanFactory instanceof ConfigurableBeanFactory ?
((ConfigurableBeanFactory) this.beanFactory).getBeanClassLoader() :
Thread.currentThread().getContextClassLoader());
PointcutParser parser =
PointcutParser.getPointcutParserSupportingSpecifiedPrimitivesAndUsingSpecifiedClassLoaderForResolution(
SUPPORTED_PRIMITIVES, cl);
parser.registerPointcutDesignatorHandler(new BeanNamePointcutDesignatorHandler());
return parser;
}
/**
* If a pointcut expression has been specified in XML, the user cannot
* write <code>and</code> as "&&" (though &amp;&amp; will work).
@@ -221,6 +223,7 @@ public class AspectJExpressionPointcut extends AbstractExpressionPointcut
return result;
}
/**
* Return the underlying AspectJ pointcut expression.
*/
@@ -229,7 +232,6 @@ public class AspectJExpressionPointcut extends AbstractExpressionPointcut
return this.pointcutExpression;
}
public boolean matches(Class targetClass) {
checkReadyToMatch();
try {
@@ -458,7 +460,6 @@ public class AspectJExpressionPointcut extends AbstractExpressionPointcut
/**
* Matcher class for the BeanNamePointcutDesignatorHandler.
*
* <p>Dynamic match tests for this matcher always return true,
* since the matching decision is made at the proxy creation time.
* For static match tests, this matcher abstains to allow the overall
@@ -528,4 +529,18 @@ public class AspectJExpressionPointcut extends AbstractExpressionPointcut
}
}
//---------------------------------------------------------------------
// Serialization support
//---------------------------------------------------------------------
private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException {
// Rely on default serialization, just initialize state after deserialization.
ois.defaultReadObject();
// Initialize transient fields.
// pointcutExpression will be initialized lazily by checkReadyToMatch()
this.shadowMatchCache = new ConcurrentHashMap<Method, ShadowMatch>(32);
}
}
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2008 the original author or authors.
* Copyright 2002-2010 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -73,7 +73,7 @@ class RuntimeTestWalker {
catch (IllegalAccessException illegalAccessEx) {
// Famous last words... but I don't see how this can happen given the
// makeAccessible call above
throw new IllegalStateException("Unable to access ShadowMatchImpl.runtimeTest field.");
throw new IllegalStateException("Unable to access ShadowMatchImpl.residualTest field");
}
}
@@ -83,15 +83,18 @@ class RuntimeTestWalker {
* then it tests subtype sensitive vars.
*/
public boolean testsSubtypeSensitiveVars() {
return new SubtypeSensitiveVarTypeTestVisitor().testsSubtypeSensitiveVars(this.runtimeTest);
return (this.runtimeTest != null &&
new SubtypeSensitiveVarTypeTestVisitor().testsSubtypeSensitiveVars(this.runtimeTest));
}
public boolean testThisInstanceOfResidue(Class thisClass) {
return new ThisInstanceOfResidueTestVisitor(thisClass).thisInstanceOfMatches(this.runtimeTest);
return (this.runtimeTest != null &&
new ThisInstanceOfResidueTestVisitor(thisClass).thisInstanceOfMatches(this.runtimeTest));
}
public boolean testTargetInstanceOfResidue(Class targetClass) {
return new TargetInstanceOfResidueTestVisitor(targetClass).targetInstanceOfMatches(this.runtimeTest);
return (this.runtimeTest != null &&
new TargetInstanceOfResidueTestVisitor(targetClass).targetInstanceOfMatches(this.runtimeTest));
}
@@ -139,8 +142,7 @@ class RuntimeTestWalker {
try {
Field varTypeField = ReflectionVar.class.getDeclaredField("varType");
ReflectionUtils.makeAccessible(varTypeField);
Integer varTypeValue = (Integer) varTypeField.get(v);
return varTypeValue.intValue();
return (Integer) varTypeField.get(v);
}
catch (NoSuchFieldException noSuchFieldEx) {
throw new IllegalStateException("the version of aspectjtools.jar / aspectjweaver.jar " +
@@ -150,7 +152,7 @@ class RuntimeTestWalker {
catch (IllegalAccessException illegalAccessEx) {
// Famous last words... but I don't see how this can happen given the
// makeAccessible call above
throw new IllegalStateException("Unable to access ReflectionVar.varType field.");
throw new IllegalStateException("Unable to access ReflectionVar.varType field");
}
}
}
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2009 the original author or authors.
* Copyright 2002-2010 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -215,9 +215,10 @@ public abstract class AbstractAspectJAdvisorFactory implements AspectJAdvisorFac
*/
protected static class AspectJAnnotation<A extends Annotation> {
private static Map<Class,AspectJAnnotationType> annotationTypes = new HashMap<Class,AspectJAnnotationType>();
private static final String[] EXPRESSION_PROPERTIES = new String[] {"value", "pointcut"};
private static final String[] EXPRESSION_PROPERTIES = new String[]{"value", "pointcut"};
private static Map<Class, AspectJAnnotationType> annotationTypes =
new HashMap<Class, AspectJAnnotationType>();
static {
annotationTypes.put(Pointcut.class,AspectJAnnotationType.AtPointcut);
@@ -229,46 +230,48 @@ public abstract class AbstractAspectJAdvisorFactory implements AspectJAdvisorFac
}
private final A annotation;
private AspectJAnnotationType annotationType;
private final String expression;
private final String argNames;
public AspectJAnnotation(A aspectjAnnotation) {
this.annotation = aspectjAnnotation;
for (Class type : annotationTypes.keySet()) {
if (type.isInstance(this.annotation)) {
this.annotationType = annotationTypes.get(type);
break;
}
}
if (this.annotationType == null) {
throw new IllegalStateException("Unknown annotation type: " + this.annotation.toString());
}
private final AspectJAnnotationType annotationType;
private final String pointcutExpression;
private final String argumentNames;
public AspectJAnnotation(A annotation) {
this.annotation = annotation;
this.annotationType = determineAnnotationType(annotation);
// We know these methods exist with the same name on each object,
// but need to invoke them reflectively as there isn't a common interface.
try {
this.expression = resolveExpression();
this.argNames = (String)
this.annotation.getClass().getMethod("argNames", (Class[]) null).invoke(this.annotation);
this.pointcutExpression = resolveExpression(annotation);
this.argumentNames = (String) annotation.getClass().getMethod("argNames").invoke(annotation);
}
catch (Exception ex) {
throw new IllegalArgumentException(aspectjAnnotation + " cannot be an AspectJ annotation", ex);
throw new IllegalArgumentException(annotation + " cannot be an AspectJ annotation", ex);
}
}
private String resolveExpression() throws Exception {
private AspectJAnnotationType determineAnnotationType(A annotation) {
for (Class type : annotationTypes.keySet()) {
if (type.isInstance(annotation)) {
return annotationTypes.get(type);
}
}
throw new IllegalStateException("Unknown annotation type: " + annotation.toString());
}
private String resolveExpression(A annotation) throws Exception {
String expression = null;
for (String methodName : EXPRESSION_PROPERTIES) {
Method method;
try {
method = this.annotation.getClass().getDeclaredMethod(methodName);
method = annotation.getClass().getDeclaredMethod(methodName);
}
catch (NoSuchMethodException ex) {
method = null;
}
if (method != null) {
String candidate = (String) method.invoke(this.annotation);
String candidate = (String) method.invoke(annotation);
if (StringUtils.hasText(candidate)) {
expression = candidate;
}
@@ -286,11 +289,11 @@ public abstract class AbstractAspectJAdvisorFactory implements AspectJAdvisorFac
}
public String getPointcutExpression() {
return this.expression;
return this.pointcutExpression;
}
public String getArgNames() {
return this.argNames;
public String getArgumentNames() {
return this.argumentNames;
}
@Override
@@ -314,7 +317,7 @@ public abstract class AbstractAspectJAdvisorFactory implements AspectJAdvisorFac
if (annotation == null) {
return null;
}
StringTokenizer strTok = new StringTokenizer(annotation.getArgNames(), ",");
StringTokenizer strTok = new StringTokenizer(annotation.getArgumentNames(), ",");
if (strTok.countTokens() > 0) {
String[] names = new String[strTok.countTokens()];
for (int i = 0; i < names.length; i++) {
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2006 the original author or authors.
* Copyright 2002-2010 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -58,18 +58,13 @@ class InstantiationModelAwarePointcutAdvisorImpl
private String aspectName;
private Boolean isBeforeAdvice = null;
private Boolean isBeforeAdvice;
private Boolean isAfterAdvice = null;
private Boolean isAfterAdvice;
public InstantiationModelAwarePointcutAdvisorImpl(
AspectJAdvisorFactory af,
AspectJExpressionPointcut ajexp,
MetadataAwareAspectInstanceFactory aif,
Method method,
int declarationOrderInAspect,
String aspectName) {
public InstantiationModelAwarePointcutAdvisorImpl(AspectJAdvisorFactory af, AspectJExpressionPointcut ajexp,
MetadataAwareAspectInstanceFactory aif, Method method, int declarationOrderInAspect, String aspectName) {
this.declaredPointcut = ajexp;
this.method = method;
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2006 the original author or authors.
* Copyright 2002-2010 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -21,9 +21,9 @@ import java.util.List;
import org.w3c.dom.Node;
import org.springframework.aop.framework.ProxyFactoryBean;
import org.springframework.beans.MutablePropertyValues;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.beans.factory.config.BeanDefinitionHolder;
import org.springframework.beans.factory.support.AbstractBeanDefinition;
import org.springframework.beans.factory.support.BeanDefinitionReaderUtils;
import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import org.springframework.beans.factory.support.ManagedList;
@@ -34,22 +34,25 @@ import org.springframework.util.ClassUtils;
import org.springframework.util.StringUtils;
/**
* Base implementation for {@link org.springframework.beans.factory.xml.BeanDefinitionDecorator BeanDefinitionDecorators} wishing
* to add an {@link org.aopalliance.intercept.MethodInterceptor interceptor} to the resulting
* bean.
* Base implementation for
* {@link org.springframework.beans.factory.xml.BeanDefinitionDecorator BeanDefinitionDecorators}
* wishing to add an {@link org.aopalliance.intercept.MethodInterceptor interceptor}
* to the resulting bean.
*
* <p>This base class controls the creation of the {@link ProxyFactoryBean} bean definition
* and wraps the original as an inner-bean definition for the <code>target</code> property of
* {@link ProxyFactoryBean}.
* and wraps the original as an inner-bean definition for the <code>target</code> property
* of {@link ProxyFactoryBean}.
*
* <p>Chaining is correctly handled, ensuring that only one {@link ProxyFactoryBean} definition
* is created. If a previous {@link org.springframework.beans.factory.xml.BeanDefinitionDecorator} already created the {@link org.springframework.aop.framework.ProxyFactoryBean}
* then the interceptor is simply added to the existing definition.
* is created. If a previous {@link org.springframework.beans.factory.xml.BeanDefinitionDecorator}
* already created the {@link org.springframework.aop.framework.ProxyFactoryBean} then the
* interceptor is simply added to the existing definition.
*
* <p>Subclasses have only to create the <code>BeanDefinition</code> to the interceptor they
* wish to add.
* <p>Subclasses have only to create the <code>BeanDefinition</code> to the interceptor that
* they wish to add.
*
* @author Rob Harrop
* @author Juergen Hoeller
* @since 2.0
* @see org.aopalliance.intercept.MethodInterceptor
*/
@@ -60,51 +63,54 @@ public abstract class AbstractInterceptorDrivenBeanDefinitionDecorator implement
// get the root bean name - will be the name of the generated proxy factory bean
String existingBeanName = definitionHolder.getBeanName();
BeanDefinition existingDefinition = definitionHolder.getBeanDefinition();
BeanDefinition targetDefinition = definitionHolder.getBeanDefinition();
BeanDefinitionHolder targetHolder = new BeanDefinitionHolder(targetDefinition, existingBeanName + ".TARGET");
// delegate to subclass for interceptor def
// delegate to subclass for interceptor definition
BeanDefinition interceptorDefinition = createInterceptorDefinition(node);
// generate name and register the interceptor
String interceptorName = existingBeanName + "." + getInterceptorNameSuffix(interceptorDefinition);
BeanDefinitionReaderUtils.registerBeanDefinition(new BeanDefinitionHolder(interceptorDefinition, interceptorName), registry);
BeanDefinitionReaderUtils.registerBeanDefinition(
new BeanDefinitionHolder(interceptorDefinition, interceptorName), registry);
BeanDefinitionHolder result = definitionHolder;
if (!isProxyFactoryBeanDefinition(existingDefinition)) {
// create the proxy definitionHolder
if (!isProxyFactoryBeanDefinition(targetDefinition)) {
// create the proxy definition
RootBeanDefinition proxyDefinition = new RootBeanDefinition();
// create proxy factory bean definitionHolder
// create proxy factory bean definition
proxyDefinition.setBeanClass(ProxyFactoryBean.class);
// set up property values
MutablePropertyValues mpvs = new MutablePropertyValues();
proxyDefinition.setPropertyValues(mpvs);
proxyDefinition.setScope(targetDefinition.getScope());
proxyDefinition.setLazyInit(targetDefinition.isLazyInit());
// set the target
mpvs.add("target", existingDefinition);
proxyDefinition.setDecoratedDefinition(targetHolder);
proxyDefinition.getPropertyValues().add("target", targetHolder);
// create the interceptor names list
ManagedList interceptorList = new ManagedList();
mpvs.add("interceptorNames", interceptorList);
proxyDefinition.getPropertyValues().add("interceptorNames", new ManagedList<String>());
// copy autowire settings from original bean definition.
proxyDefinition.setAutowireCandidate(targetDefinition.isAutowireCandidate());
proxyDefinition.setPrimary(targetDefinition.isPrimary());
if (targetDefinition instanceof AbstractBeanDefinition) {
proxyDefinition.copyQualifiersFrom((AbstractBeanDefinition) targetDefinition);
}
// wrap it in a BeanDefinitionHolder with bean name
result = new BeanDefinitionHolder(proxyDefinition, existingBeanName);
}
addInterceptorNameToList(interceptorName, result.getBeanDefinition());
return result;
}
@SuppressWarnings("unchecked")
private void addInterceptorNameToList(String interceptorName, BeanDefinition beanDefinition) {
List list = (List) beanDefinition.getPropertyValues().getPropertyValue("interceptorNames").getValue();
List<String> list = (List<String>)
beanDefinition.getPropertyValues().getPropertyValue("interceptorNames").getValue();
list.add(interceptorName);
}
private boolean isProxyFactoryBeanDefinition(BeanDefinition existingDefinition) {
return existingDefinition.getBeanClassName().equals(ProxyFactoryBean.class.getName());
return ProxyFactoryBean.class.getName().equals(existingDefinition.getBeanClassName());
}
protected String getInterceptorNameSuffix(BeanDefinition interceptorDefinition) {
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2008 the original author or authors.
* Copyright 2002-2010 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -97,6 +97,13 @@ public abstract class AopConfigUtils {
}
}
static void forceAutoProxyCreatorToExposeProxy(BeanDefinitionRegistry registry) {
if (registry.containsBeanDefinition(AUTO_PROXY_CREATOR_BEAN_NAME)) {
BeanDefinition definition = registry.getBeanDefinition(AUTO_PROXY_CREATOR_BEAN_NAME);
definition.getPropertyValues().add("exposeProxy", Boolean.TRUE);
}
}
private static BeanDefinition registerOrEscalateApcAsRequired(Class cls, BeanDefinitionRegistry registry, Object source) {
Assert.notNull(registry, "BeanDefinitionRegistry must not be null");
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2009 the original author or authors.
* Copyright 2002-2010 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -46,6 +46,11 @@ public abstract class AopNamespaceUtils {
*/
public static final String PROXY_TARGET_CLASS_ATTRIBUTE = "proxy-target-class";
/**
* The <code>expose-proxy</code> attribute as found on AOP-related XML tags.
*/
private static final String EXPOSE_PROXY_ATTRIBUTE = "expose-proxy";
public static void registerAutoProxyCreatorIfNecessary(
ParserContext parserContext, Element sourceElement) {
@@ -102,6 +107,10 @@ public abstract class AopNamespaceUtils {
if (proxyTargetClass) {
AopConfigUtils.forceAutoProxyCreatorToUseClassProxying(registry);
}
boolean exposeProxy = Boolean.valueOf(sourceElement.getAttribute(EXPOSE_PROXY_ATTRIBUTE));
if (exposeProxy) {
AopConfigUtils.forceAutoProxyCreatorToExposeProxy(registry);
}
}
}
@@ -102,20 +102,17 @@ class ConfigBeanDefinitionParser implements BeanDefinitionParser {
configureAutoProxyCreator(parserContext, element);
NodeList childNodes = element.getChildNodes();
for (int i = 0; i < childNodes.getLength(); i++) {
Node node = childNodes.item(i);
if (node.getNodeType() == Node.ELEMENT_NODE) {
String localName = parserContext.getDelegate().getLocalName(node);
if (POINTCUT.equals(localName)) {
parsePointcut((Element) node, parserContext);
}
else if (ADVISOR.equals(localName)) {
parseAdvisor((Element) node, parserContext);
}
else if (ASPECT.equals(localName)) {
parseAspect((Element) node, parserContext);
}
List<Element> childElts = DomUtils.getChildElements(element);
for (Element elt: childElts) {
String localName = parserContext.getDelegate().getLocalName(elt);
if (POINTCUT.equals(localName)) {
parsePointcut(elt, parserContext);
}
else if (ADVISOR.equals(localName)) {
parseAdvisor(elt, parserContext);
}
else if (ASPECT.equals(localName)) {
parseAspect(elt, parserContext);
}
}
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2009 the original author or authors.
* Copyright 2002-2010 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -162,7 +162,7 @@ public class AdvisedSupport extends ProxyConfig implements Advised {
this.targetSource = EmptyTargetSource.forClass(targetClass);
}
public Class getTargetClass() {
public Class<?> getTargetClass() {
return this.targetSource.getTargetClass();
}
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2009 the original author or authors.
* Copyright 2002-2010 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -76,7 +76,12 @@ public abstract class AopContext {
*/
static Object setCurrentProxy(Object proxy) {
Object old = currentProxy.get();
currentProxy.set(proxy);
if (proxy != null) {
currentProxy.set(proxy);
}
else {
currentProxy.remove();
}
return old;
}
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2008 the original author or authors.
* Copyright 2002-2010 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -19,6 +19,10 @@ package org.springframework.aop.framework;
import java.util.Arrays;
import org.springframework.aop.SpringProxy;
import org.springframework.aop.TargetClassAware;
import org.springframework.aop.TargetSource;
import org.springframework.aop.support.AopUtils;
import org.springframework.aop.target.SingletonTargetSource;
import org.springframework.util.Assert;
/**
@@ -34,6 +38,37 @@ import org.springframework.util.Assert;
*/
public abstract class AopProxyUtils {
/**
* Determine the ultimate target class of the given bean instance, traversing
* not only a top-level proxy but any number of nested proxies as well -
* as long as possible without side effects, that is, just for singleton targets.
* @param candidate the instance to check (might be an AOP proxy)
* @return the target class (or the plain class of the given object as fallback;
* never <code>null</code>)
* @see org.springframework.aop.TargetClassAware#getTargetClass()
* @see org.springframework.aop.framework.Advised#getTargetSource()
*/
public static Class<?> ultimateTargetClass(Object candidate) {
Assert.notNull(candidate, "Candidate object must not be null");
Object current = candidate;
Class<?> result = null;
while (current instanceof TargetClassAware) {
result = ((TargetClassAware) current).getTargetClass();
Object nested = null;
if (current instanceof Advised) {
TargetSource targetSource = ((Advised) current).getTargetSource();
if (targetSource instanceof SingletonTargetSource) {
nested = ((SingletonTargetSource) targetSource).getTarget();
}
}
current = nested;
}
if (result == null) {
result = (AopUtils.isCglibProxy(candidate) ? candidate.getClass().getSuperclass() : candidate.getClass());
}
return result;
}
/**
* Determine the complete set of interfaces to proxy for the given AOP configuration.
* <p>This will always add the {@link Advised} interface unless the AdvisedSupport's
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2008 the original author or authors.
* Copyright 2002-2010 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -268,7 +268,7 @@ final class Cglib2AopProxy implements AopProxy, Serializable {
// Choose a "straight to target" interceptor. (used for calls that are
// unadvised but can return this). May be required to expose the proxy.
Callback targetInterceptor = null;
Callback targetInterceptor;
if (exposeProxy) {
targetInterceptor = isStatic ?
new StaticUnadvisedExposedInterceptor(this.advised.getTargetSource().getTarget()) :
@@ -316,12 +316,8 @@ final class Cglib2AopProxy implements AopProxy, Serializable {
// Now copy both the callbacks from mainCallbacks
// and fixedCallbacks into the callbacks array.
callbacks = new Callback[mainCallbacks.length + fixedCallbacks.length];
for (int x = 0; x < mainCallbacks.length; x++) {
callbacks[x] = mainCallbacks[x];
}
for (int x = 0; x < fixedCallbacks.length; x++) {
callbacks[x + mainCallbacks.length] = fixedCallbacks[x];
}
System.arraycopy(mainCallbacks, 0, callbacks, 0, mainCallbacks.length);
System.arraycopy(fixedCallbacks, 0, callbacks, mainCallbacks.length, fixedCallbacks.length);
this.fixedInterceptorOffset = mainCallbacks.length;
}
else {
@@ -610,7 +606,7 @@ final class Cglib2AopProxy implements AopProxy, Serializable {
targetClass = target.getClass();
}
List<Object> chain = this.advised.getInterceptorsAndDynamicInterceptionAdvice(method, targetClass);
Object retVal = null;
Object retVal;
// Check whether we only have one InvokerInterceptor: that is,
// no real advice, but just reflective invocation of the target.
if (chain.isEmpty() && Modifier.isPublic(method.getModifiers())) {
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2009 the original author or authors.
* Copyright 2002-2010 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -146,7 +146,7 @@ final class JdkDynamicAopProxy implements AopProxy, InvocationHandler, Serializa
* unless a hook method throws an exception.
*/
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
MethodInvocation invocation = null;
MethodInvocation invocation;
Object oldProxy = null;
boolean setProxyContext = false;
@@ -169,7 +169,7 @@ final class JdkDynamicAopProxy implements AopProxy, InvocationHandler, Serializa
return AopUtils.invokeJoinpointUsingReflection(this.advised, method, args);
}
Object retVal = null;
Object retVal;
if (this.advised.exposeProxy) {
// Make invocation available if necessary.
@@ -239,7 +239,7 @@ final class JdkDynamicAopProxy implements AopProxy, InvocationHandler, Serializa
return false;
}
JdkDynamicAopProxy otherProxy = null;
JdkDynamicAopProxy otherProxy;
if (other instanceof JdkDynamicAopProxy) {
otherProxy = (JdkDynamicAopProxy) other;
}
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2007 the original author or authors.
* Copyright 2002-2010 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -113,12 +113,14 @@ public class ProxyConfig implements Serializable {
* ThreadLocal for retrieval via the AopContext class. This is useful
* if an advised object needs to call another advised method on itself.
* (If it uses <code>this</code>, the invocation will not be advised).
* <p>Default is "false", for optimal performance.
* <p>Default is "false", in order to avoid unnecessary extra interception.
* This means that no guarantees are provided that AopContext access will
* work consistently within any method of the advised object.
*/
public void setExposeProxy(boolean exposeProxy) {
this.exposeProxy = exposeProxy;
}
/**
* Return whether the AOP proxy will expose the AOP proxy for
* each invocation.
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2007 the original author or authors.
* Copyright 2002-2010 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -52,7 +52,7 @@ public abstract class AutoProxyUtils {
* @return whether the given bean should be proxied with its target class
*/
public static boolean shouldProxyTargetClass(ConfigurableListableBeanFactory beanFactory, String beanName) {
if (beanFactory.containsBeanDefinition(beanName)) {
if (beanName != null && beanFactory.containsBeanDefinition(beanName)) {
BeanDefinition bd = beanFactory.getBeanDefinition(beanName);
return Boolean.TRUE.equals(bd.getAttribute(PRESERVE_TARGET_CLASS_ATTRIBUTE));
}
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2008 the original author or authors.
* Copyright 2002-2010 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -84,6 +84,15 @@ public class BeanNameAutoProxyCreator extends AbstractAutoProxyCreator {
if (isMatch(beanName, mappedName)) {
return PROXY_WITHOUT_ADDITIONAL_INTERCEPTORS;
}
BeanFactory beanFactory = getBeanFactory();
if (beanFactory != null) {
String[] aliases = beanFactory.getAliases(beanName);
for (String alias : aliases) {
if (isMatch(alias, mappedName)) {
return PROXY_WITHOUT_ADDITIONAL_INTERCEPTORS;
}
}
}
}
}
return DO_NOT_PROXY;
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2009 the original author or authors.
* Copyright 2002-2011 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -46,7 +46,12 @@ public class ProxyCreationContext {
* @param beanName the name of the bean, or <code>null</code> to reset it
*/
static void setCurrentProxiedBeanName(String beanName) {
currentProxiedBeanName.set(beanName);
if (beanName != null) {
currentProxiedBeanName.set(beanName);
}
else {
currentProxiedBeanName.remove();
}
}
}
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2007 the original author or authors.
* Copyright 2002-2010 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -45,7 +45,7 @@ public abstract class ExposeBeanNameAdvisors {
* Binding for the bean name of the bean which is currently being invoked
* in the ReflectiveMethodInvocation userAttributes Map.
*/
private static final String BEAN_NAME_ATTRIBUTE = ExposeBeanNameAdvisors.class.getName() + ".beanName";
private static final String BEAN_NAME_ATTRIBUTE = ExposeBeanNameAdvisors.class.getName() + ".BEAN_NAME";
/**
@@ -114,7 +114,7 @@ public abstract class ExposeBeanNameAdvisors {
throw new IllegalStateException("MethodInvocation is not a Spring ProxyMethodInvocation: " + mi);
}
ProxyMethodInvocation pmi = (ProxyMethodInvocation) mi;
pmi.setUserAttribute(BEAN_NAME_ATTRIBUTE, beanName);
pmi.setUserAttribute(BEAN_NAME_ATTRIBUTE, this.beanName);
return mi.proceed();
}
}
@@ -137,7 +137,7 @@ public abstract class ExposeBeanNameAdvisors {
throw new IllegalStateException("MethodInvocation is not a Spring ProxyMethodInvocation: " + mi);
}
ProxyMethodInvocation pmi = (ProxyMethodInvocation) mi;
pmi.setUserAttribute(BEAN_NAME_ATTRIBUTE, beanName);
pmi.setUserAttribute(BEAN_NAME_ATTRIBUTE, this.beanName);
return super.invoke(mi);
}
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2009 the original author or authors.
* Copyright 2002-2011 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -70,8 +70,9 @@ public class ExposeInvocationInterceptor implements MethodInterceptor, Ordered,
MethodInvocation mi = invocation.get();
if (mi == null)
throw new IllegalStateException(
"No MethodInvocation found: Check that an AOP invocation is in progress, " +
"and that the ExposeInvocationInterceptor is in the interceptor chain.");
"No MethodInvocation found: Check that an AOP invocation is in progress, and that the " +
"ExposeInvocationInterceptor is upfront in the interceptor chain. Specifically, note that " +
"advices with order HIGHEST_PRECEDENCE will execute before ExposeInvocationInterceptor!");
return mi;
}
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2009 the original author or authors.
* Copyright 2002-2010 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -53,28 +53,29 @@ public abstract class ScopedProxyUtils {
// Create a scoped proxy definition for the original bean name,
// "hiding" the target bean in an internal target definition.
RootBeanDefinition scopedProxyDefinition = new RootBeanDefinition(ScopedProxyFactoryBean.class);
scopedProxyDefinition.setOriginatingBeanDefinition(definition.getBeanDefinition());
scopedProxyDefinition.setSource(definition.getSource());
scopedProxyDefinition.setRole(BeanDefinition.ROLE_INFRASTRUCTURE);
RootBeanDefinition proxyDefinition = new RootBeanDefinition(ScopedProxyFactoryBean.class);
proxyDefinition.setOriginatingBeanDefinition(definition.getBeanDefinition());
proxyDefinition.setSource(definition.getSource());
proxyDefinition.setRole(BeanDefinition.ROLE_INFRASTRUCTURE);
String targetBeanName = getTargetBeanName(originalBeanName);
scopedProxyDefinition.getPropertyValues().add("targetBeanName", targetBeanName);
proxyDefinition.getPropertyValues().add("targetBeanName", targetBeanName);
if (proxyTargetClass) {
targetDefinition.setAttribute(AutoProxyUtils.PRESERVE_TARGET_CLASS_ATTRIBUTE, Boolean.TRUE);
// ScopedFactoryBean's "proxyTargetClass" default is TRUE, so we don't need to set it explicitly here.
}
else {
scopedProxyDefinition.getPropertyValues().add("proxyTargetClass", Boolean.FALSE);
proxyDefinition.getPropertyValues().add("proxyTargetClass", Boolean.FALSE);
}
// Copy autowire settings from original bean definition.
proxyDefinition.setAutowireCandidate(targetDefinition.isAutowireCandidate());
proxyDefinition.setPrimary(targetDefinition.isPrimary());
if (targetDefinition instanceof AbstractBeanDefinition) {
scopedProxyDefinition.copyQualifiersFrom((AbstractBeanDefinition) targetDefinition);
proxyDefinition.copyQualifiersFrom((AbstractBeanDefinition) targetDefinition);
}
scopedProxyDefinition.setAutowireCandidate(targetDefinition.isAutowireCandidate());
scopedProxyDefinition.setPrimary(targetDefinition.isPrimary());
// The target bean should be ignored in favor of the scoped proxy.
targetDefinition.setAutowireCandidate(false);
targetDefinition.setPrimary(false);
@@ -84,7 +85,7 @@ public abstract class ScopedProxyUtils {
// Return the scoped proxy definition as primary bean definition
// (potentially an inner bean).
return new BeanDefinitionHolder(scopedProxyDefinition, originalBeanName, definition.getAliases());
return new BeanDefinitionHolder(proxyDefinition, originalBeanName, definition.getAliases());
}
/**
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2007 the original author or authors.
* Copyright 2002-2010 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,6 +16,9 @@
package org.springframework.aop.support;
import java.io.IOException;
import java.io.ObjectInputStream;
import org.aopalliance.aop.Advice;
import org.springframework.beans.factory.BeanFactory;
@@ -41,9 +44,9 @@ public abstract class AbstractBeanFactoryPointcutAdvisor extends AbstractPointcu
private BeanFactory beanFactory;
private Advice advice;
private transient Advice advice;
private final Object adviceMonitor = new Object();
private transient volatile Object adviceMonitor = new Object();
/**
@@ -74,7 +77,7 @@ public abstract class AbstractBeanFactoryPointcutAdvisor extends AbstractPointcu
synchronized (this.adviceMonitor) {
if (this.advice == null && this.adviceBeanName != null) {
Assert.state(this.beanFactory != null, "BeanFactory must be set to resolve 'adviceBeanName'");
this.advice = (Advice) this.beanFactory.getBean(this.adviceBeanName, Advice.class);
this.advice = this.beanFactory.getBean(this.adviceBeanName, Advice.class);
}
return this.advice;
}
@@ -85,4 +88,17 @@ public abstract class AbstractBeanFactoryPointcutAdvisor extends AbstractPointcu
return getClass().getName() + ": advice bean '" + getAdviceBeanName() + "'";
}
//---------------------------------------------------------------------
// Serialization support
//---------------------------------------------------------------------
private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException {
// Rely on default serialization, just initialize state after deserialization.
ois.defaultReadObject();
// Initialize transient fields.
this.adviceMonitor = new Object();
}
}
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2009 the original author or authors.
* Copyright 2002-2010 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -85,7 +85,7 @@ public abstract class AopUtils {
* Check whether the specified class is a CGLIB-generated class.
* @param clazz the class to check
*/
public static boolean isCglibProxyClass(Class clazz) {
public static boolean isCglibProxyClass(Class<?> clazz) {
return (clazz != null && isCglibProxyClassName(clazz.getName()));
}
@@ -98,22 +98,24 @@ public abstract class AopUtils {
}
/**
* Determine the target class of the given bean instance,
* which might be an AOP proxy.
* Determine the target class of the given bean instance which might be an AOP proxy.
* <p>Returns the target class for an AOP proxy and the plain class else.
* @param candidate the instance to check (might be an AOP proxy)
* @return the target class (or the plain class of the given object as fallback)
* @return the target class (or the plain class of the given object as fallback;
* never <code>null</code>)
* @see org.springframework.aop.TargetClassAware#getTargetClass()
* @see org.springframework.aop.framework.AopProxyUtils#ultimateTargetClass(Object)
*/
public static Class getTargetClass(Object candidate) {
public static Class<?> getTargetClass(Object candidate) {
Assert.notNull(candidate, "Candidate object must not be null");
Class<?> result = null;
if (candidate instanceof TargetClassAware) {
return ((TargetClassAware) candidate).getTargetClass();
result = ((TargetClassAware) candidate).getTargetClass();
}
if (isCglibProxy(candidate)) {
return candidate.getClass().getSuperclass();
if (result == null) {
result = (isCglibProxy(candidate) ? candidate.getClass().getSuperclass() : candidate.getClass());
}
return candidate.getClass();
return result;
}
/**
@@ -165,7 +167,7 @@ public abstract class AopUtils {
* <code>targetClass</code> doesn't implement it or is <code>null</code>
* @see org.springframework.util.ClassUtils#getMostSpecificMethod
*/
public static Method getMostSpecificMethod(Method method, Class targetClass) {
public static Method getMostSpecificMethod(Method method, Class<?> targetClass) {
Method resolvedMethod = ClassUtils.getMostSpecificMethod(method, targetClass);
// If we are dealing with method with generic parameters, find the original method.
return BridgeMethodResolver.findBridgedMethod(resolvedMethod);
@@ -180,7 +182,7 @@ public abstract class AopUtils {
* @param targetClass the class to test
* @return whether the pointcut can apply on any method
*/
public static boolean canApply(Pointcut pc, Class targetClass) {
public static boolean canApply(Pointcut pc, Class<?> targetClass) {
return canApply(pc, targetClass, false);
}
@@ -194,7 +196,7 @@ public abstract class AopUtils {
* for this bean includes any introductions
* @return whether the pointcut can apply on any method
*/
public static boolean canApply(Pointcut pc, Class targetClass, boolean hasIntroductions) {
public static boolean canApply(Pointcut pc, Class<?> targetClass, boolean hasIntroductions) {
if (!pc.getClassFilter().matches(targetClass)) {
return false;
}
@@ -207,7 +209,7 @@ public abstract class AopUtils {
Set<Class> classes = new HashSet<Class>(ClassUtils.getAllInterfacesForClassAsSet(targetClass));
classes.add(targetClass);
for (Class clazz : classes) {
for (Class<?> clazz : classes) {
Method[] methods = clazz.getMethods();
for (Method method : methods) {
if ((introductionAwareMethodMatcher != null &&
@@ -229,7 +231,7 @@ public abstract class AopUtils {
* @param targetClass class we're testing
* @return whether the pointcut can apply on any method
*/
public static boolean canApply(Advisor advisor, Class targetClass) {
public static boolean canApply(Advisor advisor, Class<?> targetClass) {
return canApply(advisor, targetClass, false);
}
@@ -243,7 +245,7 @@ public abstract class AopUtils {
* any introductions
* @return whether the pointcut can apply on any method
*/
public static boolean canApply(Advisor advisor, Class targetClass, boolean hasIntroductions) {
public static boolean canApply(Advisor advisor, Class<?> targetClass, boolean hasIntroductions) {
if (advisor instanceof IntroductionAdvisor) {
return ((IntroductionAdvisor) advisor).getClassFilter().matches(targetClass);
}
@@ -265,7 +267,7 @@ public abstract class AopUtils {
* @return sublist of Advisors that can apply to an object of the given class
* (may be the incoming List as-is)
*/
public static List<Advisor> findAdvisorsThatCanApply(List<Advisor> candidateAdvisors, Class clazz) {
public static List<Advisor> findAdvisorsThatCanApply(List<Advisor> candidateAdvisors, Class<?> clazz) {
if (candidateAdvisors.isEmpty()) {
return candidateAdvisors;
}
@@ -299,7 +301,7 @@ public abstract class AopUtils {
* @throws org.springframework.aop.AopInvocationException in case of a reflection error
*/
public static Object invokeJoinpointUsingReflection(Object target, Method method, Object[] args)
throws Throwable {
throws Throwable {
// Use reflection to invoke the method.
try {
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2009 the original author or authors.
* Copyright 2002-2010 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,15 +16,12 @@
package org.springframework.aop.target;
import java.io.NotSerializableException;
import java.io.ObjectStreamException;
import java.io.Serializable;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.aop.TargetSource;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.BeanFactoryAware;
import org.springframework.util.ClassUtils;
@@ -65,7 +62,7 @@ public abstract class AbstractBeanFactoryBasedTargetSource
private String targetBeanName;
/** Class of the target */
private Class targetClass;
private Class<?> targetClass;
/**
* BeanFactory that owns this TargetSource. We need to hold onto this
@@ -108,7 +105,7 @@ public abstract class AbstractBeanFactoryBasedTargetSource
* Set the owning BeanFactory. We need to save a reference so that we can
* use the <code>getBean</code> method on every invocation.
*/
public void setBeanFactory(BeanFactory beanFactory) throws BeansException {
public void setBeanFactory(BeanFactory beanFactory) {
if (this.targetBeanName == null) {
throw new IllegalStateException("Property'targetBeanName' is required");
}
@@ -123,7 +120,7 @@ public abstract class AbstractBeanFactoryBasedTargetSource
}
public synchronized Class getTargetClass() {
public synchronized Class<?> getTargetClass() {
if (this.targetClass == null && this.beanFactory != null) {
// Determine type of the target bean.
this.targetClass = this.beanFactory.getType(this.targetBeanName);
@@ -131,7 +128,10 @@ public abstract class AbstractBeanFactoryBasedTargetSource
if (logger.isTraceEnabled()) {
logger.trace("Getting bean with name '" + this.targetBeanName + "' in order to determine type");
}
this.targetClass = this.beanFactory.getBean(this.targetBeanName).getClass();
Object beanInstance = this.beanFactory.getBean(this.targetBeanName);
if (beanInstance != null) {
this.targetClass = beanInstance.getClass();
}
}
}
return this.targetClass;
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2007 the original author or authors.
* Copyright 2002-2010 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -64,7 +64,7 @@ public abstract class AbstractLazyCreationTargetSource implements TargetSource {
* a meaningful value when the target is still <code>null</code>.
* @see #isInitialized()
*/
public synchronized Class getTargetClass() {
public synchronized Class<?> getTargetClass() {
return (this.lazyTarget != null ? this.lazyTarget.getClass() : null);
}
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2009 the original author or authors.
* Copyright 2002-2011 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,7 +16,9 @@
package org.springframework.aop.target;
import java.io.IOException;
import java.io.NotSerializableException;
import java.io.ObjectInputStream;
import java.io.ObjectStreamException;
import org.springframework.beans.BeansException;
@@ -91,6 +93,11 @@ public abstract class AbstractPrototypeBasedTargetSource extends AbstractBeanFac
// Serialization support
//---------------------------------------------------------------------
private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException {
throw new NotSerializableException("A prototype-based TargetSource itself is not deserializable - " +
"just a disconnected SingletonTargetSource is");
}
/**
* Replaces this object with a SingletonTargetSource on serialization.
* Protected as otherwise it won't be invoked for subclasses.
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2007 the original author or authors.
* Copyright 2002-2010 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -89,7 +89,7 @@ public class EmptyTargetSource implements TargetSource, Serializable {
/**
* Always returns the specified target Class, or <code>null</code> if none.
*/
public Class getTargetClass() {
public Class<?> getTargetClass() {
return this.targetClass;
}
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2007 the original author or authors.
* Copyright 2002-2010 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -59,7 +59,7 @@ public class HotSwappableTargetSource implements TargetSource, Serializable {
* Return the type of the current target object.
* <p>The returned type should usually be constant across all target objects.
*/
public synchronized Class getTargetClass() {
public synchronized Class<?> getTargetClass() {
return this.target.getClass();
}
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2007 the original author or authors.
* Copyright 2002-2010 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -55,7 +55,7 @@ public class SingletonTargetSource implements TargetSource, Serializable {
}
public Class getTargetClass() {
public Class<?> getTargetClass() {
return this.target.getClass();
}
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2008 the original author or authors.
* Copyright 2002-2010 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -106,7 +106,7 @@ public class ThreadLocalTargetSource extends AbstractPrototypeBasedTargetSource
this.targetSet.clear();
}
// Clear ThreadLocal, just in case.
this.targetInThread.set(null);
this.targetInThread.remove();
}
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2008 the original author or authors.
* Copyright 2002-2010 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -63,7 +63,7 @@ public abstract class AbstractRefreshableTargetSource implements TargetSource, R
}
public synchronized Class getTargetClass() {
public synchronized Class<?> getTargetClass() {
if (this.targetObject == null) {
refresh();
}
@@ -56,6 +56,15 @@
]]></xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="expose-proxy" type="xsd:boolean" default="false">
<xsd:annotation>
<xsd:documentation><![CDATA[
Indicate that the proxy should be exposed by the AOP framework as a
ThreadLocal for retrieval via the AopContext class. Off by default,
i.e. no guarantees that AopContext access will work.
]]></xsd:documentation>
</xsd:annotation>
</xsd:attribute>
</xsd:complexType>
</xsd:element>
@@ -84,6 +93,15 @@
]]></xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="expose-proxy" type="xsd:boolean" default="false">
<xsd:annotation>
<xsd:documentation><![CDATA[
Indicate that the proxy should be exposed by the AOP framework as a
ThreadLocal for retrieval via the AopContext class. Off by default,
i.e. no guarantees that AopContext access will work.
]]></xsd:documentation>
</xsd:annotation>
</xsd:attribute>
</xsd:complexType>
</xsd:element>
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2008 the original author or authors.
* Copyright 2002-2010 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,15 +16,14 @@
package org.springframework.aop.aspectj.annotation;
import static org.junit.Assert.*;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import static org.junit.Assert.*;
import org.junit.Ignore;
import org.junit.Test;
import test.aop.PerThisAspect;
import test.util.SerializationTestUtils;
/**
* @author Rob Harrop
@@ -76,6 +75,7 @@ public final class AspectProxyFactoryTests {
}
@Test
@Ignore // InstantiationModelAwarePointcutAdvisorImpl not serializable yet
public void testWithInstance() throws Exception {
MultiplyReturnValue aspect = new MultiplyReturnValue();
int multiple = 3;
@@ -88,8 +88,10 @@ public final class AspectProxyFactoryTests {
proxyFactory.addAspect(aspect);
ITestBean proxy = proxyFactory.getProxy();
assertEquals(target.getAge() * multiple, proxy.getAge());
ITestBean serializedProxy = (ITestBean) SerializationTestUtils.serializeAndDeserialize(proxy);
assertEquals(target.getAge() * multiple, serializedProxy.getAge());
}
@Test(expected=IllegalArgumentException.class)
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2009 the original author or authors.
* Copyright 2002-2010 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -293,20 +293,33 @@ public final class ProxyFactoryTests {
public void testProxyTargetClassWithInterfaceAsTarget() {
ProxyFactory pf = new ProxyFactory();
pf.setTargetClass(ITestBean.class);
Object proxy = pf.getProxy();
assertTrue("Proxy is a JDK proxy", AopUtils.isJdkDynamicProxy(proxy));
assertTrue(proxy instanceof ITestBean);
assertEquals(ITestBean.class, AopProxyUtils.ultimateTargetClass(proxy));
ProxyFactory pf2 = new ProxyFactory(proxy);
Object proxy2 = pf2.getProxy();
assertTrue("Proxy is a JDK proxy", AopUtils.isJdkDynamicProxy(proxy2));
assertTrue(proxy2 instanceof ITestBean);
assertEquals(ITestBean.class, AopProxyUtils.ultimateTargetClass(proxy2));
}
@Test
public void testProxyTargetClassWithConcreteClassAsTarget() {
ProxyFactory pf = new ProxyFactory();
pf.setTargetClass(TestBean.class);
Object proxy = pf.getProxy();
assertTrue("Proxy is a CGLIB proxy", AopUtils.isCglibProxy(proxy));
assertTrue(proxy instanceof TestBean);
assertEquals(TestBean.class, AopProxyUtils.ultimateTargetClass(proxy));
ProxyFactory pf2 = new ProxyFactory(proxy);
pf2.setProxyTargetClass(true);
Object proxy2 = pf2.getProxy();
assertTrue("Proxy is a CGLIB proxy", AopUtils.isCglibProxy(proxy2));
assertTrue(proxy2 instanceof TestBean);
assertEquals(TestBean.class, AopProxyUtils.ultimateTargetClass(proxy2));
}
@Test
+4 -4
View File
@@ -8,10 +8,10 @@ Import-Template:
org.aopalliance.*;version="[1.0.0, 2.0.0)",
org.apache.commons.logging.*;version="[1.1.1, 2.0.0)",
org.apache.commons.pool.*;version="[1.3.0, 2.0.0)";resolution:=optional,
org.aspectj.*;version="[1.5.4, 2.0.0)";resolution:=optional,
org.springframework.beans.*;version="[3.0.0, 3.0.1)";resolution:=optional,
org.springframework.core.*;version="[3.0.0, 3.0.1)",
org.springframework.util.*;version="[3.0.0, 3.0.1)",
org.aspectj.*;version=${aj.osgi.range};resolution:=optional,
org.springframework.beans.*;version=${spring.osgi.range};resolution:=optional,
org.springframework.core.*;version=${spring.osgi.range},
org.springframework.util.*;version=${spring.osgi.range},
org.w3c.dom.*;version="0";resolution:=optional
Ignored-Existing-Headers:
Bnd-LastModified,
+13 -1
View File
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="org.springframework.asm" xmlns:ivy="antlib:org.apache.ivy.ant">
<project name="org.springframework.asm" xmlns:ivy="antlib:org.apache.ivy.ant"
xmlns:bundlor="antlib:com.springsource.bundlor.ant">
<property file="${basedir}/../build.properties"/>
<import file="${basedir}/../build-spring-framework/package-bundle.xml"/>
<import file="${basedir}/../spring-build/standard/default.xml"/>
@@ -35,6 +36,7 @@
<artifacts pattern="${jar.output.dir}/[artifact].[ext]"/>
<artifacts pattern="${source-jar.output.dir}/[artifact].[ext]"/>
<artifacts pattern="${ivy.output.dir}/[artifact].[ext]"/>
<artifacts pattern="${license.dir}/[artifact].[ext]"/>
</ivy:publish>
</target>
@@ -45,4 +47,14 @@
<taskdef name="jarjar" classname="com.tonicsystems.jarjar.JarJarTask" classpathref="jarjar.classpath"/>
</target>
<target name="bundlor" depends="bundlor.init" unless="disable.bundlor">
<bundlor:bundlor inputPath="${jar.output.file}" outputPath="${jar.output.file}"
bundleVersion="${bundle.version}" manifestTemplatePath="${manifest.template.file}"
failOnWarnings="${fail.on.warnings}">
<propertyset refid="bundlor.properties"/>
<propertyset>
<propertyref builtin="all"/>
</propertyset>
</bundlor:bundlor>
</target>
</project>
+2
View File
@@ -17,6 +17,8 @@
<publications>
<artifact name="${ant.project.name}"/>
<artifact name="${ant.project.name}-sources" type="src" ext="jar"/>
<artifact name="license" type="license" ext="txt"/>
<artifact name="notice" type="notice" ext="txt"/>
</publications>
<dependencies>
+56 -56
View File
@@ -1,56 +1,56 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>org.springframework</groupId>
<artifactId>spring-asm</artifactId>
<packaging>jar</packaging>
<version>3.0.0.BUILD-SNAPSHOT</version>
<parent>
<groupId>org.springframework</groupId>
<artifactId>spring-parent</artifactId>
<relativePath>../org.springframework.spring-parent</relativePath>
<version>3.0.0.BUILD-SNAPSHOT</version>
</parent>
<build>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>jarjar</id>
<phase>process-classes</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<taskdef name="jarjar" classname="com.tonicsystems.jarjar.JarJarTask" classpathref="maven.plugin.classpath" />
<jarjar jarfile="${project.build.directory}${file.separator}${project.build.finalName}-jarjar.jar">
<zipfileset src="${project.build.directory}/jarjar-staging/com.springsource.org.objectweb.asm.jar"/>
<zipfileset src="${project.build.directory}/jarjar-staging/com.springsource.org.objectweb.asm.commons.jar"/>
<rule pattern="org.objectweb.asm.**" result="org.springframework.asm.@1"/>
</jarjar>
<unjar src="${project.build.directory}${file.separator}${project.build.finalName}-jarjar.jar"
dest="${project.build.outputDirectory}">
<patternset>
<include name="**/*.class"/>
<exclude name="*"/>
</patternset>
</unjar>
</tasks>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>com.google.code</groupId>
<artifactId>jarjar</artifactId>
<version>1.0</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project>
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>org.springframework</groupId>
<artifactId>spring-asm</artifactId>
<packaging>jar</packaging>
<version>3.0.8.BUILD-SNAPSHOT</version>
<parent>
<groupId>org.springframework</groupId>
<artifactId>spring-parent</artifactId>
<relativePath>../org.springframework.spring-parent</relativePath>
<version>3.0.8.BUILD-SNAPSHOT</version>
</parent>
<build>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>jarjar</id>
<phase>process-classes</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<taskdef name="jarjar" classname="com.tonicsystems.jarjar.JarJarTask" classpathref="maven.plugin.classpath" />
<jarjar jarfile="${project.build.directory}${file.separator}${project.build.finalName}-jarjar.jar">
<zipfileset src="${project.build.directory}/jarjar-staging/com.springsource.org.objectweb.asm.jar"/>
<zipfileset src="${project.build.directory}/jarjar-staging/com.springsource.org.objectweb.asm.commons.jar"/>
<rule pattern="org.objectweb.asm.**" result="org.springframework.asm.@1"/>
</jarjar>
<unjar src="${project.build.directory}${file.separator}${project.build.finalName}-jarjar.jar"
dest="${project.build.outputDirectory}">
<patternset>
<include name="**/*.class"/>
<exclude name="*"/>
</patternset>
</unjar>
</tasks>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>com.google.code</groupId>
<artifactId>jarjar</artifactId>
<version>1.0</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project>
+1 -1
View File
@@ -13,7 +13,7 @@
<classpathentry combineaccessrules="false" kind="src" path="/org.springframework.transaction"/>
<classpathentry combineaccessrules="false" kind="src" path="/org.springframework.test"/>
<classpathentry kind="var" path="IVY_CACHE/org.apache.commons/com.springsource.org.apache.commons.logging/1.1.1/com.springsource.org.apache.commons.logging-1.1.1.jar" sourcepath="/IVY_CACHE/org.apache.commons/com.springsource.org.apache.commons.logging/1.1.1/com.springsource.org.apache.commons.logging-sources-1.1.1.jar"/>
<classpathentry kind="var" path="IVY_CACHE/org.aspectj/com.springsource.org.aspectj.weaver/1.6.5.RELEASE/com.springsource.org.aspectj.weaver-1.6.5.RELEASE.jar" sourcepath="/IVY_CACHE/org.aspectj/com.springsource.org.aspectj.weaver/1.6.5.RELEASE/com.springsource.org.aspectj.weaver-sources-1.6.5.RELEASE.jar"/>
<classpathentry kind="var" path="IVY_CACHE/org.aspectj/com.springsource.org.aspectj.weaver/1.6.8.RELEASE/com.springsource.org.aspectj.weaver-1.6.8.RELEASE.jar" sourcepath="/IVY_CACHE/org.aspectj/com.springsource.org.aspectj.weaver/1.6.8.RELEASE/com.springsource.org.aspectj.weaver-sources-1.6.8.RELEASE.jar"/>
<classpathentry kind="var" path="IVY_CACHE/org.junit/com.springsource.org.junit/4.7.0/com.springsource.org.junit-4.7.0.jar" sourcepath="/IVY_CACHE/org.junit/com.springsource.org.junit/4.7.0/com.springsource.org.junit-sources-4.7.0.jar"/>
<classpathentry kind="var" path="IVY_CACHE/javax.persistence/com.springsource.javax.persistence/1.0.0/com.springsource.javax.persistence-1.0.0.jar" sourcepath="/IVY_CACHE/javax.persistence/com.springsource.javax.persistence/1.0.0/com.springsource.javax.persistence-sources-1.0.0.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/org.springframework.orm"/>
+1
View File
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="org.springframework.aspects">
<property file="${basedir}/../build.properties"/>
<property file="${basedir}/../build.versions"/>
<import file="${basedir}/../build-spring-framework/package-bundle.xml"/>
<import file="${basedir}/../spring-build/aspect/default.xml"/>
+41 -38
View File
@@ -1,38 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="http://ivyrep.jayasoft.org/ivy-doc.xsl"?>
<ivy-module
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://incubator.apache.org/ivy/schemas/ivy.xsd"
version="1.3">
<info organisation="org.springframework" module="${ant.project.name}">
<license name="Apache 2.0" url="http://www.apache.org/licenses/LICENSE-2.0"/>
</info>
<configurations>
<include file="${spring.build.dir}/common/default-ivy-configurations.xml"/>
<conf name="aspectj" extends="runtime" description="JARs needed to run with AspectJ"/>
<conf name="tx" extends="runtime" description="JARs needed to run transactional aspects"/>
<conf name="orm" extends="runtime" description="JARs needed to compile JPA aspects"/>
</configurations>
<publications>
<artifact name="${ant.project.name}"/>
<artifact name="${ant.project.name}-sources" type="src" ext="jar"/>
</publications>
<dependencies>
<dependency org="org.apache.commons" name="com.springsource.org.apache.commons.logging" rev="1.1.1" conf="compile->compile"/>
<dependency org="org.aspectj" name="com.springsource.org.aspectj.weaver" rev="1.6.5.RELEASE" conf="optional, aspectj->compile"/>
<dependency org="org.springframework" name="org.springframework.beans" rev="latest.integration" conf="test->compile"/>
<dependency org="org.springframework" name="org.springframework.transaction" rev="latest.integration" conf="optional, tx->compile"/>
<dependency org="org.springframework" name="org.springframework.orm" rev="latest.integration" conf="optional,orm->compile"/>
<dependency org="org.springframework" name="org.springframework.test" rev="latest.integration" conf="test->runtime"/>
<dependency org="org.springframework" name="org.springframework.context" rev="latest.integration" conf="test->runtime"/>
<dependency org="org.springframework" name="org.springframework.context.support" rev="latest.integration" conf="test->runtime"/>
<dependency org="org.junit" name="com.springsource.org.junit" rev="4.7.0" conf="compile->compile"/>
<dependency org="javax.persistence" name="com.springsource.javax.persistence" rev="1.0.0" conf="provided, compile->compile"/>
<dependency org="javax.mail" name="com.springsource.javax.mail" rev="1.4.0" conf="test->compile"/>
</dependencies>
</ivy-module>
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="http://ivyrep.jayasoft.org/ivy-doc.xsl"?>
<ivy-module
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://incubator.apache.org/ivy/schemas/ivy.xsd"
version="1.3">
<info organisation="org.springframework" module="${ant.project.name}">
<license name="Apache 2.0" url="http://www.apache.org/licenses/LICENSE-2.0"/>
</info>
<configurations>
<include file="${spring.build.dir}/common/default-ivy-configurations.xml"/>
<conf name="commons-logging" extends="runtime" description="JARs needed to run with Commons Logging"/>
<conf name="aspectj" extends="runtime" description="JARs needed to run with AspectJ"/>
<conf name="tx" extends="runtime" description="JARs needed to run transactional aspects"/>
<conf name="orm" extends="runtime" description="JARs needed to compile JPA aspects"/>
</configurations>
<publications>
<artifact name="${ant.project.name}"/>
<artifact name="${ant.project.name}-sources" type="src" ext="jar"/>
<artifact name="license" type="license" ext="txt"/>
<artifact name="notice" type="notice" ext="txt"/>
</publications>
<dependencies>
<dependency org="org.apache.commons" name="com.springsource.org.apache.commons.logging" rev="1.1.1" conf="compile, commons-logging->compile"/>
<dependency org="org.aspectj" name="com.springsource.org.aspectj.weaver" rev="${aspectj.version}" conf="optional, aspectj->compile"/>
<dependency org="org.springframework" name="org.springframework.beans" rev="latest.integration" conf="test->compile"/>
<dependency org="org.springframework" name="org.springframework.transaction" rev="latest.integration" conf="optional, tx->compile"/>
<dependency org="org.springframework" name="org.springframework.orm" rev="latest.integration" conf="optional, orm->compile"/>
<dependency org="org.springframework" name="org.springframework.test" rev="latest.integration" conf="test->runtime"/>
<dependency org="org.springframework" name="org.springframework.context" rev="latest.integration" conf="test->runtime"/>
<dependency org="org.springframework" name="org.springframework.context.support" rev="latest.integration" conf="test->runtime"/>
<dependency org="javax.persistence" name="com.springsource.javax.persistence" rev="1.0.0" conf="optional, orm->compile"/>
<dependency org="org.junit" name="com.springsource.org.junit" rev="${junit.version}" conf="test->compile"/>
<dependency org="javax.mail" name="com.springsource.javax.mail" rev="1.4.0" conf="optional, test->compile"/>
</dependencies>
</ivy-module>
+90 -77
View File
@@ -1,77 +1,90 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>org.springframework</groupId>
<artifactId>spring-aspects</artifactId>
<packaging>jar</packaging>
<version>3.0.0.BUILD-SNAPSHOT</version>
<parent>
<groupId>org.springframework</groupId>
<artifactId>spring-parent</artifactId>
<relativePath>../org.springframework.spring-parent</relativePath>
<version>3.0.0.BUILD-SNAPSHOT</version>
</parent>
<dependencies>
<!-- common logging dependency is in spring-core -->
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
<version>${project.version}</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
<version>${project.version}</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.4</version>
<optional>true</optional>
</dependency>
</dependencies>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<junitArtifactName>junit:junit</junitArtifactName>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>org.springframework</groupId>
<artifactId>spring-aspects</artifactId>
<packaging>jar</packaging>
<version>3.0.8.BUILD-SNAPSHOT</version>
<parent>
<groupId>org.springframework</groupId>
<artifactId>spring-parent</artifactId>
<relativePath>../org.springframework.spring-parent</relativePath>
<version>3.0.8.BUILD-SNAPSHOT</version>
</parent>
<dependencies>
<!-- commons logging dependency is in spring-core -->
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
<version>${project.version}</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-orm</artifactId>
<version>${project.version}</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>javax.persistence</groupId>
<artifactId>persistence-api</artifactId>
<version>1.0</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.4</version>
<scope>test</scope>
<optional>true</optional>
</dependency>
</dependencies>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<junitArtifactName>junit:junit</junitArtifactName>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
@@ -1,3 +1,19 @@
/*
* Copyright 2002-2010 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.mock.staticmock;
import java.util.Arrays;
@@ -12,7 +28,6 @@ import java.util.List;
*
* @author Rod Johnson
* @author Ramnivas Laddad
*
*/
public abstract aspect AbstractMethodMockingControl percflow(mockStaticsTestMethod()) {
@@ -151,7 +166,7 @@ public abstract aspect AbstractMethodMockingControl percflow(mockStaticsTestMeth
expectations.verify();
}
Object around() : methodToMock() {
Object around() : methodToMock() && cflowbelow(mockStaticsTestMethod()) {
if (recording) {
expectations.expectCall(thisJoinPointStaticPart.toLongString(), thisJoinPoint.getArgs());
// Return value doesn't matter
@@ -1,18 +1,33 @@
package org.springframework.mock.staticmock;
/*
* Copyright 2002-2010 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import javax.persistence.Entity;
package org.springframework.mock.staticmock;
/**
* Annotation-based aspect to use in test build to enable mocking static methods
* on Entity classes, as used by Roo for finders.
* <br>
* Mocking will occur in the call stack of any method in a class (typically a test class)
* on JPA-annotated <code>@Entity</code> classes, as used by Roo for finders.
*
* <p>Mocking will occur in the call stack of any method in a class (typically a test class)
* that is annotated with the @MockStaticEntityMethods annotation.
* <br>
* Also provides static methods to simplify the programming model for
*
* <p>Also provides static methods to simplify the programming model for
* entering playback mode and setting expected return values.
* <br>
* Usage:<ol>
*
* <p>Usage:
* <ol>
* <li>Annotate a test class with @MockStaticEntityMethods.
* <li>In each test method, AnnotationDrivenStaticEntityMockingControl will begin in recording mode.
* Invoke static methods on Entity classes, with each recording-mode invocation
@@ -23,11 +38,9 @@ import javax.persistence.Entity;
* occur automatically.
* </ol>
*
* @see MockStaticEntityMethods
*
* @author Rod Johnson
* @author Ramnivas Laddad
*
* @see MockStaticEntityMethods
*/
public aspect AnnotationDrivenStaticEntityMockingControl extends AbstractMethodMockingControl {
@@ -50,6 +63,6 @@ public aspect AnnotationDrivenStaticEntityMockingControl extends AbstractMethodM
// @MockStatics classes to invoke each other without resetting the mocking environment
protected pointcut mockStaticsTestMethod() : execution(public * (@MockStaticEntityMethods *).*(..));
protected pointcut methodToMock() : execution(public static * (@Entity *).*(..));
protected pointcut methodToMock() : execution(public static * (@javax.persistence.Entity *).*(..));
}
@@ -1,3 +1,18 @@
/*
* Copyright 2002-2010 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.mock.staticmock;
import java.lang.annotation.ElementType;
@@ -8,11 +23,9 @@ import java.lang.annotation.Target;
/**
* Annotation to indicate a test class for whose @Test methods
* static methods on Entity classes should be mocked.
*
* @see AbstractMethodMockingControl
*
* @author Rod Johnson
*
* @author Rod Johnson
* @see AbstractMethodMockingControl
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
@@ -0,0 +1,75 @@
/*
* Copyright 2002-2010 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.scheduling.aspectj;
import java.util.concurrent.Callable;
import java.util.concurrent.Executor;
import java.util.concurrent.Future;
import org.aspectj.lang.reflect.MethodSignature;
import org.springframework.core.task.AsyncTaskExecutor;
import org.springframework.core.task.SimpleAsyncTaskExecutor;
import org.springframework.core.task.support.TaskExecutorAdapter;
/**
* Abstract aspect that routes selected methods asynchronously.
*
* <p>This aspect needs to be injected with an implementation of
* {@link Executor} to activate it for a specific thread pool.
* Otherwise it will simply delegate all calls synchronously.
*
* @author Ramnivas Laddad
* @author Juergen Hoeller
* @since 3.0.5
*/
public abstract aspect AbstractAsyncExecutionAspect {
private AsyncTaskExecutor asyncExecutor;
public void setExecutor(Executor executor) {
if (executor instanceof AsyncTaskExecutor) {
this.asyncExecutor = (AsyncTaskExecutor) executor;
}
else {
this.asyncExecutor = new TaskExecutorAdapter(executor);
}
}
Object around() : asyncMethod() {
if (this.asyncExecutor == null) {
return proceed();
}
Callable<Object> callable = new Callable<Object>() {
public Object call() throws Exception {
Object result = proceed();
if (result instanceof Future) {
return ((Future<?>) result).get();
}
return null;
}};
Future<?> result = this.asyncExecutor.submit(callable);
if (Future.class.isAssignableFrom(((MethodSignature) thisJoinPointStaticPart.getSignature()).getReturnType())) {
return result;
}
else {
return null;
}
}
public abstract pointcut asyncMethod();
}
@@ -0,0 +1,54 @@
/*
* Copyright 2002-2010 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.scheduling.aspectj;
import java.util.concurrent.Future;
import org.springframework.scheduling.annotation.Async;
/**
* Aspect to route methods based on the {@link Async} annotation.
*
* <p>This aspect routes methods marked with the {@link Async} annotation
* as well as methods in classes marked with the same. Any method expected
* to be routed asynchronously must return either void, {@link Future},
* or a subtype of {@link Future}. This aspect, therefore, will produce
* a compile-time error for methods that violate this constraint on the return type.
* If, however, a class marked with <code>&#64;Async</code> contains a method that
* violates this constraint, it produces only a warning.
*
* @author Ramnivas Laddad
* @since 3.0.5
*/
public aspect AnnotationAsyncExecutionAspect extends AbstractAsyncExecutionAspect {
private pointcut asyncMarkedMethod()
: execution(@Async (void || Future+) *(..));
private pointcut asyncTypeMarkedMethod()
: execution((void || Future+) (@Async *).*(..));
public pointcut asyncMethod() : asyncMarkedMethod() || asyncTypeMarkedMethod();
declare error:
execution(@Async !(void||Future) *(..)):
"Only methods that return void or Future may have an @Async annotation";
declare warning:
execution(!(void||Future) (@Async *).*(..)):
"Methods in a class marked with @Async that do not return void or Future will be routed synchronously";
}
@@ -1,93 +1,93 @@
/*
* Copyright 2002-2007 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.transaction.aspectj;
import java.lang.reflect.Method;
import org.aspectj.lang.annotation.SuppressAjWarnings;
import org.aspectj.lang.reflect.MethodSignature;
import org.springframework.transaction.interceptor.TransactionAspectSupport;
import org.springframework.transaction.interceptor.TransactionAttributeSource;
/**
* Abstract superaspect for AspectJ transaction aspects. Concrete
* subaspects will implement the <code>transactionalMethodExecution()</code>
* pointcut using a strategy such as Java 5 annotations.
*
* <p>Suitable for use inside or outside the Spring IoC container.
* Set the "transactionManager" property appropriately, allowing
* use of any transaction implementation supported by Spring.
*
* <p><b>NB:</b> If a method implements an interface that is itself
* transactionally annotated, the relevant Spring transaction attribute
* will <i>not</i> be resolved. This behavior will vary from that of Spring AOP
* if proxying an interface (but not when proxying a class). We recommend that
* transaction annotations should be added to classes, rather than business
* interfaces, as they are an implementation detail rather than a contract
* specification validation.
*
* @author Rod Johnson
* @author Ramnivas Laddad
* @since 2.0
*/
public abstract aspect AbstractTransactionAspect extends TransactionAspectSupport {
/**
* Construct object using the given transaction metadata retrieval strategy.
* @param tas TransactionAttributeSource implementation, retrieving Spring
* transaction metadata for each joinpoint. Write the subclass to pass in null
* if it's intended to be configured by Setter Injection.
*/
protected AbstractTransactionAspect(TransactionAttributeSource tas) {
setTransactionAttributeSource(tas);
}
@SuppressAjWarnings("adviceDidNotMatch")
before(Object txObject) : transactionalMethodExecution(txObject) {
MethodSignature methodSignature = (MethodSignature) thisJoinPoint.getSignature();
Method method = methodSignature.getMethod();
TransactionInfo txInfo = createTransactionIfNecessary(method, txObject.getClass());
}
@SuppressAjWarnings("adviceDidNotMatch")
after(Object txObject) throwing(Throwable t) : transactionalMethodExecution(txObject) {
try {
completeTransactionAfterThrowing(TransactionAspectSupport.currentTransactionInfo(), t);
}
catch (Throwable t2) {
logger.error("Failed to close transaction after throwing in a transactional method", t2);
}
}
@SuppressAjWarnings("adviceDidNotMatch")
after(Object txObject) returning() : transactionalMethodExecution(txObject) {
commitTransactionAfterReturning(TransactionAspectSupport.currentTransactionInfo());
}
@SuppressAjWarnings("adviceDidNotMatch")
after(Object txObject) : transactionalMethodExecution(txObject) {
cleanupTransactionInfo(TransactionAspectSupport.currentTransactionInfo());
}
/**
* Concrete subaspects must implement this pointcut, to identify
* transactional methods. For each selected joinpoint, TransactionMetadata
* will be retrieved using Spring's TransactionAttributeSource interface.
*/
protected abstract pointcut transactionalMethodExecution(Object txObject);
}
/*
* Copyright 2002-2010 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.transaction.aspectj;
import java.lang.reflect.Method;
import org.aspectj.lang.annotation.SuppressAjWarnings;
import org.aspectj.lang.reflect.MethodSignature;
import org.springframework.transaction.interceptor.TransactionAspectSupport;
import org.springframework.transaction.interceptor.TransactionAttributeSource;
/**
* Abstract superaspect for AspectJ transaction aspects. Concrete
* subaspects will implement the <code>transactionalMethodExecution()</code>
* pointcut using a strategy such as Java 5 annotations.
*
* <p>Suitable for use inside or outside the Spring IoC container.
* Set the "transactionManager" property appropriately, allowing
* use of any transaction implementation supported by Spring.
*
* <p><b>NB:</b> If a method implements an interface that is itself
* transactionally annotated, the relevant Spring transaction attribute
* will <i>not</i> be resolved. This behavior will vary from that of Spring AOP
* if proxying an interface (but not when proxying a class). We recommend that
* transaction annotations should be added to classes, rather than business
* interfaces, as they are an implementation detail rather than a contract
* specification validation.
*
* @author Rod Johnson
* @author Ramnivas Laddad
* @since 2.0
*/
public abstract aspect AbstractTransactionAspect extends TransactionAspectSupport {
/**
* Construct object using the given transaction metadata retrieval strategy.
* @param tas TransactionAttributeSource implementation, retrieving Spring
* transaction metadata for each joinpoint. Write the subclass to pass in null
* if it's intended to be configured by Setter Injection.
*/
protected AbstractTransactionAspect(TransactionAttributeSource tas) {
setTransactionAttributeSource(tas);
}
@SuppressAjWarnings("adviceDidNotMatch")
before(Object txObject) : transactionalMethodExecution(txObject) {
MethodSignature methodSignature = (MethodSignature) thisJoinPoint.getSignature();
Method method = methodSignature.getMethod();
TransactionInfo txInfo = createTransactionIfNecessary(method, txObject.getClass());
}
@SuppressAjWarnings("adviceDidNotMatch")
after(Object txObject) throwing(Throwable t) : transactionalMethodExecution(txObject) {
try {
completeTransactionAfterThrowing(TransactionAspectSupport.currentTransactionInfo(), t);
}
catch (Throwable t2) {
logger.error("Failed to close transaction after throwing in a transactional method", t2);
}
}
@SuppressAjWarnings("adviceDidNotMatch")
after(Object txObject) returning() : transactionalMethodExecution(txObject) {
commitTransactionAfterReturning(TransactionAspectSupport.currentTransactionInfo());
}
@SuppressAjWarnings("adviceDidNotMatch")
after(Object txObject) : transactionalMethodExecution(txObject) {
cleanupTransactionInfo(TransactionAspectSupport.currentTransactionInfo());
}
/**
* Concrete subaspects must implement this pointcut, to identify
* transactional methods. For each selected joinpoint, TransactionMetadata
* will be retrieved using Spring's TransactionAttributeSource interface.
*/
protected abstract pointcut transactionalMethodExecution(Object txObject);
}
@@ -1,76 +1,75 @@
/*
* Copyright 2002-2008 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.transaction.aspectj;
import org.springframework.transaction.annotation.AnnotationTransactionAttributeSource;
import org.springframework.transaction.annotation.Transactional;
/**
* Concrete AspectJ transaction aspect using Spring Transactional annotation
* for JDK 1.5+.
*
* <p>When using this aspect, you <i>must</i> annotate the implementation class
* (and/or methods within that class), <i>not</i> the interface (if any) that
* the class implements. AspectJ follows Java's rule that annotations on
* interfaces are <i>not</i> inherited.
*
* <p>A @Transactional annotation on a class specifies the default transaction
* semantics for the execution of any <b>public</b> operation in the class.
*
* <p>A @Transactional annotation on a method within the class overrides the
* default transaction semantics given by the class annotation (if present).
* Any method may be annotated (regardless of visibility).
* Annotating non-public methods directly is the only way
* to get transaction demarcation for the execution of such operations.
*
* @author Rod Johnson
* @author Ramnivas Laddad
* @author Adrian Colyer
* @since 2.0
* @see org.springframework.transaction.annotation.Transactional
*/
public aspect AnnotationTransactionAspect extends AbstractTransactionAspect {
public AnnotationTransactionAspect() {
super(new AnnotationTransactionAttributeSource(false));
}
/**
* Matches the execution of any public method in a type with the
* Transactional annotation, or any subtype of a type with the
* Transactional annotation.
*/
private pointcut executionOfAnyPublicMethodInAtTransactionalType() :
execution(public * ((@Transactional *)+).*(..)) && @this(Transactional);
/**
* Matches the execution of any method with the
* Transactional annotation.
*/
private pointcut executionOfTransactionalMethod() :
execution(* *(..)) && @annotation(Transactional);
/**
* Definition of pointcut from super aspect - matched join points
* will have Spring transaction management applied.
*/
protected pointcut transactionalMethodExecution(Object txObject) :
(executionOfAnyPublicMethodInAtTransactionalType()
|| executionOfTransactionalMethod() )
&& this(txObject);
}
/*
* Copyright 2002-2010 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.transaction.aspectj;
import org.springframework.transaction.annotation.AnnotationTransactionAttributeSource;
import org.springframework.transaction.annotation.Transactional;
/**
* Concrete AspectJ transaction aspect using Spring's @Transactional annotation.
*
* <p>When using this aspect, you <i>must</i> annotate the implementation class
* (and/or methods within that class), <i>not</i> the interface (if any) that
* the class implements. AspectJ follows Java's rule that annotations on
* interfaces are <i>not</i> inherited.
*
* <p>A @Transactional annotation on a class specifies the default transaction
* semantics for the execution of any <b>public</b> operation in the class.
*
* <p>A @Transactional annotation on a method within the class overrides the
* default transaction semantics given by the class annotation (if present).
* Any method may be annotated (regardless of visibility).
* Annotating non-public methods directly is the only way
* to get transaction demarcation for the execution of such operations.
*
* @author Rod Johnson
* @author Ramnivas Laddad
* @author Adrian Colyer
* @since 2.0
* @see org.springframework.transaction.annotation.Transactional
*/
public aspect AnnotationTransactionAspect extends AbstractTransactionAspect {
public AnnotationTransactionAspect() {
super(new AnnotationTransactionAttributeSource(false));
}
/**
* Matches the execution of any public method in a type with the
* Transactional annotation, or any subtype of a type with the
* Transactional annotation.
*/
private pointcut executionOfAnyPublicMethodInAtTransactionalType() :
execution(public * ((@Transactional *)+).*(..)) && @this(Transactional);
/**
* Matches the execution of any method with the
* Transactional annotation.
*/
private pointcut executionOfTransactionalMethod() :
execution(* *(..)) && @annotation(Transactional);
/**
* Definition of pointcut from super aspect - matched join points
* will have Spring transaction management applied.
*/
protected pointcut transactionalMethodExecution(Object txObject) :
(executionOfAnyPublicMethodInAtTransactionalType()
|| executionOfTransactionalMethod() )
&& this(txObject);
}
@@ -1,17 +1,18 @@
<?xml version="1.0"?>
<!--
AspectJ load-time weaving config file to install common Spring aspects.
-->
<aspectj>
<!--
<weaver options="-showWeaveInfo"/>
-->
<aspects>
<aspect name="org.springframework.beans.factory.aspectj.AnnotationBeanConfigurerAspect"/>
<aspect name="org.springframework.transaction.aspectj.AnnotationTransactionAspect"/>
</aspects>
</aspectj>
<?xml version="1.0"?>
<!--
AspectJ load-time weaving config file to install common Spring aspects.
-->
<aspectj>
<!--
<weaver options="-showWeaveInfo"/>
-->
<aspects>
<aspect name="org.springframework.beans.factory.aspectj.AnnotationBeanConfigurerAspect"/>
<aspect name="org.springframework.scheduling.aspectj.AnnotationAsyncExecutionAspect"/>
<aspect name="org.springframework.transaction.aspectj.AnnotationTransactionAspect"/>
</aspects>
</aspectj>
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2007 the original author or authors.
* Copyright 2002-2010 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,12 +16,9 @@
package org.springframework.aop.aspectj.autoproxy;
import org.aspectj.lang.annotation.Aspect;
/**
* @author Adrian Colyer
*/
@Aspect
public aspect CodeStyleAspect {
private String foo;
@@ -1,146 +1,146 @@
/*
* Copyright 2009 SpringSource Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.mock.staticmock;
import javax.persistence.PersistenceException;
import junit.framework.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
import static org.springframework.mock.staticmock.AnnotationDrivenStaticEntityMockingControl.*;
/**
* Test for static entity mocking framework.
* @author Rod Johnson
* @author Ramnivas Laddad
*
*/
@MockStaticEntityMethods
@RunWith(JUnit4.class)
public class AnnotationDrivenStaticEntityMockingControlTest {
@Test
public void testNoArgIntReturn() {
int expectedCount = 13;
Person.countPeople();
expectReturn(expectedCount);
playback();
Assert.assertEquals(expectedCount, Person.countPeople());
}
@Test(expected=PersistenceException.class)
public void testNoArgThrows() {
Person.countPeople();
expectThrow(new PersistenceException());
playback();
Person.countPeople();
}
@Test
public void testArgMethodMatches() {
long id = 13;
Person found = new Person();
Person.findPerson(id);
expectReturn(found);
playback();
Assert.assertEquals(found, Person.findPerson(id));
}
@Test
public void testLongSeriesOfCalls() {
long id1 = 13;
long id2 = 24;
Person found1 = new Person();
Person.findPerson(id1);
expectReturn(found1);
Person found2 = new Person();
Person.findPerson(id2);
expectReturn(found2);
Person.findPerson(id1);
expectReturn(found1);
Person.countPeople();
expectReturn(0);
playback();
Assert.assertEquals(found1, Person.findPerson(id1));
Assert.assertEquals(found2, Person.findPerson(id2));
Assert.assertEquals(found1, Person.findPerson(id1));
Assert.assertEquals(0, Person.countPeople());
}
// Note delegation is used when tests are invalid and should fail, as otherwise
// the failure will occur on the verify() method in the aspect after
// this method returns, failing the test case
@Test
public void testArgMethodNoMatchExpectReturn() {
try {
new Delegate().testArgMethodNoMatchExpectReturn();
Assert.fail();
} catch (IllegalArgumentException expected) {
}
}
@Test(expected=IllegalArgumentException.class)
public void testArgMethodNoMatchExpectThrow() {
new Delegate().testArgMethodNoMatchExpectThrow();
}
private void called(Person found, long id) {
Assert.assertEquals(found, Person.findPerson(id));
}
@Test
public void testReentrant() {
long id = 13;
Person found = new Person();
Person.findPerson(id);
expectReturn(found);
playback();
called(found, id);
}
@Test(expected=IllegalStateException.class)
public void testRejectUnexpectedCall() {
new Delegate().rejectUnexpectedCall();
}
@Test(expected=IllegalStateException.class)
public void testFailTooFewCalls() {
new Delegate().failTooFewCalls();
}
@Test
public void testEmpty() {
// Test that verification check doesn't blow up if no replay() call happened
}
@Test(expected=IllegalStateException.class)
public void testDoesntEverReplay() {
new Delegate().doesntEverReplay();
}
@Test(expected=IllegalStateException.class)
public void testDoesntEverSetReturn() {
new Delegate().doesntEverSetReturn();
}
}
/*
* Copyright 2002-2010 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.mock.staticmock;
import javax.persistence.PersistenceException;
import junit.framework.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
import static org.springframework.mock.staticmock.AnnotationDrivenStaticEntityMockingControl.*;
/**
* Test for static entity mocking framework.
* @author Rod Johnson
* @author Ramnivas Laddad
*
*/
@MockStaticEntityMethods
@RunWith(JUnit4.class)
public class AnnotationDrivenStaticEntityMockingControlTest {
@Test
public void testNoArgIntReturn() {
int expectedCount = 13;
Person.countPeople();
expectReturn(expectedCount);
playback();
Assert.assertEquals(expectedCount, Person.countPeople());
}
@Test(expected=PersistenceException.class)
public void testNoArgThrows() {
Person.countPeople();
expectThrow(new PersistenceException());
playback();
Person.countPeople();
}
@Test
public void testArgMethodMatches() {
long id = 13;
Person found = new Person();
Person.findPerson(id);
expectReturn(found);
playback();
Assert.assertEquals(found, Person.findPerson(id));
}
@Test
public void testLongSeriesOfCalls() {
long id1 = 13;
long id2 = 24;
Person found1 = new Person();
Person.findPerson(id1);
expectReturn(found1);
Person found2 = new Person();
Person.findPerson(id2);
expectReturn(found2);
Person.findPerson(id1);
expectReturn(found1);
Person.countPeople();
expectReturn(0);
playback();
Assert.assertEquals(found1, Person.findPerson(id1));
Assert.assertEquals(found2, Person.findPerson(id2));
Assert.assertEquals(found1, Person.findPerson(id1));
Assert.assertEquals(0, Person.countPeople());
}
// Note delegation is used when tests are invalid and should fail, as otherwise
// the failure will occur on the verify() method in the aspect after
// this method returns, failing the test case
@Test
public void testArgMethodNoMatchExpectReturn() {
try {
new Delegate().testArgMethodNoMatchExpectReturn();
Assert.fail();
} catch (IllegalArgumentException expected) {
}
}
@Test(expected=IllegalArgumentException.class)
public void testArgMethodNoMatchExpectThrow() {
new Delegate().testArgMethodNoMatchExpectThrow();
}
private void called(Person found, long id) {
Assert.assertEquals(found, Person.findPerson(id));
}
@Test
public void testReentrant() {
long id = 13;
Person found = new Person();
Person.findPerson(id);
expectReturn(found);
playback();
called(found, id);
}
@Test(expected=IllegalStateException.class)
public void testRejectUnexpectedCall() {
new Delegate().rejectUnexpectedCall();
}
@Test(expected=IllegalStateException.class)
public void testFailTooFewCalls() {
new Delegate().failTooFewCalls();
}
@Test
public void testEmpty() {
// Test that verification check doesn't blow up if no replay() call happened
}
@Test(expected=IllegalStateException.class)
public void testDoesntEverReplay() {
new Delegate().doesntEverReplay();
}
@Test(expected=IllegalStateException.class)
public void testDoesntEverSetReturn() {
new Delegate().doesntEverSetReturn();
}
}
@@ -1,76 +1,92 @@
package org.springframework.mock.staticmock;
import java.rmi.RemoteException;
import javax.persistence.PersistenceException;
import junit.framework.Assert;
import org.junit.Ignore;
import org.junit.Test;
import org.springframework.mock.staticmock.AnnotationDrivenStaticEntityMockingControl;
import org.springframework.mock.staticmock.MockStaticEntityMethods;
//Used because verification failures occur after method returns,
//so we can't test for them in the test case itself
@MockStaticEntityMethods
@Ignore // This isn't meant for direct testing; rather it is driven from AnnotationDrivenStaticEntityMockingControl
public class Delegate {
@Test
public void testArgMethodNoMatchExpectReturn() {
long id = 13;
Person found = new Person();
Person.findPerson(id);
AnnotationDrivenStaticEntityMockingControl.expectReturn(found);
AnnotationDrivenStaticEntityMockingControl.playback();
Assert.assertEquals(found, Person.findPerson(id + 1));
}
@Test
public void testArgMethodNoMatchExpectThrow() {
long id = 13;
Person found = new Person();
Person.findPerson(id);
AnnotationDrivenStaticEntityMockingControl.expectThrow(new PersistenceException());
AnnotationDrivenStaticEntityMockingControl.playback();
Assert.assertEquals(found, Person.findPerson(id + 1));
}
@Test
public void failTooFewCalls() {
long id = 13;
Person found = new Person();
Person.findPerson(id);
AnnotationDrivenStaticEntityMockingControl.expectReturn(found);
Person.countPeople();
AnnotationDrivenStaticEntityMockingControl.expectReturn(25);
AnnotationDrivenStaticEntityMockingControl.playback();
Assert.assertEquals(found, Person.findPerson(id));
}
@Test
public void doesntEverReplay() {
Person.countPeople();
}
@Test
public void doesntEverSetReturn() {
Person.countPeople();
AnnotationDrivenStaticEntityMockingControl.playback();
}
@Test
public void rejectUnexpectedCall() {
AnnotationDrivenStaticEntityMockingControl.playback();
Person.countPeople();
}
@Test(expected=RemoteException.class)
public void testVerificationFailsEvenWhenTestFailsInExpectedManner() throws RemoteException {
Person.countPeople();
AnnotationDrivenStaticEntityMockingControl.playback();
// No calls to allow verification failure
throw new RemoteException();
}
}
/*
* Copyright 2002-2010 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.mock.staticmock;
import java.rmi.RemoteException;
import javax.persistence.PersistenceException;
import junit.framework.Assert;
import org.junit.Ignore;
import org.junit.Test;
import org.springframework.mock.staticmock.AnnotationDrivenStaticEntityMockingControl;
import org.springframework.mock.staticmock.MockStaticEntityMethods;
//Used because verification failures occur after method returns,
//so we can't test for them in the test case itself
@MockStaticEntityMethods
@Ignore // This isn't meant for direct testing; rather it is driven from AnnotationDrivenStaticEntityMockingControl
public class Delegate {
@Test
public void testArgMethodNoMatchExpectReturn() {
long id = 13;
Person found = new Person();
Person.findPerson(id);
AnnotationDrivenStaticEntityMockingControl.expectReturn(found);
AnnotationDrivenStaticEntityMockingControl.playback();
Assert.assertEquals(found, Person.findPerson(id + 1));
}
@Test
public void testArgMethodNoMatchExpectThrow() {
long id = 13;
Person found = new Person();
Person.findPerson(id);
AnnotationDrivenStaticEntityMockingControl.expectThrow(new PersistenceException());
AnnotationDrivenStaticEntityMockingControl.playback();
Assert.assertEquals(found, Person.findPerson(id + 1));
}
@Test
public void failTooFewCalls() {
long id = 13;
Person found = new Person();
Person.findPerson(id);
AnnotationDrivenStaticEntityMockingControl.expectReturn(found);
Person.countPeople();
AnnotationDrivenStaticEntityMockingControl.expectReturn(25);
AnnotationDrivenStaticEntityMockingControl.playback();
Assert.assertEquals(found, Person.findPerson(id));
}
@Test
public void doesntEverReplay() {
Person.countPeople();
}
@Test
public void doesntEverSetReturn() {
Person.countPeople();
AnnotationDrivenStaticEntityMockingControl.playback();
}
@Test
public void rejectUnexpectedCall() {
AnnotationDrivenStaticEntityMockingControl.playback();
Person.countPeople();
}
@Test(expected=RemoteException.class)
public void testVerificationFailsEvenWhenTestFailsInExpectedManner() throws RemoteException {
Person.countPeople();
AnnotationDrivenStaticEntityMockingControl.playback();
// No calls to allow verification failure
throw new RemoteException();
}
}
@@ -1,8 +1,24 @@
package org.springframework.mock.staticmock;
import javax.persistence.Entity;
@Entity
public class Person {
}
/*
* Copyright 2002-2010 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.mock.staticmock;
import javax.persistence.Entity;
@Entity
public class Person {
}
@@ -1,84 +1,100 @@
package org.springframework.mock.staticmock;
privileged aspect Person_Roo_Entity {
@javax.persistence.PersistenceContext
transient javax.persistence.EntityManager Person.entityManager;
@javax.persistence.Id
@javax.persistence.GeneratedValue(strategy = javax.persistence.GenerationType.AUTO)
@javax.persistence.Column(name = "id")
private java.lang.Long Person.id;
@javax.persistence.Version
@javax.persistence.Column(name = "version")
private java.lang.Integer Person.version;
public java.lang.Long Person.getId() {
return this.id;
}
public void Person.setId(java.lang.Long id) {
this.id = id;
}
public java.lang.Integer Person.getVersion() {
return this.version;
}
public void Person.setVersion(java.lang.Integer version) {
this.version = version;
}
@org.springframework.transaction.annotation.Transactional
public void Person.persist() {
if (this.entityManager == null) throw new IllegalStateException("Entity manager has not been injected (is the Spring Aspects JAR configured as an AJC/AJDT aspects library?)");
this.entityManager.persist(this);
}
@org.springframework.transaction.annotation.Transactional
public void Person.remove() {
if (this.entityManager == null) throw new IllegalStateException("Entity manager has not been injected (is the Spring Aspects JAR configured as an AJC/AJDT aspects library?)");
this.entityManager.remove(this);
}
@org.springframework.transaction.annotation.Transactional
public void Person.flush() {
if (this.entityManager == null) throw new IllegalStateException("Entity manager has not been injected (is the Spring Aspects JAR configured as an AJC/AJDT aspects library?)");
this.entityManager.flush();
}
@org.springframework.transaction.annotation.Transactional
public void Person.merge() {
if (this.entityManager == null) throw new IllegalStateException("Entity manager has not been injected (is the Spring Aspects JAR configured as an AJC/AJDT aspects library?)");
Person merged = this.entityManager.merge(this);
this.entityManager.flush();
this.id = merged.getId();
}
public static long Person.countPeople() {
javax.persistence.EntityManager em = new Person().entityManager;
if (em == null) throw new IllegalStateException("Entity manager has not been injected (is the Spring Aspects JAR configured as an AJC/AJDT aspects library?)");
return (Long) em.createQuery("select count(o) from Person o").getSingleResult();
}
public static java.util.List<Person> Person.findAllPeople() {
javax.persistence.EntityManager em = new Person().entityManager;
if (em == null) throw new IllegalStateException("Entity manager has not been injected (is the Spring Aspects JAR configured as an AJC/AJDT aspects library?)");
return em.createQuery("select o from Person o").getResultList();
}
public static Person Person.findPerson(java.lang.Long id) {
if (id == null) throw new IllegalArgumentException("An identifier is required to retrieve an instance of Person");
javax.persistence.EntityManager em = new Person().entityManager;
if (em == null) throw new IllegalStateException("Entity manager has not been injected (is the Spring Aspects JAR configured as an AJC/AJDT aspects library?)");
return em.find(Person.class, id);
}
public static java.util.List<Person> Person.findPersonEntries(int firstResult, int maxResults) {
javax.persistence.EntityManager em = new Person().entityManager;
if (em == null) throw new IllegalStateException("Entity manager has not been injected (is the Spring Aspects JAR configured as an AJC/AJDT aspects library?)");
return em.createQuery("select o from Person o").setFirstResult(firstResult).setMaxResults(maxResults).getResultList();
}
}
/*
* Copyright 2002-2010 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.mock.staticmock;
privileged aspect Person_Roo_Entity {
@javax.persistence.PersistenceContext
transient javax.persistence.EntityManager Person.entityManager;
@javax.persistence.Id
@javax.persistence.GeneratedValue(strategy = javax.persistence.GenerationType.AUTO)
@javax.persistence.Column(name = "id")
private java.lang.Long Person.id;
@javax.persistence.Version
@javax.persistence.Column(name = "version")
private java.lang.Integer Person.version;
public java.lang.Long Person.getId() {
return this.id;
}
public void Person.setId(java.lang.Long id) {
this.id = id;
}
public java.lang.Integer Person.getVersion() {
return this.version;
}
public void Person.setVersion(java.lang.Integer version) {
this.version = version;
}
@org.springframework.transaction.annotation.Transactional
public void Person.persist() {
if (this.entityManager == null) throw new IllegalStateException("Entity manager has not been injected (is the Spring Aspects JAR configured as an AJC/AJDT aspects library?)");
this.entityManager.persist(this);
}
@org.springframework.transaction.annotation.Transactional
public void Person.remove() {
if (this.entityManager == null) throw new IllegalStateException("Entity manager has not been injected (is the Spring Aspects JAR configured as an AJC/AJDT aspects library?)");
this.entityManager.remove(this);
}
@org.springframework.transaction.annotation.Transactional
public void Person.flush() {
if (this.entityManager == null) throw new IllegalStateException("Entity manager has not been injected (is the Spring Aspects JAR configured as an AJC/AJDT aspects library?)");
this.entityManager.flush();
}
@org.springframework.transaction.annotation.Transactional
public void Person.merge() {
if (this.entityManager == null) throw new IllegalStateException("Entity manager has not been injected (is the Spring Aspects JAR configured as an AJC/AJDT aspects library?)");
Person merged = this.entityManager.merge(this);
this.entityManager.flush();
this.id = merged.getId();
}
public static long Person.countPeople() {
javax.persistence.EntityManager em = new Person().entityManager;
if (em == null) throw new IllegalStateException("Entity manager has not been injected (is the Spring Aspects JAR configured as an AJC/AJDT aspects library?)");
return (Long) em.createQuery("select count(o) from Person o").getSingleResult();
}
public static java.util.List<Person> Person.findAllPeople() {
javax.persistence.EntityManager em = new Person().entityManager;
if (em == null) throw new IllegalStateException("Entity manager has not been injected (is the Spring Aspects JAR configured as an AJC/AJDT aspects library?)");
return em.createQuery("select o from Person o").getResultList();
}
public static Person Person.findPerson(java.lang.Long id) {
if (id == null) throw new IllegalArgumentException("An identifier is required to retrieve an instance of Person");
javax.persistence.EntityManager em = new Person().entityManager;
if (em == null) throw new IllegalStateException("Entity manager has not been injected (is the Spring Aspects JAR configured as an AJC/AJDT aspects library?)");
return em.find(Person.class, id);
}
public static java.util.List<Person> Person.findPersonEntries(int firstResult, int maxResults) {
javax.persistence.EntityManager em = new Person().entityManager;
if (em == null) throw new IllegalStateException("Entity manager has not been injected (is the Spring Aspects JAR configured as an AJC/AJDT aspects library?)");
return em.createQuery("select o from Person o").setFirstResult(firstResult).setMaxResults(maxResults).getResultList();
}
}
@@ -0,0 +1,178 @@
/*
* Copyright 2002-2010 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.scheduling.aspectj;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;
import junit.framework.Assert;
import static junit.framework.Assert.*;
import org.junit.Before;
import org.junit.Test;
import org.springframework.core.task.SimpleAsyncTaskExecutor;
import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.AsyncResult;
/**
* @author Ramnivas Laddad
*/
public class AnnotationAsyncExecutionAspectTests {
private static final long WAIT_TIME = 1000; //milli seconds
private CountingExecutor executor;
@Before
public void setUp() {
executor = new CountingExecutor();
AnnotationAsyncExecutionAspect.aspectOf().setExecutor(executor);
}
@Test
public void asyncMethodGetsRoutedAsynchronously() {
ClassWithoutAsyncAnnotation obj = new ClassWithoutAsyncAnnotation();
obj.incrementAsync();
executor.waitForCompletion();
assertEquals(1, obj.counter);
assertEquals(1, executor.submitStartCounter);
assertEquals(1, executor.submitCompleteCounter);
}
@Test
public void asyncMethodReturningFutureGetsRoutedAsynchronouslyAndReturnsAFuture() throws InterruptedException, ExecutionException {
ClassWithoutAsyncAnnotation obj = new ClassWithoutAsyncAnnotation();
Future<Integer> future = obj.incrementReturningAFuture();
// No need to executor.waitForCompletion() as future.get() will have the same effect
assertEquals(5, future.get().intValue());
assertEquals(1, obj.counter);
assertEquals(1, executor.submitStartCounter);
assertEquals(1, executor.submitCompleteCounter);
}
@Test
public void syncMethodGetsRoutedSynchronously() {
ClassWithoutAsyncAnnotation obj = new ClassWithoutAsyncAnnotation();
obj.increment();
assertEquals(1, obj.counter);
assertEquals(0, executor.submitStartCounter);
assertEquals(0, executor.submitCompleteCounter);
}
@Test
public void voidMethodInAsyncClassGetsRoutedAsynchronously() {
ClassWithAsyncAnnotation obj = new ClassWithAsyncAnnotation();
obj.increment();
executor.waitForCompletion();
assertEquals(1, obj.counter);
assertEquals(1, executor.submitStartCounter);
assertEquals(1, executor.submitCompleteCounter);
}
@Test
public void methodReturningFutureInAsyncClassGetsRoutedAsynchronouslyAndReturnsAFuture() throws InterruptedException, ExecutionException {
ClassWithAsyncAnnotation obj = new ClassWithAsyncAnnotation();
Future<Integer> future = obj.incrementReturningAFuture();
assertEquals(5, future.get().intValue());
assertEquals(1, obj.counter);
assertEquals(1, executor.submitStartCounter);
assertEquals(1, executor.submitCompleteCounter);
}
@Test
public void methodReturningNonVoidNonFutureInAsyncClassGetsRoutedSynchronously() {
ClassWithAsyncAnnotation obj = new ClassWithAsyncAnnotation();
int returnValue = obj.return5();
assertEquals(5, returnValue);
assertEquals(0, executor.submitStartCounter);
assertEquals(0, executor.submitCompleteCounter);
}
@SuppressWarnings("serial")
private static class CountingExecutor extends SimpleAsyncTaskExecutor {
int submitStartCounter;
int submitCompleteCounter;
@Override
public <T> Future<T> submit(Callable<T> task) {
submitStartCounter++;
Future<T> future = super.submit(task);
submitCompleteCounter++;
synchronized (this) {
notifyAll();
}
return future;
}
public synchronized void waitForCompletion() {
try {
wait(WAIT_TIME);
} catch (InterruptedException e) {
Assert.fail("Didn't finish the async job in " + WAIT_TIME + " milliseconds");
}
}
}
static class ClassWithoutAsyncAnnotation {
int counter;
@Async public void incrementAsync() {
counter++;
}
public void increment() {
counter++;
}
@Async public Future<Integer> incrementReturningAFuture() {
counter++;
return new AsyncResult<Integer>(5);
}
// It should be an error to attach @Async to a method that returns a non-void
// or non-Future.
// We need to keep this commented out, otherwise there will be a compile-time error.
// Please uncomment and re-comment this periodically to check that the compiler
// produces an error message due to the 'declare error' statement
// in AnnotationAsyncExecutionAspect
// @Async public int getInt() {
// return 0;
// }
}
@Async
static class ClassWithAsyncAnnotation {
int counter;
public void increment() {
counter++;
}
// Manually check that there is a warning from the 'declare warning' statement in AnnotationAsynchExecutionAspect
public int return5() {
return 5;
}
public Future<Integer> incrementReturningAFuture() {
counter++;
return new AsyncResult<Integer>(5);
}
}
}
+6 -5
View File
@@ -4,11 +4,12 @@ Bundle-Vendor: SpringSource
Bundle-ManifestVersion: 2
Import-Template:
org.apache.commons.logging.*;version="[1.1.1, 2.0.0)",
org.aspectj.*;version="[1.5.4, 2.0.0)";resolution:=optional,
org.springframework.beans.*;version="[3.0.0, 3.0.1)",
org.springframework.transaction.*;version="[3.0.0, 3.0.1)";resolution:=optional,
org.springframework.orm.jpa.*;version="[3.0.0, 3.0.1)";resolution:=optional,
org.springframework.dao.*;version="[3.0.0, 3.0.1)";resolution:=optional
org.aspectj.*;version=${aj.osgi.range};resolution:=optional,
org.springframework.beans.*;version=${spring.osgi.range},
org.springframework.transaction.*;version=${spring.osgi.range};resolution:=optional,
org.springframework.core.task.*;version=${spring.osgi.range};resolution:=optional,
org.springframework.orm.jpa.*;version=${spring.osgi.range};resolution:=optional,
org.springframework.dao.*;version=${spring.osgi.range};resolution:=optional
Ignored-Existing-Headers:
Bnd-LastModified,
Import-Package,
+1
View File
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="org.springframework.beans">
<property file="${basedir}/../build.properties"/>
<property file="${basedir}/../build.versions"/>
<import file="${basedir}/../build-spring-framework/package-bundle.xml"/>
<import file="${basedir}/../spring-build/standard/default.xml"/>
</project>
+5 -2
View File
@@ -11,23 +11,26 @@
<configurations>
<include file="${spring.build.dir}/common/default-ivy-configurations.xml"/>
<conf name="commons-logging" extends="runtime" description="JARs needed to run with Commons Logging"/>
<conf name="bytecode-proxy" extends="runtime" description="JARs needed to run with CGLIB bytecode proxies"/>
</configurations>
<publications>
<artifact name="${ant.project.name}"/>
<artifact name="${ant.project.name}-sources" type="src" ext="jar"/>
<artifact name="license" type="license" ext="txt"/>
<artifact name="notice" type="notice" ext="txt"/>
</publications>
<dependencies>
<dependency org="javax.el" name="com.springsource.javax.el" rev="1.0.0" conf="provided->compile"/>
<dependency org="javax.inject" name="com.springsource.javax.inject" rev="1.0.0" conf="provided->compile"/>
<dependency org="net.sourceforge.cglib" name="com.springsource.net.sf.cglib" rev="2.2.0" conf="optional, bytecode-proxy->compile"/>
<dependency org="org.apache.commons" name="com.springsource.org.apache.commons.logging" rev="1.1.1" conf="compile->compile"/>
<dependency org="org.apache.commons" name="com.springsource.org.apache.commons.logging" rev="1.1.1" conf="compile, commons-logging->compile"/>
<dependency org="org.springframework" name="org.springframework.core" rev="latest.integration" conf="compile->compile"/>
<!-- test dependencies -->
<dependency org="org.apache.log4j" name="com.springsource.org.apache.log4j" rev="1.2.15" conf="test->runtime"/>
<dependency org="org.junit" name="com.springsource.org.junit" rev="4.7.0" conf="test->runtime"/>
<dependency org="org.junit" name="com.springsource.org.junit" rev="${junit.version}" conf="test->runtime"/>
<dependency org="org.easymock" name="com.springsource.org.easymock" rev="2.5.1" conf="test->compile"/>
<dependency org="org.springframework" name="org.springframework.asm" rev="latest.integration" conf="compile->compile"/>
</dependencies>
+4 -4
View File
@@ -4,12 +4,12 @@
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<packaging>jar</packaging>
<version>3.0.0.BUILD-SNAPSHOT</version>
<version>3.0.8.BUILD-SNAPSHOT</version>
<parent>
<groupId>org.springframework</groupId>
<artifactId>spring-parent</artifactId>
<relativePath>../org.springframework.spring-parent</relativePath>
<version>3.0.0.BUILD-SNAPSHOT</version>
<version>3.0.8.BUILD-SNAPSHOT</version>
</parent>
<dependencies>
@@ -21,8 +21,8 @@
</dependency>
<dependency>
<groupId>javax.inject</groupId>
<artifactId>com.springsource.javax.inject</artifactId>
<version>0.9.0.PFD</version>
<artifactId>javax.inject</artifactId>
<version>1</version>
<scope>provided</scope>
</dependency>
<dependency>
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2009 the original author or authors.
* Copyright 2002-2010 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -389,8 +389,17 @@ public abstract class BeanUtils {
}
ClassLoader cl = targetType.getClassLoader();
if (cl == null) {
cl = ClassLoader.getSystemClassLoader();
if (cl == null) {
try {
cl = ClassLoader.getSystemClassLoader();
if (cl == null) {
return null;
}
}
catch (Throwable ex) {
// e.g. AccessControlException on Google App Engine
if (logger.isDebugEnabled()) {
logger.debug("Could not access system ClassLoader: " + ex);
}
return null;
}
}
@@ -398,8 +407,10 @@ public abstract class BeanUtils {
try {
Class<?> editorClass = cl.loadClass(editorName);
if (!PropertyEditor.class.isAssignableFrom(editorClass)) {
logger.warn("Editor class [" + editorName +
"] does not implement [java.beans.PropertyEditor] interface");
if (logger.isWarnEnabled()) {
logger.warn("Editor class [" + editorName +
"] does not implement [java.beans.PropertyEditor] interface");
}
unknownEditorTypes.put(targetType, Boolean.TRUE);
return null;
}
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2009 the original author or authors.
* Copyright 2002-2011 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -92,4 +92,15 @@ public interface BeanWrapper extends ConfigurablePropertyAccessor {
*/
boolean isAutoGrowNestedPaths();
/**
* Specify a limit for array and collection auto-growing.
* <p>Default is unlimited on a plain BeanWrapper.
*/
void setAutoGrowCollectionLimit(int autoGrowCollectionLimit);
/**
* Return the limit for array and collection auto-growing.
*/
int getAutoGrowCollectionLimit();
}
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2009 the original author or authors.
* Copyright 2002-2011 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -42,7 +42,9 @@ import org.springframework.core.CollectionFactory;
import org.springframework.core.GenericCollectionTypeResolver;
import org.springframework.core.MethodParameter;
import org.springframework.core.convert.ConversionException;
import org.springframework.core.convert.ConverterNotFoundException;
import org.springframework.core.convert.TypeDescriptor;
import org.springframework.core.convert.support.PropertyTypeDescriptor;
import org.springframework.util.Assert;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
@@ -100,6 +102,11 @@ public class BeanWrapperImpl extends AbstractPropertyAccessor implements BeanWra
private TypeConverterDelegate typeConverterDelegate;
/**
* The security context used for invoking the property methods
*/
private AccessControlContext acc;
/**
* Cached introspections results for this object, to prevent encountering
* the cost of JavaBeans introspection every time.
@@ -111,11 +118,10 @@ public class BeanWrapperImpl extends AbstractPropertyAccessor implements BeanWra
*/
private Map<String, BeanWrapperImpl> nestedBeanWrappers;
/** The security context used for invoking the property methods */
private AccessControlContext acc;
private boolean autoGrowNestedPaths = false;
private int autoGrowCollectionLimit = Integer.MAX_VALUE;
/**
* Create new empty BeanWrapperImpl. Wrapped instance needs to be set afterwards.
@@ -180,6 +186,7 @@ public class BeanWrapperImpl extends AbstractPropertyAccessor implements BeanWra
setWrappedInstance(object, nestedPath, superBw.getWrappedInstance());
setExtractOldValueForEditor(superBw.isExtractOldValueForEditor());
setAutoGrowNestedPaths(superBw.isAutoGrowNestedPaths());
setAutoGrowCollectionLimit(superBw.getAutoGrowCollectionLimit());
setConversionService(superBw.getConversionService());
setSecurityContext(superBw.acc);
}
@@ -215,16 +222,6 @@ public class BeanWrapperImpl extends AbstractPropertyAccessor implements BeanWra
setIntrospectionClass(object.getClass());
}
/**
* Set the security context used during the invocation of the wrapped instance methods.
* Can be null.
*
* @param acc
*/
public void setSecurityContext(AccessControlContext acc) {
this.acc = acc;
}
public final Object getWrappedInstance() {
return this.object;
}
@@ -257,22 +254,54 @@ public class BeanWrapperImpl extends AbstractPropertyAccessor implements BeanWra
}
/**
* If this BeanWrapper should "auto grow" nested paths.
* When true, auto growth is triggered on nested paths when null values are encountered.
* When true, auto growth is triggered on collection properties when out of bounds indexes are accessed.
* Default is false.
* Set whether this BeanWrapper should attempt to "auto-grow" a nested path that contains a null value.
* <p>If "true", a null path location will be populated with a default object value and traversed
* instead of resulting in a {@link NullValueInNestedPathException}. Turning this flag on also
* enables auto-growth of collection elements when accessing an out-of-bounds index.
* <p>Default is "false" on a plain BeanWrapper.
*/
public void setAutoGrowNestedPaths(boolean autoGrowNestedPaths) {
this.autoGrowNestedPaths = autoGrowNestedPaths;
}
/**
* If this BeanWrapper should "auto grow" nested paths.
* Return whether "auto-growing" of nested paths has been activated.
*/
public boolean isAutoGrowNestedPaths() {
return this.autoGrowNestedPaths;
}
/**
* Specify a limit for array and collection auto-growing.
* <p>Default is unlimited on a plain BeanWrapper.
*/
public void setAutoGrowCollectionLimit(int autoGrowCollectionLimit) {
this.autoGrowCollectionLimit = autoGrowCollectionLimit;
}
/**
* Return the limit for array and collection auto-growing.
*/
public int getAutoGrowCollectionLimit() {
return this.autoGrowCollectionLimit;
}
/**
* Set the security context used during the invocation of the wrapped instance methods.
* Can be null.
*/
public void setSecurityContext(AccessControlContext acc) {
this.acc = acc;
}
/**
* Return the security context used during the invocation of the wrapped instance methods.
* Can be null.
*/
public AccessControlContext getSecurityContext() {
return this.acc;
}
/**
* Set the class to introspect.
* Needs to be called when the target object changes.
@@ -354,13 +383,15 @@ public class BeanWrapperImpl extends AbstractPropertyAccessor implements BeanWra
public TypeDescriptor getPropertyTypeDescriptor(String propertyName) throws BeansException {
try {
PropertyDescriptor pd = getPropertyDescriptorInternal(propertyName);
String actualPropertyName = PropertyAccessorUtils.getPropertyName(propertyName);
PropertyDescriptor pd = getPropertyDescriptorInternal(actualPropertyName);
if (pd != null) {
Class type = getPropertyType(propertyName);
if (pd.getReadMethod() != null) {
return new BeanTypeDescriptor(new MethodParameter(pd.getReadMethod(), -1), pd);
return new PropertyTypeDescriptor(pd, new MethodParameter(pd.getReadMethod(), -1), type);
}
else if (pd.getWriteMethod() != null) {
return new BeanTypeDescriptor(BeanUtils.getWriteMethodParameter(pd), pd);
return new PropertyTypeDescriptor(pd, BeanUtils.getWriteMethodParameter(pd), type);
}
}
}
@@ -410,17 +441,56 @@ public class BeanWrapperImpl extends AbstractPropertyAccessor implements BeanWra
return false;
}
public <T> T convertIfNecessary(
Object value, Class<T> requiredType, MethodParameter methodParam) throws TypeMismatchException {
public <T> T convertIfNecessary(Object value, Class<T> requiredType, MethodParameter methodParam)
throws TypeMismatchException {
try {
return this.typeConverterDelegate.convertIfNecessary(value, requiredType, methodParam);
}
catch (IllegalArgumentException ex) {
catch (ConverterNotFoundException ex) {
throw new ConversionNotSupportedException(value, requiredType, ex);
}
catch (ConversionException ex) {
throw new TypeMismatchException(value, requiredType, ex);
}
catch (IllegalStateException ex) {
throw new ConversionNotSupportedException(value, requiredType, ex);
}
catch (IllegalArgumentException ex) {
throw new TypeMismatchException(value, requiredType, ex);
}
}
private Object convertIfNecessary(String propertyName, Object oldValue, Object newValue, Class<?> requiredType,
TypeDescriptor td) throws TypeMismatchException {
try {
return this.typeConverterDelegate.convertIfNecessary(propertyName, oldValue, newValue, requiredType, td);
}
catch (ConverterNotFoundException ex) {
PropertyChangeEvent pce =
new PropertyChangeEvent(this.rootObject, this.nestedPath + propertyName, oldValue, newValue);
throw new ConversionNotSupportedException(pce, td.getType(), ex);
}
catch (ConversionException ex) {
PropertyChangeEvent pce =
new PropertyChangeEvent(this.rootObject, this.nestedPath + propertyName, oldValue, newValue);
throw new TypeMismatchException(pce, requiredType, ex);
}
catch (IllegalStateException ex) {
PropertyChangeEvent pce =
new PropertyChangeEvent(this.rootObject, this.nestedPath + propertyName, oldValue, newValue);
throw new ConversionNotSupportedException(pce, requiredType, ex);
}
catch (IllegalArgumentException ex) {
PropertyChangeEvent pce =
new PropertyChangeEvent(this.rootObject, this.nestedPath + propertyName, oldValue, newValue);
throw new TypeMismatchException(pce, requiredType, ex);
}
}
private Object convertIfNecessary(String propertyName, Object oldValue, Object newValue, Class<?> requiredType)
throws TypeMismatchException {
return convertIfNecessary(propertyName, oldValue, newValue, requiredType, TypeDescriptor.valueOf(requiredType));
}
/**
@@ -439,19 +509,14 @@ public class BeanWrapperImpl extends AbstractPropertyAccessor implements BeanWra
throw new InvalidPropertyException(getRootClass(), this.nestedPath + propertyName,
"No property '" + propertyName + "' found");
}
try {
return this.typeConverterDelegate.convertIfNecessary(null, value, pd);
}
catch (IllegalArgumentException ex) {
PropertyChangeEvent pce =
new PropertyChangeEvent(this.rootObject, this.nestedPath + propertyName, null, value);
throw new TypeMismatchException(pce, pd.getPropertyType(), ex);
}
catch (IllegalStateException ex) {
PropertyChangeEvent pce =
new PropertyChangeEvent(this.rootObject, this.nestedPath + propertyName, null, value);
throw new ConversionNotSupportedException(pce, pd.getPropertyType(), ex);
}
return convertForProperty(propertyName, null, value, pd);
}
private Object convertForProperty(String propertyName, Object oldValue, Object newValue, PropertyDescriptor pd)
throws TypeMismatchException {
return convertIfNecessary(propertyName, oldValue, newValue, pd.getPropertyType(),
new PropertyTypeDescriptor(pd, BeanUtils.getWriteMethodParameter(pd)));
}
@@ -540,21 +605,25 @@ public class BeanWrapperImpl extends AbstractPropertyAccessor implements BeanWra
PropertyTokenHolder tokens = new PropertyTokenHolder();
tokens.actualName = propertyName;
tokens.canonicalName = propertyName;
setPropertyValue(tokens, createDefaultPropertyValue(tokens));
return getPropertyValue(tokens);
return setDefaultValue(tokens);
}
private Object setDefaultValue(PropertyTokenHolder tokens) {
setPropertyValue(tokens, createDefaultPropertyValue(tokens));
PropertyValue pv = createDefaultPropertyValue(tokens);
setPropertyValue(tokens, pv);
return getPropertyValue(tokens);
}
private PropertyValue createDefaultPropertyValue(PropertyTokenHolder tokens) {
PropertyDescriptor pd = getCachedIntrospectionResults().getPropertyDescriptor(tokens.actualName);
Object defaultValue = newValue(pd.getPropertyType(), tokens.canonicalName);
Class type = getPropertyType(tokens.canonicalName);
if (type == null) {
throw new NullValueInNestedPathException(getRootClass(), this.nestedPath + tokens.canonicalName,
"Could not determine property type for auto-growing a default value");
}
Object defaultValue = newValue(type, tokens.canonicalName);
return new PropertyValue(tokens.canonicalName, defaultValue);
}
private Object newValue(Class<?> type, String name) {
try {
if (type.isArray()) {
@@ -569,20 +638,22 @@ public class BeanWrapperImpl extends AbstractPropertyAccessor implements BeanWra
return Array.newInstance(componentType, 0);
}
}
else if (Collection.class.isAssignableFrom(type)) {
return CollectionFactory.createCollection(type, 16);
}
else if (Map.class.isAssignableFrom(type)) {
return CollectionFactory.createMap(type, 16);
}
else {
if (Collection.class.isAssignableFrom(type)) {
return CollectionFactory.createCollection(type, 16);
}
else {
return type.newInstance();
}
return type.newInstance();
}
}
catch (Exception ex) {
throw new NullValueInNestedPathException(getRootClass(), this.nestedPath + name, "Could not instantiate property type [" + type.getName() + "] to auto-grow nested property path: " + ex);
throw new NullValueInNestedPathException(getRootClass(), this.nestedPath + name,
"Could not instantiate property type [" + type.getName() + "] to auto-grow nested property path: " + ex);
}
}
/**
* Create a new nested BeanWrapper instance.
* <p>Default implementation creates a BeanWrapperImpl instance.
@@ -671,7 +742,6 @@ public class BeanWrapperImpl extends AbstractPropertyAccessor implements BeanWra
}
Object value;
if (System.getSecurityManager() != null) {
try {
value = AccessController.doPrivileged(new PrivilegedExceptionAction<Object>() {
@@ -685,7 +755,7 @@ public class BeanWrapperImpl extends AbstractPropertyAccessor implements BeanWra
}
}
else {
value = readMethod.invoke(object, (Object[]) null);
value = readMethod.invoke(object, (Object[]) null);
}
if (tokens.keys != null) {
@@ -742,9 +812,8 @@ public class BeanWrapperImpl extends AbstractPropertyAccessor implements BeanWra
Class<?> mapKeyType = GenericCollectionTypeResolver.getMapKeyReturnType(pd.getReadMethod(), i + 1);
// IMPORTANT: Do not pass full property name in here - property editors
// must not kick in for map keys but rather only for map values.
Object convertedMapKey = this.typeConverterDelegate.convertIfNecessary(key, mapKeyType);
// Pass full property name and old value in here, since we want full
// conversion ability for map values.
Object convertedMapKey = convertIfNecessary(null, null, key, mapKeyType,
new PropertyTypeDescriptor(pd, new MethodParameter(pd.getReadMethod(), -1), mapKeyType));
value = map.get(convertedMapKey);
}
else {
@@ -757,15 +826,6 @@ public class BeanWrapperImpl extends AbstractPropertyAccessor implements BeanWra
}
return value;
}
catch (InvocationTargetException ex) {
throw new InvalidPropertyException(getRootClass(), this.nestedPath + propertyName,
"Getter for property '" + actualName + "' threw exception", ex);
}
catch(IllegalAccessException ex) {
throw new InvalidPropertyException(getRootClass(), this.nestedPath + propertyName,
"Illegal attempt to get property '" + actualName + "' threw exception", ex);
}
catch (IndexOutOfBoundsException ex) {
throw new InvalidPropertyException(getRootClass(), this.nestedPath + propertyName,
"Index of out of bounds in property path '" + propertyName + "'", ex);
@@ -774,10 +834,18 @@ public class BeanWrapperImpl extends AbstractPropertyAccessor implements BeanWra
throw new InvalidPropertyException(getRootClass(), this.nestedPath + propertyName,
"Invalid index in property path '" + propertyName + "'", ex);
}
catch (Exception ex) {
catch (TypeMismatchException ex) {
throw new InvalidPropertyException(getRootClass(), this.nestedPath + propertyName,
"Invalid index in property path '" + propertyName + "'", ex);
}
catch (InvocationTargetException ex) {
throw new InvalidPropertyException(getRootClass(), this.nestedPath + propertyName,
"Getter for property '" + actualName + "' threw exception", ex);
}
catch (Exception ex) {
throw new InvalidPropertyException(getRootClass(), this.nestedPath + propertyName,
"Illegal attempt to get property '" + actualName + "' threw exception", ex);
}
}
private Object growArrayIfNecessary(Object array, int index, String name) {
@@ -785,25 +853,31 @@ public class BeanWrapperImpl extends AbstractPropertyAccessor implements BeanWra
return array;
}
int length = Array.getLength(array);
if (index >= length) {
if (index >= length && index < this.autoGrowCollectionLimit) {
Class<?> componentType = array.getClass().getComponentType();
Object newArray = Array.newInstance(componentType, index + 1);
System.arraycopy(array, 0, newArray, 0, length);
for (int i = length; i < Array.getLength(newArray); i++) {
Array.set(newArray, i, newValue(componentType, name));
}
// TODO this is not efficient because conversion may create a copy ... set directly because we know it is assignable.
setPropertyValue(name, newArray);
return newArray;
} else {
return getPropertyValue(name);
}
else {
return array;
}
}
private void growCollectionIfNecessary(Collection collection, int index, String name, PropertyDescriptor pd, int nestingLevel) {
@SuppressWarnings("unchecked")
private void growCollectionIfNecessary(
Collection collection, int index, String name, PropertyDescriptor pd, int nestingLevel) {
if (!this.autoGrowNestedPaths) {
return;
}
if (index >= collection.size()) {
int size = collection.size();
if (index >= size && index < this.autoGrowCollectionLimit) {
Class elementType = GenericCollectionTypeResolver.getCollectionReturnType(pd.getReadMethod(), nestingLevel);
if (elementType != null) {
for (int i = collection.size(); i < index + 1; i++) {
@@ -812,7 +886,7 @@ public class BeanWrapperImpl extends AbstractPropertyAccessor implements BeanWra
}
}
}
@Override
public void setPropertyValue(String propertyName, Object value) throws BeansException {
BeanWrapperImpl nestedBw;
@@ -879,27 +953,18 @@ public class BeanWrapperImpl extends AbstractPropertyAccessor implements BeanWra
"Cannot access indexed value in property referenced " +
"in indexed property path '" + propertyName + "': returned null");
}
else if (propValue.getClass().isArray()) {
if (propValue.getClass().isArray()) {
PropertyDescriptor pd = getCachedIntrospectionResults().getPropertyDescriptor(actualName);
Class requiredType = propValue.getClass().getComponentType();
int arrayIndex = Integer.parseInt(key);
Object oldValue = null;
try {
if (isExtractOldValueForEditor()) {
if (isExtractOldValueForEditor() && arrayIndex < Array.getLength(propValue)) {
oldValue = Array.get(propValue, arrayIndex);
}
Object convertedValue = this.typeConverterDelegate.convertIfNecessary(
propertyName, oldValue, pv.getValue(), requiredType);
Array.set(propValue, Integer.parseInt(key), convertedValue);
}
catch (IllegalArgumentException ex) {
PropertyChangeEvent pce =
new PropertyChangeEvent(this.rootObject, this.nestedPath + propertyName, oldValue, pv.getValue());
throw new TypeMismatchException(pce, requiredType, ex);
}
catch (IllegalStateException ex) {
PropertyChangeEvent pce =
new PropertyChangeEvent(this.rootObject, this.nestedPath + propertyName, oldValue, pv.getValue());
throw new ConversionNotSupportedException(pce, requiredType, ex);
Object convertedValue = convertIfNecessary(propertyName, oldValue, pv.getValue(), requiredType,
new PropertyTypeDescriptor(pd, new MethodParameter(pd.getReadMethod(), -1), requiredType));
Array.set(propValue, arrayIndex, convertedValue);
}
catch (IndexOutOfBoundsException ex) {
throw new InvalidPropertyException(getRootClass(), this.nestedPath + propertyName,
@@ -916,32 +981,32 @@ public class BeanWrapperImpl extends AbstractPropertyAccessor implements BeanWra
if (isExtractOldValueForEditor() && index < list.size()) {
oldValue = list.get(index);
}
try {
Object convertedValue = this.typeConverterDelegate.convertIfNecessary(
propertyName, oldValue, pv.getValue(), requiredType);
if (index < list.size()) {
Object convertedValue = convertIfNecessary(propertyName, oldValue, pv.getValue(), requiredType,
new PropertyTypeDescriptor(pd, new MethodParameter(pd.getReadMethod(), -1), requiredType));
int size = list.size();
if (index >= size && index < this.autoGrowCollectionLimit) {
for (int i = size; i < index; i++) {
try {
list.add(null);
}
catch (NullPointerException ex) {
throw new InvalidPropertyException(getRootClass(), this.nestedPath + propertyName,
"Cannot set element with index " + index + " in List of size " +
size + ", accessed using property path '" + propertyName +
"': List does not support filling up gaps with null elements");
}
}
list.add(convertedValue);
}
else {
try {
list.set(index, convertedValue);
}
else if (index >= list.size()) {
for (int i = list.size(); i < index; i++) {
try {
list.add(null);
}
catch (NullPointerException ex) {
throw new InvalidPropertyException(getRootClass(), this.nestedPath + propertyName,
"Cannot set element with index " + index + " in List of size " +
list.size() + ", accessed using property path '" + propertyName +
"': List does not support filling up gaps with null elements");
}
}
list.add(convertedValue);
catch (IndexOutOfBoundsException ex) {
throw new InvalidPropertyException(getRootClass(), this.nestedPath + propertyName,
"Invalid list index in property path '" + propertyName + "'", ex);
}
}
catch (IllegalArgumentException ex) {
PropertyChangeEvent pce =
new PropertyChangeEvent(this.rootObject, this.nestedPath + propertyName, oldValue, pv.getValue());
throw new TypeMismatchException(pce, requiredType, ex);
}
}
else if (propValue instanceof Map) {
PropertyDescriptor pd = getCachedIntrospectionResults().getPropertyDescriptor(actualName);
@@ -950,34 +1015,19 @@ public class BeanWrapperImpl extends AbstractPropertyAccessor implements BeanWra
Class mapValueType = GenericCollectionTypeResolver.getMapValueReturnType(
pd.getReadMethod(), tokens.keys.length);
Map map = (Map) propValue;
Object convertedMapKey;
Object convertedMapValue;
try {
// IMPORTANT: Do not pass full property name in here - property editors
// must not kick in for map keys but rather only for map values.
convertedMapKey = this.typeConverterDelegate.convertIfNecessary(key, mapKeyType);
}
catch (IllegalArgumentException ex) {
PropertyChangeEvent pce =
new PropertyChangeEvent(this.rootObject, this.nestedPath + propertyName, null, pv.getValue());
throw new TypeMismatchException(pce, mapKeyType, ex);
}
// IMPORTANT: Do not pass full property name in here - property editors
// must not kick in for map keys but rather only for map values.
Object convertedMapKey = convertIfNecessary(null, null, key, mapKeyType,
new PropertyTypeDescriptor(pd, new MethodParameter(pd.getReadMethod(), -1), mapKeyType));
Object oldValue = null;
if (isExtractOldValueForEditor()) {
oldValue = map.get(convertedMapKey);
}
try {
// Pass full property name and old value in here, since we want full
// conversion ability for map values.
convertedMapValue = this.typeConverterDelegate.convertIfNecessary(
propertyName, oldValue, pv.getValue(), mapValueType,
new MethodParameter(pd.getReadMethod(), -1, tokens.keys.length + 1));
}
catch (IllegalArgumentException ex) {
PropertyChangeEvent pce =
new PropertyChangeEvent(this.rootObject, this.nestedPath + propertyName, oldValue, pv.getValue());
throw new TypeMismatchException(pce, mapValueType, ex);
}
// Pass full property name and old value in here, since we want full
// conversion ability for map values.
Object convertedMapValue = convertIfNecessary(
propertyName, oldValue, pv.getValue(), mapValueType,
new TypeDescriptor(new MethodParameter(pd.getReadMethod(), -1, tokens.keys.length + 1)));
map.put(convertedMapKey, convertedMapValue);
}
else {
@@ -1018,7 +1068,8 @@ public class BeanWrapperImpl extends AbstractPropertyAccessor implements BeanWra
else {
if (isExtractOldValueForEditor() && pd.getReadMethod() != null) {
final Method readMethod = pd.getReadMethod();
if (!Modifier.isPublic(readMethod.getDeclaringClass().getModifiers()) && !readMethod.isAccessible()) {
if (!Modifier.isPublic(readMethod.getDeclaringClass().getModifiers()) &&
!readMethod.isAccessible()) {
if (System.getSecurityManager()!= null) {
AccessController.doPrivileged(new PrivilegedAction<Object>() {
public Object run() {
@@ -1037,7 +1088,7 @@ public class BeanWrapperImpl extends AbstractPropertyAccessor implements BeanWra
public Object run() throws Exception {
return readMethod.invoke(object);
}
},acc);
}, acc);
}
else {
oldValue = readMethod.invoke(object);
@@ -1053,11 +1104,13 @@ public class BeanWrapperImpl extends AbstractPropertyAccessor implements BeanWra
}
}
}
valueToApply = this.typeConverterDelegate.convertIfNecessary(oldValue, originalValue, pd);
valueToApply = convertForProperty(propertyName, oldValue, originalValue, pd);
}
pv.getOriginalPropertyValue().conversionNecessary = (valueToApply != originalValue);
}
final Method writeMethod = pd.getWriteMethod();
final Method writeMethod = (pd instanceof GenericTypeAwarePropertyDescriptor ?
((GenericTypeAwarePropertyDescriptor) pd).getWriteMethodForActualAccess() :
pd.getWriteMethod());
if (!Modifier.isPublic(writeMethod.getDeclaringClass().getModifiers()) && !writeMethod.isAccessible()) {
if (System.getSecurityManager()!= null) {
AccessController.doPrivileged(new PrivilegedAction<Object>() {
@@ -1072,7 +1125,6 @@ public class BeanWrapperImpl extends AbstractPropertyAccessor implements BeanWra
}
}
final Object value = valueToApply;
if (System.getSecurityManager() != null) {
try {
AccessController.doPrivileged(new PrivilegedExceptionAction<Object>() {
@@ -1081,14 +1133,17 @@ public class BeanWrapperImpl extends AbstractPropertyAccessor implements BeanWra
return null;
}
}, acc);
} catch (PrivilegedActionException ex) {
}
catch (PrivilegedActionException ex) {
throw ex.getException();
}
}
else {
writeMethod.invoke(object, value);
writeMethod.invoke(this.object, value);
}
}
catch (TypeMismatchException ex) {
throw ex;
}
catch (InvocationTargetException ex) {
PropertyChangeEvent propertyChangeEvent =
@@ -1100,29 +1155,9 @@ public class BeanWrapperImpl extends AbstractPropertyAccessor implements BeanWra
throw new MethodInvocationException(propertyChangeEvent, ex.getTargetException());
}
}
catch (ConversionException ex) {
PropertyChangeEvent pce =
new PropertyChangeEvent(this.rootObject, this.nestedPath + propertyName, oldValue, pv.getValue());
throw new TypeMismatchException(pce, pd.getPropertyType(), ex);
}
catch (IllegalArgumentException ex) {
PropertyChangeEvent pce =
new PropertyChangeEvent(this.rootObject, this.nestedPath + propertyName, oldValue, pv.getValue());
throw new TypeMismatchException(pce, pd.getPropertyType(), ex);
}
catch (IllegalStateException ex) {
PropertyChangeEvent pce =
new PropertyChangeEvent(this.rootObject, this.nestedPath + propertyName, oldValue, pv.getValue());
throw new ConversionNotSupportedException(pce, pd.getPropertyType(), ex);
}
catch (IllegalAccessException ex) {
PropertyChangeEvent pce =
new PropertyChangeEvent(this.rootObject, this.nestedPath + propertyName, oldValue, pv.getValue());
throw new MethodInvocationException(pce, ex);
}
catch (Exception ex) {
PropertyChangeEvent pce =
new PropertyChangeEvent(this.rootObject, this.nestedPath + propertyName, oldValue, pv.getValue());
new PropertyChangeEvent(this.rootObject, this.nestedPath + propertyName, oldValue, pv.getValue());
throw new MethodInvocationException(pce, ex);
}
}
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2009 the original author or authors.
* Copyright 2002-2010 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -23,18 +23,18 @@ import java.beans.PropertyDescriptor;
import java.lang.ref.Reference;
import java.lang.ref.WeakReference;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Set;
import java.util.WeakHashMap;
import java.util.Collection;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.util.ClassUtils;
import org.springframework.util.StringUtils;
/**
* Internal class that caches JavaBeans {@link java.beans.PropertyDescriptor}
@@ -130,7 +130,7 @@ public class CachedIntrospectionResults {
* @throws BeansException in case of introspection failure
*/
static CachedIntrospectionResults forClass(Class beanClass) throws BeansException {
CachedIntrospectionResults results = null;
CachedIntrospectionResults results;
Object value = classCache.get(beanClass);
if (value instanceof Reference) {
Reference ref = (Reference) value;
@@ -140,19 +140,20 @@ public class CachedIntrospectionResults {
results = (CachedIntrospectionResults) value;
}
if (results == null) {
// can throw BeansException
results = new CachedIntrospectionResults(beanClass);
// On JDK 1.5 and higher, it is almost always safe to cache the bean class...
// The sole exception is a custom BeanInfo class being provided in a non-safe ClassLoader.
if (ClassUtils.isCacheSafe(beanClass, CachedIntrospectionResults.class.getClassLoader()) ||
isClassLoaderAccepted(beanClass.getClassLoader()) ||
!ClassUtils.isPresent(beanClass.getName() + "BeanInfo", beanClass.getClassLoader())) {
boolean fullyCacheable =
ClassUtils.isCacheSafe(beanClass, CachedIntrospectionResults.class.getClassLoader()) ||
isClassLoaderAccepted(beanClass.getClassLoader());
if (fullyCacheable || !ClassUtils.isPresent(beanClass.getName() + "BeanInfo", beanClass.getClassLoader())) {
results = new CachedIntrospectionResults(beanClass, fullyCacheable);
classCache.put(beanClass, results);
}
else {
if (logger.isDebugEnabled()) {
logger.debug("Not strongly caching class [" + beanClass.getName() + "] because it is not cache-safe");
}
results = new CachedIntrospectionResults(beanClass, true);
classCache.put(beanClass, new WeakReference<CachedIntrospectionResults>(results));
}
}
@@ -215,7 +216,7 @@ public class CachedIntrospectionResults {
* @param beanClass the bean class to analyze
* @throws BeansException in case of introspection failure
*/
private CachedIntrospectionResults(Class beanClass) throws BeansException {
private CachedIntrospectionResults(Class beanClass, boolean cacheFullMetadata) throws BeansException {
try {
if (logger.isTraceEnabled()) {
logger.trace("Getting BeanInfo for class [" + beanClass.getName() + "]");
@@ -236,24 +237,29 @@ public class CachedIntrospectionResults {
if (logger.isTraceEnabled()) {
logger.trace("Caching PropertyDescriptors for class [" + beanClass.getName() + "]");
}
this.propertyDescriptorCache = new HashMap<String, PropertyDescriptor>();
this.propertyDescriptorCache = new LinkedHashMap<String, PropertyDescriptor>();
// This call is slow so we do it once.
PropertyDescriptor[] pds = this.beanInfo.getPropertyDescriptors();
for (PropertyDescriptor pd : pds) {
if (Class.class.equals(beanClass) && "classLoader".equals(pd.getName())) {
// Ignore Class.getClassLoader() method - nobody needs to bind to that
continue;
}
if (logger.isTraceEnabled()) {
logger.trace("Found bean property '" + pd.getName() + "'" +
(pd.getPropertyType() != null ? " of type [" + pd.getPropertyType().getName() + "]" : "") +
(pd.getPropertyEditorClass() != null ?
"; editor [" + pd.getPropertyEditorClass().getName() + "]" : ""));
}
pd = new GenericTypeAwarePropertyDescriptor(beanClass, pd.getName(), pd.getReadMethod(),
pd.getWriteMethod(), pd.getPropertyEditorClass());
if (cacheFullMetadata) {
pd = buildGenericTypeAwarePropertyDescriptor(beanClass, pd);
}
this.propertyDescriptorCache.put(pd.getName(), pd);
}
}
catch (IntrospectionException ex) {
throw new FatalBeanException("Cannot get BeanInfo for object of class [" + beanClass.getName() + "]", ex);
throw new FatalBeanException("Failed to obtain BeanInfo for class [" + beanClass.getName() + "]", ex);
}
}
@@ -265,13 +271,38 @@ public class CachedIntrospectionResults {
return this.beanInfo.getBeanDescriptor().getBeanClass();
}
PropertyDescriptor getPropertyDescriptor(String propertyName) {
return this.propertyDescriptorCache.get(propertyName);
PropertyDescriptor getPropertyDescriptor(String name) {
PropertyDescriptor pd = this.propertyDescriptorCache.get(name);
if (pd == null && StringUtils.hasLength(name)) {
// Same lenient fallback checking as in PropertyTypeDescriptor...
pd = this.propertyDescriptorCache.get(name.substring(0, 1).toLowerCase() + name.substring(1));
if (pd == null) {
pd = this.propertyDescriptorCache.get(name.substring(0, 1).toUpperCase() + name.substring(1));
}
}
return (pd == null || pd instanceof GenericTypeAwarePropertyDescriptor ? pd :
buildGenericTypeAwarePropertyDescriptor(getBeanClass(), pd));
}
PropertyDescriptor[] getPropertyDescriptors() {
Collection<PropertyDescriptor> descriptorCollection = this.propertyDescriptorCache.values();
return descriptorCollection.toArray(new PropertyDescriptor[descriptorCollection.size()]);
PropertyDescriptor[] pds = new PropertyDescriptor[this.propertyDescriptorCache.size()];
int i = 0;
for (PropertyDescriptor pd : this.propertyDescriptorCache.values()) {
pds[i] = (pd instanceof GenericTypeAwarePropertyDescriptor ? pd :
buildGenericTypeAwarePropertyDescriptor(getBeanClass(), pd));
i++;
}
return pds;
}
private PropertyDescriptor buildGenericTypeAwarePropertyDescriptor(Class beanClass, PropertyDescriptor pd) {
try {
return new GenericTypeAwarePropertyDescriptor(beanClass, pd.getName(), pd.getReadMethod(),
pd.getWriteMethod(), pd.getPropertyEditorClass());
}
catch (IntrospectionException ex) {
throw new FatalBeanException("Failed to re-introspect class [" + beanClass.getName() + "]", ex);
}
}
}
@@ -19,26 +19,32 @@ package org.springframework.beans;
import java.beans.PropertyChangeEvent;
/**
* Exception thrown when no suitable editor can be found to set a bean property.
* Exception thrown when no suitable editor or converter can be found for a bean property.
*
* @author Arjen Poutsma
* @author Juergen Hoeller
* @since 3.0
*/
public class ConversionNotSupportedException extends TypeMismatchException {
public ConversionNotSupportedException(PropertyChangeEvent propertyChangeEvent, Class requiredType) {
super(propertyChangeEvent, requiredType);
}
/**
* Create a new ConversionNotSupportedException.
* @param propertyChangeEvent the PropertyChangeEvent that resulted in the problem
* @param requiredType the required target type (or <code>null</code> if not known)
* @param cause the root cause (may be <code>null</code>)
*/
public ConversionNotSupportedException(PropertyChangeEvent propertyChangeEvent, Class requiredType, Throwable cause) {
super(propertyChangeEvent, requiredType, cause);
}
public ConversionNotSupportedException(Object value, Class requiredType) {
super(value, requiredType);
}
/**
* Create a new ConversionNotSupportedException.
* @param value the offending value that couldn't be converted (may be <code>null</code>)
* @param requiredType the required target type (or <code>null</code> if not known)
* @param cause the root cause (may be <code>null</code>)
*/
public ConversionNotSupportedException(Object value, Class requiredType, Throwable cause) {
super(value, requiredType, cause);
}
}
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2009 the original author or authors.
* Copyright 2002-2010 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -22,6 +22,8 @@ import java.util.HashMap;
import java.util.Map;
import org.springframework.core.MethodParameter;
import org.springframework.core.convert.ConversionException;
import org.springframework.core.convert.ConverterNotFoundException;
import org.springframework.core.convert.TypeDescriptor;
import org.springframework.util.Assert;
import org.springframework.util.ReflectionUtils;
@@ -122,13 +124,15 @@ public class DirectFieldAccessor extends AbstractPropertyAccessor {
try {
ReflectionUtils.makeAccessible(field);
oldValue = field.get(this.target);
Object convertedValue = this.typeConverterDelegate.convertIfNecessary(oldValue, newValue, field);
Object convertedValue = this.typeConverterDelegate.convertIfNecessary(
field.getName(), oldValue, newValue, field.getType(), new TypeDescriptor(field));
field.set(this.target, convertedValue);
}
catch (IllegalAccessException ex) {
throw new InvalidPropertyException(this.target.getClass(), propertyName, "Field is not accessible", ex);
catch (ConverterNotFoundException ex) {
PropertyChangeEvent pce = new PropertyChangeEvent(this.target, propertyName, oldValue, newValue);
throw new ConversionNotSupportedException(pce, field.getType(), ex);
}
catch (IllegalArgumentException ex) {
catch (ConversionException ex) {
PropertyChangeEvent pce = new PropertyChangeEvent(this.target, propertyName, oldValue, newValue);
throw new TypeMismatchException(pce, field.getType(), ex);
}
@@ -136,6 +140,13 @@ public class DirectFieldAccessor extends AbstractPropertyAccessor {
PropertyChangeEvent pce = new PropertyChangeEvent(this.target, propertyName, oldValue, newValue);
throw new ConversionNotSupportedException(pce, field.getType(), ex);
}
catch (IllegalArgumentException ex) {
PropertyChangeEvent pce = new PropertyChangeEvent(this.target, propertyName, oldValue, newValue);
throw new TypeMismatchException(pce, field.getType(), ex);
}
catch (IllegalAccessException ex) {
throw new InvalidPropertyException(this.target.getClass(), propertyName, "Field is not accessible", ex);
}
}
public <T> T convertIfNecessary(
@@ -100,6 +100,10 @@ class GenericTypeAwarePropertyDescriptor extends PropertyDescriptor {
@Override
public Method getWriteMethod() {
return this.writeMethod;
}
public Method getWriteMethodForActualAccess() {
Set<Method> ambiguousCandidates = this.ambiguousWriteMethods;
if (ambiguousCandidates != null) {
this.ambiguousWriteMethods = null;
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2009 the original author or authors.
* Copyright 2002-2010 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -50,7 +50,7 @@ public class MutablePropertyValues implements PropertyValues, Serializable {
* @see #add(String, Object)
*/
public MutablePropertyValues() {
this.propertyValueList = new ArrayList<PropertyValue>();
this.propertyValueList = new ArrayList<PropertyValue>(0);
}
/**
@@ -339,8 +339,10 @@ public class MutablePropertyValues implements PropertyValues, Serializable {
@Override
public String toString() {
PropertyValue[] pvs = getPropertyValues();
StringBuilder sb = new StringBuilder("PropertyValues: length=" + pvs.length + "; ");
sb.append(StringUtils.arrayToDelimitedString(pvs, "; "));
StringBuilder sb = new StringBuilder("PropertyValues: length=").append(pvs.length);
if (pvs.length > 0) {
sb.append("; ").append(StringUtils.arrayToDelimitedString(pvs, "; "));
}
return sb.toString();
}
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2008 the original author or authors.
* Copyright 2002-2010 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -32,7 +32,8 @@ public abstract class PropertyAccessorUtils {
* @return the actual property name, without any key elements
*/
public static String getPropertyName(String propertyPath) {
int separatorIndex = propertyPath.indexOf(PropertyAccessor.PROPERTY_KEY_PREFIX_CHAR);
int separatorIndex = (propertyPath.endsWith(PropertyAccessor.PROPERTY_KEY_SUFFIX) ?
propertyPath.indexOf(PropertyAccessor.PROPERTY_KEY_PREFIX_CHAR) : -1);
return (separatorIndex != -1 ? propertyPath.substring(0, separatorIndex) : propertyPath);
}
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2009 the original author or authors.
* Copyright 2002-2010 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -39,8 +39,11 @@ import java.util.Set;
import java.util.SortedMap;
import java.util.SortedSet;
import java.util.TimeZone;
import java.util.UUID;
import java.util.regex.Pattern;
import org.xml.sax.InputSource;
import org.springframework.beans.propertyeditors.ByteArrayPropertyEditor;
import org.springframework.beans.propertyeditors.CharArrayPropertyEditor;
import org.springframework.beans.propertyeditors.CharacterEditor;
@@ -53,6 +56,7 @@ import org.springframework.beans.propertyeditors.CustomCollectionEditor;
import org.springframework.beans.propertyeditors.CustomMapEditor;
import org.springframework.beans.propertyeditors.CustomNumberEditor;
import org.springframework.beans.propertyeditors.FileEditor;
import org.springframework.beans.propertyeditors.InputSourceEditor;
import org.springframework.beans.propertyeditors.InputStreamEditor;
import org.springframework.beans.propertyeditors.LocaleEditor;
import org.springframework.beans.propertyeditors.PatternEditor;
@@ -61,6 +65,7 @@ import org.springframework.beans.propertyeditors.StringArrayPropertyEditor;
import org.springframework.beans.propertyeditors.TimeZoneEditor;
import org.springframework.beans.propertyeditors.URIEditor;
import org.springframework.beans.propertyeditors.URLEditor;
import org.springframework.beans.propertyeditors.UUIDEditor;
import org.springframework.core.convert.ConversionService;
import org.springframework.core.io.Resource;
import org.springframework.core.io.support.ResourceArrayPropertyEditor;
@@ -88,6 +93,8 @@ public class PropertyEditorRegistrySupport implements PropertyEditorRegistry {
private Map<Class, PropertyEditor> defaultEditors;
private Map<Class, PropertyEditor> overriddenDefaultEditors;
private Map<Class, PropertyEditor> customEditors;
private Map<String, CustomEditorHolder> customEditorsForPath;
@@ -136,6 +143,22 @@ public class PropertyEditorRegistrySupport implements PropertyEditorRegistry {
this.configValueEditorsActive = true;
}
/**
* Override the default editor for the specified type with the given property editor.
* <p>Note that this is different from registering a custom editor in that the editor
* semantically still is a default editor. A ConversionService will override such a
* default editor, whereas custom editors usually override the ConversionService.
* @param requiredType the type of the property
* @param propertyEditor the editor to register
* @see #registerCustomEditor(Class, PropertyEditor)
*/
public void overrideDefaultEditor(Class requiredType, PropertyEditor propertyEditor) {
if (this.overriddenDefaultEditors == null) {
this.overriddenDefaultEditors = new HashMap<Class, PropertyEditor>();
}
this.overriddenDefaultEditors.put(requiredType, propertyEditor);
}
/**
* Retrieve the default editor for the given property type, if any.
* <p>Lazily registers the default editors, if they are active.
@@ -147,8 +170,14 @@ public class PropertyEditorRegistrySupport implements PropertyEditorRegistry {
if (!this.defaultEditorsActive) {
return null;
}
if (this.overriddenDefaultEditors != null) {
PropertyEditor editor = this.overriddenDefaultEditors.get(requiredType);
if (editor != null) {
return editor;
}
}
if (this.defaultEditors == null) {
doRegisterDefaultEditors();
createDefaultEditors();
}
return this.defaultEditors.get(requiredType);
}
@@ -156,7 +185,7 @@ public class PropertyEditorRegistrySupport implements PropertyEditorRegistry {
/**
* Actually register the default editors for this registry instance.
*/
private void doRegisterDefaultEditors() {
private void createDefaultEditors() {
this.defaultEditors = new HashMap<Class, PropertyEditor>(64);
// Simple editors, without parameterization capabilities.
@@ -167,6 +196,7 @@ public class PropertyEditorRegistrySupport implements PropertyEditorRegistry {
this.defaultEditors.put(Currency.class, new CurrencyEditor());
this.defaultEditors.put(File.class, new FileEditor());
this.defaultEditors.put(InputStream.class, new InputStreamEditor());
this.defaultEditors.put(InputSource.class, new InputSourceEditor());
this.defaultEditors.put(Locale.class, new LocaleEditor());
this.defaultEditors.put(Pattern.class, new PatternEditor());
this.defaultEditors.put(Properties.class, new PropertiesEditor());
@@ -174,6 +204,7 @@ public class PropertyEditorRegistrySupport implements PropertyEditorRegistry {
this.defaultEditors.put(TimeZone.class, new TimeZoneEditor());
this.defaultEditors.put(URI.class, new URIEditor());
this.defaultEditors.put(URL.class, new URLEditor());
this.defaultEditors.put(UUID.class, new UUIDEditor());
// Default instances of collection editors.
// Can be overridden by registering custom instances of those as custom editors.
@@ -227,9 +258,10 @@ public class PropertyEditorRegistrySupport implements PropertyEditorRegistry {
* @param target the target registry to copy to
*/
protected void copyDefaultEditorsTo(PropertyEditorRegistrySupport target) {
target.defaultEditors = this.defaultEditors;
target.defaultEditorsActive = this.defaultEditorsActive;
target.configValueEditorsActive = this.configValueEditorsActive;
target.defaultEditors = this.defaultEditors;
target.overriddenDefaultEditors = this.overriddenDefaultEditors;
}
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2009 the original author or authors.
* Copyright 2002-2010 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,6 +17,8 @@
package org.springframework.beans;
import org.springframework.core.MethodParameter;
import org.springframework.core.convert.ConversionException;
import org.springframework.core.convert.ConverterNotFoundException;
/**
* Simple implementation of the TypeConverter interface that does not operate
@@ -46,12 +48,18 @@ public class SimpleTypeConverter extends PropertyEditorRegistrySupport implement
try {
return this.typeConverterDelegate.convertIfNecessary(value, requiredType, methodParam);
}
catch (IllegalArgumentException ex) {
catch (ConverterNotFoundException ex) {
throw new ConversionNotSupportedException(value, requiredType, ex);
}
catch (ConversionException ex) {
throw new TypeMismatchException(value, requiredType, ex);
}
catch (IllegalStateException ex) {
throw new ConversionNotSupportedException(value, requiredType, ex);
}
catch (IllegalArgumentException ex) {
throw new TypeMismatchException(value, requiredType, ex);
}
}
}
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2009 the original author or authors.
* Copyright 2002-2011 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -21,6 +21,7 @@ import java.beans.PropertyEditor;
import java.lang.reflect.Array;
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
import java.util.Collection;
import java.util.Iterator;
import java.util.Map;
@@ -33,6 +34,7 @@ import org.springframework.core.GenericCollectionTypeResolver;
import org.springframework.core.MethodParameter;
import org.springframework.core.convert.ConversionService;
import org.springframework.core.convert.TypeDescriptor;
import org.springframework.core.convert.support.PropertyTypeDescriptor;
import org.springframework.util.ClassUtils;
import org.springframework.util.StringUtils;
@@ -76,18 +78,6 @@ class TypeConverterDelegate {
}
/**
* Convert the value to the specified required type.
* @param newValue the proposed new value
* @param requiredType the type we must convert to
* (or <code>null</code> if not known, for example in case of a collection element)
* @return the new value, possibly the result of type conversion
* @throws IllegalArgumentException if type conversion failed
*/
public <T> T convertIfNecessary(Object newValue, Class<T> requiredType) throws IllegalArgumentException {
return convertIfNecessary(null, null, newValue, requiredType, TypeDescriptor.valueOf(requiredType));
}
/**
* Convert the value to the specified required type.
* @param newValue the proposed new value
@@ -122,54 +112,6 @@ class TypeConverterDelegate {
return convertIfNecessary(propertyName, oldValue, newValue, requiredType, TypeDescriptor.valueOf(requiredType));
}
/**
* Convert the value to the required type (if necessary from a String),
* for the specified property.
* @param propertyName name of the property
* @param oldValue the previous value, if available (may be <code>null</code>)
* @param newValue the proposed new value
* @param requiredType the type we must convert to
* (or <code>null</code> if not known, for example in case of a collection element)
* @param methodParam the method parameter that is the target of the conversion
* @return the new value, possibly the result of type conversion
* @throws IllegalArgumentException if type conversion failed
*/
public <T> T convertIfNecessary(String propertyName, Object oldValue, Object newValue,
Class<T> requiredType, MethodParameter methodParam) throws IllegalArgumentException {
return convertIfNecessary(propertyName, oldValue, newValue, requiredType, new TypeDescriptor(methodParam));
}
/**
* Convert the value to the required type for the specified property.
* @param oldValue the previous value, if available (may be <code>null</code>)
* @param newValue the proposed new value
* @param descriptor the JavaBeans descriptor for the property
* @return the new value, possibly the result of type conversion
* @throws IllegalArgumentException if type conversion failed
*/
public Object convertIfNecessary(Object oldValue, Object newValue, PropertyDescriptor descriptor)
throws IllegalArgumentException {
return convertIfNecessary(descriptor.getName(), oldValue, newValue, descriptor.getPropertyType(),
new BeanTypeDescriptor(descriptor));
}
/**
* Convert the value to the required type for the specified property.
* @param oldValue the previous value, if available (may be <code>null</code>)
* @param newValue the proposed new value
* @param field the field that is the target of the conversion
* @return the new value, possibly the result of type conversion
* @throws IllegalArgumentException if type conversion failed
*/
public Object convertIfNecessary(Object oldValue, Object newValue, Field field)
throws IllegalArgumentException {
return convertIfNecessary(field.getName(), oldValue, newValue, field.getType(), new TypeDescriptor(field));
}
/**
* Convert the value to the required type (if necessary from a String),
* for the specified property.
@@ -183,7 +125,7 @@ class TypeConverterDelegate {
* @throws IllegalArgumentException if type conversion failed
*/
@SuppressWarnings("unchecked")
private <T> T convertIfNecessary(String propertyName, Object oldValue, Object newValue,
public <T> T convertIfNecessary(String propertyName, Object oldValue, Object newValue,
Class<T> requiredType, TypeDescriptor typeDescriptor) throws IllegalArgumentException {
Object convertedValue = newValue;
@@ -194,14 +136,25 @@ class TypeConverterDelegate {
// No custom editor but custom ConversionService specified?
ConversionService conversionService = this.propertyEditorRegistry.getConversionService();
if (editor == null && conversionService != null && convertedValue != null) {
TypeDescriptor sourceTypeDesc = TypeDescriptor.valueOf(convertedValue.getClass());
if (conversionService.canConvert(sourceTypeDesc, typeDescriptor)) {
return (T) conversionService.convert(convertedValue, sourceTypeDesc, typeDescriptor);
TypeDescriptor sourceTypeDesc = TypeDescriptor.forObject(convertedValue);
TypeDescriptor targetTypeDesc = typeDescriptor;
if (requiredType != null && !requiredType.isAssignableFrom(typeDescriptor.getType())) {
targetTypeDesc = typeDescriptor.forElementType(requiredType);
}
if (conversionService.canConvert(sourceTypeDesc, targetTypeDesc)) {
return (T) conversionService.convert(convertedValue, sourceTypeDesc, targetTypeDesc);
}
}
// Value not of required type?
if (editor != null || (requiredType != null && !ClassUtils.isAssignableValue(requiredType, convertedValue))) {
if (requiredType != null && Collection.class.isAssignableFrom(requiredType) &&
convertedValue instanceof String && typeDescriptor.getMethodParameter() != null) {
Class elemType = GenericCollectionTypeResolver.getCollectionParameterType(typeDescriptor.getMethodParameter());
if (elemType != null && Enum.class.isAssignableFrom(elemType)) {
convertedValue = StringUtils.commaDelimitedListToStringArray((String) convertedValue);
}
}
if (editor == null) {
editor = findDefaultEditor(requiredType, typeDescriptor);
}
@@ -214,6 +167,9 @@ class TypeConverterDelegate {
if (convertedValue != null) {
if (requiredType.isArray()) {
// Array required -> apply appropriate conversion of elements.
if (convertedValue instanceof String && Enum.class.isAssignableFrom(requiredType.getComponentType())) {
convertedValue = StringUtils.commaDelimitedListToStringArray((String) convertedValue);
}
return (T) convertToTypedArray(convertedValue, propertyName, requiredType.getComponentType());
}
else if (convertedValue instanceof Collection) {
@@ -271,7 +227,8 @@ class TypeConverterDelegate {
}
if (editor != null) {
msg.append(": PropertyEditor [").append(editor.getClass().getName()).append(
"] returned inappropriate value");
"] returned inappropriate value of type [").append(
ClassUtils.getDescriptiveType(convertedValue)).append("]");
throw new IllegalArgumentException(msg.toString());
}
else {
@@ -338,8 +295,8 @@ class TypeConverterDelegate {
*/
protected PropertyEditor findDefaultEditor(Class requiredType, TypeDescriptor typeDescriptor) {
PropertyEditor editor = null;
if (typeDescriptor instanceof BeanTypeDescriptor) {
PropertyDescriptor pd = ((BeanTypeDescriptor) typeDescriptor).getPropertyDescriptor();
if (typeDescriptor instanceof PropertyTypeDescriptor) {
PropertyDescriptor pd = ((PropertyTypeDescriptor) typeDescriptor).getPropertyDescriptor();
editor = pd.createPropertyEditor(this.targetObject);
}
if (editor == null && requiredType != null) {
@@ -507,6 +464,19 @@ class TypeConverterDelegate {
protected Collection convertToTypedCollection(
Collection original, String propertyName, Class requiredType, TypeDescriptor typeDescriptor) {
if (!Collection.class.isAssignableFrom(requiredType)) {
return original;
}
boolean approximable = CollectionFactory.isApproximableCollectionType(requiredType);
if (!approximable && !canCreateCopy(requiredType)) {
if (logger.isDebugEnabled()) {
logger.debug("Custom Collection type [" + original.getClass().getName() +
"] does not allow for creating a copy - injecting original Collection as-is");
}
return original;
}
boolean originalAllowed = requiredType.isInstance(original);
MethodParameter methodParam = typeDescriptor.getMethodParameter();
Class elementType = null;
@@ -532,14 +502,14 @@ class TypeConverterDelegate {
catch (Throwable ex) {
if (logger.isDebugEnabled()) {
logger.debug("Cannot access Collection of type [" + original.getClass().getName() +
"] - injecting original Collection as-is", ex);
"] - injecting original Collection as-is: " + ex);
}
return original;
}
Collection convertedCopy;
try {
if (CollectionFactory.isApproximableCollectionType(requiredType)) {
if (approximable) {
convertedCopy = CollectionFactory.createApproximateCollection(original, original.size());
}
else {
@@ -549,7 +519,7 @@ class TypeConverterDelegate {
catch (Throwable ex) {
if (logger.isDebugEnabled()) {
logger.debug("Cannot create copy of Collection type [" + original.getClass().getName() +
"] - injecting original Collection as-is", ex);
"] - injecting original Collection as-is: " + ex);
}
return original;
}
@@ -561,19 +531,43 @@ class TypeConverterDelegate {
if (methodParam != null) {
methodParam.increaseNestingLevel();
}
Object convertedElement =
convertIfNecessary(indexedPropertyName, null, element, elementType, typeDescriptor);
Object convertedElement = convertIfNecessary(
indexedPropertyName, null, element, elementType, typeDescriptor);
if (methodParam != null) {
methodParam.decreaseNestingLevel();
}
convertedCopy.add(convertedElement);
try {
convertedCopy.add(convertedElement);
}
catch (Throwable ex) {
if (logger.isDebugEnabled()) {
logger.debug("Collection type [" + original.getClass().getName() +
"] seems to be read-only - injecting original Collection as-is: " + ex);
}
return original;
}
originalAllowed = originalAllowed && (element == convertedElement);
}
return (originalAllowed ? original : convertedCopy);
}
@SuppressWarnings("unchecked")
protected Map convertToTypedMap(Map original, String propertyName, Class requiredType, TypeDescriptor typeDescriptor) {
protected Map convertToTypedMap(
Map original, String propertyName, Class requiredType, TypeDescriptor typeDescriptor) {
if (!Map.class.isAssignableFrom(requiredType)) {
return original;
}
boolean approximable = CollectionFactory.isApproximableMapType(requiredType);
if (!approximable && !canCreateCopy(requiredType)) {
if (logger.isDebugEnabled()) {
logger.debug("Custom Map type [" + original.getClass().getName() +
"] does not allow for creating a copy - injecting original Map as-is");
}
return original;
}
boolean originalAllowed = requiredType.isInstance(original);
Class keyType = null;
Class valueType = null;
@@ -601,14 +595,14 @@ class TypeConverterDelegate {
catch (Throwable ex) {
if (logger.isDebugEnabled()) {
logger.debug("Cannot access Map of type [" + original.getClass().getName() +
"] - injecting original Map as-is", ex);
"] - injecting original Map as-is: " + ex);
}
return original;
}
Map convertedCopy;
try {
if (CollectionFactory.isApproximableMapType(requiredType)) {
if (approximable) {
convertedCopy = CollectionFactory.createApproximateMap(original, original.size());
}
else {
@@ -618,7 +612,7 @@ class TypeConverterDelegate {
catch (Throwable ex) {
if (logger.isDebugEnabled()) {
logger.debug("Cannot create copy of Map type [" + original.getClass().getName() +
"] - injecting original Map as-is", ex);
"] - injecting original Map as-is: " + ex);
}
return original;
}
@@ -640,7 +634,16 @@ class TypeConverterDelegate {
if (methodParam != null) {
methodParam.decreaseNestingLevel();
}
convertedCopy.put(convertedKey, convertedValue);
try {
convertedCopy.put(convertedKey, convertedValue);
}
catch (Throwable ex) {
if (logger.isDebugEnabled()) {
logger.debug("Map type [" + original.getClass().getName() +
"] seems to be read-only - injecting original Map as-is: " + ex);
}
return original;
}
originalAllowed = originalAllowed && (key == convertedKey) && (value == convertedValue);
}
return (originalAllowed ? original : convertedCopy);
@@ -658,4 +661,9 @@ class TypeConverterDelegate {
null);
}
private boolean canCreateCopy(Class requiredType) {
return (!requiredType.isInterface() && !Modifier.isAbstract(requiredType.getModifiers()) &&
Modifier.isPublic(requiredType.getModifiers()) && ClassUtils.hasConstructor(requiredType));
}
}
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2009 the original author or authors.
* Copyright 2002-2010 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -153,8 +153,14 @@ public interface BeanFactory {
* Return the bean instance that uniquely matches the given object type, if any.
* @param requiredType type the bean must match; can be an interface or superclass.
* {@literal null} is disallowed.
* @return bean matching required type
* <p>This method goes into {@link ListableBeanFactory} by-type lookup territory
* but may also be translated into a conventional by-name lookup based on the name
* of the given type. For more extensive retrieval operations across sets of beans,
* use {@link ListableBeanFactory} and/or {@link BeanFactoryUtils}.
* @return an instance of the single bean matching the required type
* @throws NoSuchBeanDefinitionException if there is not exactly one matching bean found
* @since 3.0
* @see ListableBeanFactory
*/
<T> T getBean(Class<T> requiredType) throws BeansException;
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2008 the original author or authors.
* Copyright 2002-2010 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -208,6 +208,11 @@ public abstract class BeanFactoryUtils {
* <p>Does consider objects created by FactoryBeans, which means that FactoryBeans
* will get initialized. If the object created by the FactoryBean doesn't match,
* the raw FactoryBean itself will be matched against the type.
* <p><b>Note: Beans of the same name will take precedence at the 'lowest' factory level,
* i.e. such beans will be returned from the lowest factory that they are being found in,
* hiding corresponding beans in ancestor factories.</b> This feature allows for
* 'replacing' beans by explicitly choosing the same bean name in a child factory;
* the bean in the ancestor factory won't be visible then, not even for by-type lookups.
* @param lbf the bean factory
* @param type type of bean to match
* @return the Map of matching bean instances, or an empty Map if none
@@ -239,12 +244,16 @@ public abstract class BeanFactoryUtils {
* Return all beans of the given type or subtypes, also picking up beans defined in
* ancestor bean factories if the current bean factory is a HierarchicalBeanFactory.
* The returned Map will only contain beans of this type.
* <p>Does consider objects created by FactoryBeans if the "allowEagerInit"
* flag is set, which means that FactoryBeans will get initialized. If the
* object created by the FactoryBean doesn't match, the raw FactoryBean itself
* will be matched against the type. If "allowEagerInit" is not set,
* only raw FactoryBeans will be checked (which doesn't require initialization
* of each FactoryBean).
* <p>Does consider objects created by FactoryBeans if the "allowEagerInit" flag is set,
* which means that FactoryBeans will get initialized. If the object created by the
* FactoryBean doesn't match, the raw FactoryBean itself will be matched against the
* type. If "allowEagerInit" is not set, only raw FactoryBeans will be checked
* (which doesn't require initialization of each FactoryBean).
* <p><b>Note: Beans of the same name will take precedence at the 'lowest' factory level,
* i.e. such beans will be returned from the lowest factory that they are being found in,
* hiding corresponding beans in ancestor factories.</b> This feature allows for
* 'replacing' beans by explicitly choosing the same bean name in a child factory;
* the bean in the ancestor factory won't be visible then, not even for by-type lookups.
* @param lbf the bean factory
* @param type type of bean to match
* @param includeNonSingletons whether to include prototype or scoped beans too
@@ -291,6 +300,11 @@ public abstract class BeanFactoryUtils {
* the raw FactoryBean itself will be matched against the type.
* <p>This version of <code>beanOfTypeIncludingAncestors</code> automatically includes
* prototypes and FactoryBeans.
* <p><b>Note: Beans of the same name will take precedence at the 'lowest' factory level,
* i.e. such beans will be returned from the lowest factory that they are being found in,
* hiding corresponding beans in ancestor factories.</b> This feature allows for
* 'replacing' beans by explicitly choosing the same bean name in a child factory;
* the bean in the ancestor factory won't be visible then, not even for by-type lookups.
* @param lbf the bean factory
* @param type type of bean to match
* @return the matching bean instance
@@ -315,12 +329,16 @@ public abstract class BeanFactoryUtils {
* defined in ancestor bean factories if the current bean factory is a
* HierarchicalBeanFactory. Useful convenience method when we expect a
* single bean and don't care about the bean name.
* <p>Does consider objects created by FactoryBeans if the "allowEagerInit"
* flag is set, which means that FactoryBeans will get initialized. If the
* object created by the FactoryBean doesn't match, the raw FactoryBean itself
* will be matched against the type. If "allowEagerInit" is not set,
* only raw FactoryBeans will be checked (which doesn't require initialization
* of each FactoryBean).
* <p>Does consider objects created by FactoryBeans if the "allowEagerInit" flag is set,
* which means that FactoryBeans will get initialized. If the object created by the
* FactoryBean doesn't match, the raw FactoryBean itself will be matched against the
* type. If "allowEagerInit" is not set, only raw FactoryBeans will be checked
* (which doesn't require initialization of each FactoryBean).
* <p><b>Note: Beans of the same name will take precedence at the 'lowest' factory level,
* i.e. such beans will be returned from the lowest factory that they are being found in,
* hiding corresponding beans in ancestor factories.</b> This feature allows for
* 'replacing' beans by explicitly choosing the same bean name in a child factory;
* the bean in the ancestor factory won't be visible then, not even for by-type lookups.
* @param lbf the bean factory
* @param type type of bean to match
* @param includeNonSingletons whether to include prototype or scoped beans too

Some files were not shown because too many files have changed in this diff Show More