Commit Graph

12151 Commits

Author SHA1 Message Date
Juergen Hoeller
7589c1f164 Aligned class name quoting with ConversionFailedException 2015-12-01 16:10:11 +01:00
Juergen Hoeller
44651fdf7c ObjectToObjectConverter caches detected methods/constructors
This commit reworks the arrangement to a centralized cache, avoiding any extra reflection attempts if a cache entry is known already. In the course of this, it also enforces toXXX methods to be declared as non-static now (which is the only sensible arrangement anyway).

Issue: SPR-13703
2015-12-01 16:07:21 +01:00
Brian Clozel
c226753985 Do not rewrite relative links with FixedVersionStrategy
Prior to this change, the resource handling FixedVersionStrategy would
be applied on all links that match the configured pattern. This is
problematic for relative links and can lead to rewritten links such as
"/fixedversion/../css/main.css" which breaks.

This commit prevents that Strategy from being applied to such links.
Of course, one should avoid to use that VersionStrategy with relative
links, but this change aims at not breaking existing links even if it
means not prefixing the version as expected.

Issue: SPR-13727
2015-12-01 14:47:23 +01:00
Juergen Hoeller
38c21ee6bf Class identity comparisons wherever possible
Issue: SPR-12926
2015-12-01 14:11:44 +01:00
Juergen Hoeller
b70af3bf57 Polishing 2015-12-01 14:10:46 +01:00
Rossen Stoyanchev
fed4391f87 Fix issue in UriTemplate parsing
The recent commit 971f04 replaced the use of a NAMES_PATTERN regex in
favor of direct parsing in order to deal with nested curly braces.

The change also incorrectly replicated this logic which removes a
trailing slash after Pattern quoting (and not before):

cca037a74d/spring-web/src/main/java/org/springframework/web/util/UriTemplate.java (L207-L210)

After some more investigation there doesn't appear to be any scenario
where the quoted pattern would end with a trailing slash. It should
always end with \E (end of quote) or a ")" (end of group). Nor are
there any failing tests so this commit removes the logic altogether.

Issue: SPR-13705
2015-11-30 17:46:28 -05:00
Juergen Hoeller
998da2f45c Document destruction callback behavior for inner beans in case of scope mismatch
This commit undoes the previous refinement and rather documents the original behavior.

Issue: SPR-13739
2015-11-30 21:57:54 +01:00
Juergen Hoeller
8ed2c470be Avoid instantiation of non-selected beans in BeanFactoryAnnotationUtils.qualifiedBeanOfType
Issue: SPR-13741
2015-11-30 20:13:03 +01:00
Juergen Hoeller
7104076e19 Avoid Scope.registerDestructionCallback for inner beans in case of scope mismatch
This commit refines getMergedBeanDefinition's scope adaptation algorithm for inner beans, never leaving a custom scope within a containing bean of a different scope. The inner bean's scope will either be aligned with the containing bean's scope (matching the effective state) or be switched to prototype in case of an outer singleton (indicating that no singleton state management is desired).

Issue: SPR-13739
2015-11-30 20:10:26 +01:00
Juergen Hoeller
4755467cca Polishing 2015-11-30 12:36:30 +01:00
Juergen Hoeller
def10343ea Unit tests for @Value Resource resolution
Issue: SPR-13731
2015-11-30 10:41:55 +01:00
Juergen Hoeller
edbb8bbb01 JodaTimeFormatterRegistrar defensively checks whether Joda-Time 2.x is present (for Joda-Time 1.x tolerance on the classpath)
Also switches 4.2.4's new formatter implementations to package visibility, just in case they'll be superseded by another variant in the future.

Issue: SPR-13730
2015-11-29 22:22:05 +01:00
Juergen Hoeller
3234d9ede3 ObjectToObjectConverter caches detected methods/constructors
Includes polishing of related conversion exception messages.

Issue: SPR-13703
2015-11-29 22:17:16 +01:00
Juergen Hoeller
aef6b20626 Removed tests for invalid -1 index (for compatibility with JsonPath 2.1) 2015-11-27 14:11:40 +01:00
Juergen Hoeller
9bb72e8386 Javadoc fixes 2015-11-27 13:19:39 +01:00
Juergen Hoeller
5e16834751 Latest dependency updates (OkHttp 2.6, Gson 2.4, JsonPath 2.1, JRuby 1.7.23, Undertow 1.3.7) 2015-11-27 13:17:40 +01:00
Juergen Hoeller
3681094564 Upgrade to EhCache 3.0 M4 2015-11-26 16:32:01 +01:00
Juergen Hoeller
dd647659b3 Rearranged cache test class names across several modules 2015-11-26 16:30:44 +01:00
Juergen Hoeller
331e739255 Latest dependency updates (Hibernate ORM 5.0.4, Tomcat 8.0.29, Undertow 1.3.6) 2015-11-26 02:10:03 +01:00
Juergen Hoeller
8c4436926f Polishing 2015-11-26 02:09:37 +01:00
Andy Clement
a39867bd8e Tweak docs concerning method execution pointcut signature
Issue: SPR-13512
2015-11-25 16:44:34 -08:00
Juergen Hoeller
1da564d2f0 Joda/DateTimeFormatterRegistrar also supports YearMonth and MonthDay
Issue: SPR-13518
2015-11-25 23:39:14 +01:00
Juergen Hoeller
bc0b707175 JodaTimeFormatterRegistrar supports Duration and Period as well
Issue: SPR-6706
2015-11-25 23:10:32 +01:00
Juergen Hoeller
fd84262e71 Polishing 2015-11-25 23:09:24 +01:00
Stephane Nicoll
9882a53c7d Fix test failure 2015-11-25 22:05:57 +01:00
Juergen Hoeller
a0747c2148 Consistent bean type checking for endpoint handlers
Issue: SPR-13725
2015-11-25 21:26:03 +01:00
Stephane Nicoll
c90ca15add Fix caching tests
Update assertion to validate the proper exception type is thrown.
2015-11-25 17:49:44 +01:00
Juergen Hoeller
17df02d01e Explicit flush example with JPA EntityManager
Issue: SPR-13723
2015-11-25 16:58:17 +01:00
Juergen Hoeller
24e4f56d7e Test case for event listener methods on bean with potentially inactive scope
Also taking the opportunity to refine the "No Scope registered" exception message a bit.

