Commit Graph

4735 Commits

Author SHA1 Message Date
Rossen Stoyanchev 28a696ba51 SPR-8676 Fix minor issue in how ServletServletHttpRequest detects form content-type requests 2011-09-13 12:35:05 +00:00
Rossen Stoyanchev de504fa613 SPR-8678 Use the lookup path to determine the media type by file name. 2011-09-13 09:16:42 +00:00
Rossen Stoyanchev 2799e710bc SPR-6464 Add 'setAlwaysUseRedirectAttributes' flag.
When set to 'true' the flag makes RedirectAttributes the only way to add 
attributes for a redirect thus ignoring the content of the default model 
even if RedirectAttributes is not in the list of controller method args.
2011-09-13 07:53:17 +00:00
Chris Beams a456a1a0e3 Improve annotation processing thread-safety
Commit http://bit.ly/nXumTs ensured that component methods and fields
marked with 'common annotations' such as @Resource, @PostConstruct and
@PreDestroy are invoked/assigned once and only once, even if multiple
instances of the CommonAnnotationBeanPostProcessor are processing the
same bean factory.

The implementation works against the InjectionMetadata API, adding and
removing these members from sets that track whether they are already
'externally managed', i.e. that another CABPP has already handled them,
thus avoiding redundant processing.

Prior to this change, the #remove operations against these sets were
not synchronized. In a single-threaded context this is fine thanks to
logic in AbstractAutowireCapableBeanFactory#doCreateBean that checks to
see whether a given bean definition has already been post processed.
However, as reported by SPR-8598, certain cases involving multiple
threads and annotated prototype-scoped beans can cause concurrent
modification exceptions during the #remove operation (ostensibly because
another thread is attempting to do the same removal at the same time,
though this has yet to be reproduced in isolation).

Now the sets originally introduced by the commit above are decorated
with Collections#synchronizedSet and any iterations over those sets
are synchronized properly. This change should have low performance
impact as such processing happens at container startup time (save for
non-singleton lookups at runtime), and there should be little
contention in any case.

Issue: SPR-8598
2011-09-12 23:05:01 +00:00
Arjen Poutsma c8add61a72 SPR-5973: Using UriComponents in more places, replaced UriBuilder by UriComponentsBuilder, UriComponents is now immutable. 2011-09-12 14:39:58 +00:00
Rossen Stoyanchev ce8bc8e7e4 SPR-6464 Add one more minor Javadoc comment 2011-09-09 17:05:47 +00:00
Rossen Stoyanchev 671744aa62 SPR-6464 Polish FlashMap changes. 2011-09-09 16:48:00 +00:00
Arjen Poutsma f0ed37c233 SPR-5973: UriUtils.parse returns UriComponents 2011-09-09 11:01:05 +00:00
Arjen Poutsma 65baafa032 SPR-5973: Made UriComponent enum inner type of UriComponents 2011-09-09 10:57:13 +00:00
Arjen Poutsma 6c58da0e55 SPR-5973: Added UriComponents type 2011-09-09 10:49:10 +00:00
Rossen Stoyanchev 56c8c69c4c SPR-8642 IMPROVE ERROR REPORTING WHEN RESOLVING MULTIPART REQUEST METHOD ARGUMENTS
Separate client from server errors as much as possible in this order:
- raise MultipartException when resolving a multipart arg and the 
  request is not a multipart request (400)
- raise IllegalArgumentException when the arg type is MultipartFile 
  but the request is not of type MultipartHttpServletRequest (500)
- raise MissingServletRequestPartException when a MultipartResolver
  is in use but the part is not found (400)
- detect presence of Servlet 3.0 before using standard multipart 
  parsing to find a request part or raise 
  IllegalArgumentException (500)

Unfortunately it is not always possible to separate client from 
server errors mainly because the Servlet 3.0 API does not 
distinguish between the case of 0 request parts vs multipart 
processing not being configured.
2011-09-09 09:09:10 +00:00
Arjen Poutsma b6c1e88e4a SPR-5973: Cleaning it up 2011-09-08 11:01:56 +00:00
Arjen Poutsma 5f208936ec Added parse methods 2011-09-07 13:58:51 +00:00
Arjen Poutsma 99f68d3620 SPR-5973: javadoc 2011-09-07 11:49:15 +00:00
Arjen Poutsma 420d11911b SPR-5973: Extract UriComponentTemplate out of UriTemplate 2011-09-07 11:26:22 +00:00
Arjen Poutsma 1d75e1b250 SPR-5973: Changed UriComponent from inner type to top-level enum 2011-09-07 10:40:40 +00:00
Arjen Poutsma 6b7e7d9b5c SPR-5973: UriBuilder 2011-09-07 09:07:09 +00:00
Arjen Poutsma f1c68f243e Changed ClientHttpRequestInterceptor array to List 2011-09-07 08:39:58 +00:00
Chris Beams 49b38190ee Fix typo in cache abstraction reference doc
Issue: SPR-8670
2011-09-06 21:03:02 +00:00
Arjen Poutsma 9a25efbbda SPR-5973: UriBuilder 2011-09-06 15:42:33 +00:00
Rossen Stoyanchev 498d81f696 SPR-8646 Encode URI template variables in the target URL of RedirectView. 2011-09-05 15:05:18 +00:00
Chris Beams 8759b20e46 Include javax.jdo 3.x in spring-orm template.mf
Prior to this change, spring-orm/template.mf was exclusive of javax.jdo
3.0.0. Now, after local testing against the newly-released jdo-api 3.0
jar, the template has been updated to allow for use in OSGi containers.
Note that actually updating build dependency descriptors to JDO 3.0 such
that the framework is continually tested against this version is covered
by a separate issue (SPR-8668).