Issue: SPR-13681
2015-11-25 16:56:39 +01:00
Juergen Hoeller
bb05bc7c01 EventListenerMethodProcessor leniently handles unresolvable bean types
Issue: SPR-13712
2015-11-25 15:40:38 +01:00
Juergen Hoeller
2a3bf69991 AsyncAnnotationBeanPostProcessor leniently handles ambiguous TaskExecutor beans
Issue: SPR-13720
2015-11-25 15:39:12 +01:00
Andy Clement
58756b023c Ensure cast correctly included for OpPlus compilation
When the plus operator is used between strings in a SpEL
expression and that expression is compiled, it is
important to include a cast if computation of any of
the operands isn't obviously leaving strings on the
stack. Likewise if the stack contents are known to
be strings, a cast should not be included.

Issue: SPR-12426
2015-11-24 16:35:08 -08:00
Juergen Hoeller
d5ca5b74a5 DateTimeFormatterRegistrar supports Duration and Period as well
Issue: SPR-13721
2015-11-25 00:21:03 +01:00
Brian Clozel
b35d44bd4c Fix inputstream reading for HTTP range requests
Prior to this commit, range requests would be served by
ResourceHttpRequestHandler by partially reading the inputstream of
static resources. In case of resources contained in ZIP/JAR containers,
InputStreams may not fill the entire read buffer when calling
`inputStream.read(byte[])`. This was the case when using Spring Boot's
ZipInflaterInputStream - this would then not read the entire file
content and would close the response without writing the expected body
length indicated in the "Content-Length" header.

This commit makes sure that the whole resource is read.

Issue: SPR-13661
2015-11-24 21:36:22 +01:00
Juergen Hoeller
20a286b4d6 ASM ClassWriter uses application ClassLoader for its getCommonSuperClass check
Issue: SPR-13695
2015-11-24 17:38:02 +01:00
Juergen Hoeller
3aefc96593 @ManagedOperationParameter declares @Target/@Retention/@Documented/@Repeatable now
This also turns @ManagedNotification into a repeatable annotation and consistently applies findAnnotation/getRepeatableAnnotations.

Issue: SPR-13700
2015-11-24 17:37:51 +01:00
Juergen Hoeller
0524f3a474 Class identity comparisons wherever possible
Issue: SPR-12926
2015-11-24 17:37:30 +01:00
Juergen Hoeller
e8417ea6e1 SimpAnnotationMethodMessageHandler skips template variable check in case of no pattern
Issue: SPR-13704
2015-11-24 17:37:12 +01:00
Brian Clozel
9d9433a6eb Flush of underlying response in ContentCachingResponseWrapper
Prior to this commit, when adding a ShallowEtagHeaderFilter to an
application, the ServletResponse would be wrapped by a
ContentCachingResponseWrapper. When any part of the Spring
infrastructure calls `flushBuffer` on the wrapped response, the call is
delegated to the actual response, which is committed. It's not possible
to alter the response (headers, content) anymore - the ETag filter can't
act.

This change prevents the `flushBuffer` call to be delegated and only
commits the underlying response once the cached content is copied to the
actual response stream.

Issue: SPR-13717
2015-11-24 17:26:03 +01:00
Stephane Nicoll
bf1afdfdc9 Add cache tests for JCache 2015-11-24 10:15:09 +01:00
Andy Clement
29303ef591 Allow MapAccessor to be compilable in SpEL expressions
With this change the MapAccessor now extends CompilablePropertyAccessor
rather than just PropertyAccessor. This means that any expression that
ends up using the MapAccessor is now compilable for fast performance.

Issue: SPR-13638
2015-11-23 09:25:57 -08:00
Stephane Nicoll
610b5a20ea Fix test name 2015-11-23 18:22:53 +01:00
Stephane Nicoll
8dea3c5ade Remove test duplication 2015-11-23 18:19:58 +01:00
Stephane Nicoll
918e0a3888 Merge pull request #926 from kazuki43zoo/modify-tld-in-adoc
* pr/926:
  Add link in jsp tag library
2015-11-23 09:27:20 +01:00
Kazuki Shimizu
66d99f05aa Add link in jsp tag library
Closes gh-926
2015-11-23 09:26:07 +01:00
Rossen Stoyanchev
5f2d34f526 Update Javadoc
Issue: SPR-13678
2015-11-17 15:19:40 -05:00
Sam Brannen
de9c030ba1 Suppress warnings in Gradle build 2015-11-17 14:10:35 +01:00
Stephane Nicoll
d6073eaf8d Merge pull request #923 from uthark/patch-2
* pr/923:
  Remove invalid underscore
2015-11-17 09:58:49 +00:00
Oleg Atamanenko
b2c132633f Remove invalid underscore
Closes gh-923
2015-11-17 09:58:08 +00:00
Stephane Nicoll
e0f4736426 Merge pull request #922 from uthark/patch-1
* pr/922:
  Add quotes around attribute value
2015-11-17 09:57:15 +00:00