Issue: SPR-8667, SPR-8655
2011-09-04 01:06:35 +00:00
Chris Beams 2e5f3559d3 Fix handling of @EnableLoadTimeWeaving AUTODETECT
Issue: SPR-8643
2011-09-03 22:37:16 +00:00
Chris Beams 4e522c0cc3 Fix Javadoc error in JdbcOperations
Issue: SPR-8664
2011-09-03 20:07:08 +00:00
Costin Leau d9de19d7b3 SPR-8653
+ refactor a bit the internals of CacheAspect to allow invocations that do not throw any exceptions (AspectJ)
2011-09-02 15:37:42 +00:00
Rossen Stoyanchev 91251812b1 Polish @ExceptionHandler method resolution. Allow subclasses to plug in additional @ExceptionHandler methods. 2011-09-02 11:04:23 +00:00
Costin Leau 04bcd77520 + temporarily revert change 2011-09-02 08:25:39 +00:00
Rossen Stoyanchev b6d7c85f6e SPR-7812 Provide separate methods for type and method-level custom request conditions. Polish javadoc in RequestMappingInfo and related HandlerMapping classes 2011-09-01 12:02:19 +00:00
Costin Leau ddfb2d3c58 + remove unneeded catch for exceptions inside AbstractCacheAspect.aj 2011-09-01 08:04:16 +00:00
Rossen Stoyanchev 37d22ad039 SPR-8611 Add detection of RedirectView when selecting the best view in ContentNegotiatingViewResolver. 2011-08-31 14:51:24 +00:00
Rossen Stoyanchev 7bf44f06a0 SPR-8596 Detect case in UriPathHelper where originating request query (before forwarding) is null. 2011-08-31 13:00:24 +00:00
Costin Leau ce70c985b4 + add documentation on declarative XML 2011-08-31 10:27:42 +00:00
Arjen Poutsma b06de49c72 Changed ClientHttpRequestInterceptor array to List 2011-08-31 09:03:19 +00:00
Arjen Poutsma 4a669d1a0a Removed UrlPathHelper, as it's provided by the superclass 2011-08-31 08:42:45 +00:00
Sam Brannen 1a34f6459d [SPR-8644][SPR-8633] introduced failing (ignored) test regarding support for invoking methods that accept var-args. 2011-08-30 14:20:12 +00:00
Sam Brannen 16fb3cb4b3 [SPR-8644] Introduced a failing (ignored) test that demonstrates that findMethod() does not currently support var-args. 2011-08-30 14:05:51 +00:00
Sam Brannen 1de71c6e37 [SPR-8222] Upgraded to JUnit 4.9. 2011-08-30 13:16:12 +00:00
Rossen Stoyanchev 6a06a17c47 SPR-6464 Add target request matching logic to DefaultFlashMapManager. 2011-08-29 08:37:43 +00:00
Chris Beams 71984b8038 Fix ExtendedBeanInfo indexed write method edge case
See comments at ExtendedBeanInfo#reproSpr8522

Issue: SPR-8522
2011-08-29 05:31:47 +00:00
Sam Brannen 2fc78fb8fd [SPR-8240] cleaned up and formatted the testing chapter. 2011-08-26 22:23:02 +00:00
Sam Brannen 7908d05c71 [SPR-8627] Deprecated @ExpectedException.
[SPR-8240] cleaned up and formatted the testing chapter.
2011-08-26 22:21:16 +00:00
Rossen Stoyanchev 0460a5eceb SPR-8536 Add exact matches when comparing 'produces' conditions (e.g. given Accept: text/*, method with text/* is preferred over text/plain). Also pick a media type alphabetically when two 'produces' condition media types match equally (e.g. given Accept: text/* method with text/plain is chosen over text/xhtml) 2011-08-25 13:09:14 +00:00
Rossen Stoyanchev 00ff018b39 SPR-6464 Uncommitted file from the last commit. 2011-08-25 08:11:17 +00:00
Rossen Stoyanchev baea01ac90 SPR-6464 Add RedirectAttributes and SmartView interfaces. 2011-08-25 07:50:07 +00:00
Chris Beams bd7fd57ad2 Fix cache ref doc typo: Eh{c=>C}acheCacheManager
Issue: SPR-8632, SPR-8635
2011-08-24 19:05:49 +00:00
Chris Beams 7d177ecfd4 Update Servlet 3.0 dependency in webmvc pom 2011-08-24 19:05:45 +00:00
Sam Brannen 7a1553472d [SPR-8633] Introduced generic invokeMethod() in ReflectionTestUtils. 2011-08-24 17:29:00 +00:00
Sam Brannen 4d99ddba8a [SPR-8633] Introduced generic invokeMethod() in ReflectionTestUtils. 2011-08-24 17:26:59 +00:00
Sam Brannen 72da569aa3 [SPR-8386][SPR-8387] Revised Javadoc in the TestContext framework regarding changes in 3.1. 2011-08-20 23:14:20 +00:00
Sam Brannen 1c7cc172d9 [SPR-8627] Deprecated @ExpectedException. 2011-08-20 18:39:36 +00:00