Commit Graph

10276 Commits

Author SHA1 Message Date
Juergen Hoeller
ef7cf2c650 Revised description of event source parameter
Issue: SPR-13021
2015-05-13 14:58:02 +02:00
Juergen Hoeller
02d28ae9ee Actual hasText assertion in SockJsFrame
Issue: SPR-13019
2015-05-13 14:54:36 +02:00
Brian Clozel
71c3e4e4ee Fix empty URLs handling in ResourceUrlEncodingFilter
Prior to this commit, the ResourceUrlEncodingFilter would fail with a
StringIndexOutOfBoundsException when:

* the current request has a servlet context
* the URL to encode is relative and is shorter than the context value

This change defensively checks for those lengths and delegates to the
parent implementation if necessary.

Issue: SPR-13018
2015-05-13 14:30:09 +02:00
Juergen Hoeller
02da2e85ee DataBinder allows for adding custom Formatters as alternative to PropertyEditors (including per-field formatters)
Includes a generic FormatterPropertyEditorAdapter plus Number conversion support in TypeConverterDelegate.

Issue: SPR-7773
Issue: SPR-6069
2015-05-12 22:33:18 +02:00
Juergen Hoeller
49c600b234 Resolved cyclic dependency between handler.invocation and handler.annotation
Issue: SPR-12696
2015-05-12 22:04:59 +02:00
Juergen Hoeller
e83d495cbb SimpleAliasRegistry prevents NPE for alias resolved to null
Issue: SPR-13016
2015-05-12 22:04:44 +02:00
Rossen Stoyanchev
281588d7bb Add SimpUserRegistry with multi-server support
This change introduces SimpUserRegistry exposing an API to access
information about connected users, their sessions, and subscriptions
with STOMP/WebSocket messaging. Provides are methods to access users
as well as a method to find subscriptions given a Matcher strategy.

The DefaultSimpUserRegistry implementation is also a
SmartApplicationListener which listesn for ApplicationContext events
when users connect, disconnect, subscribe, and unsubscribe to
destinations.

The MultiServerUserRegistry implementation is a composite that
aggregates user information from the local SimpUserRegistry as well
as snapshots of user  on remote application servers.

UserRegistryMessageHandler is used with MultiServerUserRegistry. It
broadcats user registry information through the broker and listens
for similar broadcasts from other servers. This must be enabled
explicitly when configuring the STOMP broker relay.

The existing UserSessionRegistry which was primiarly used internally
to resolve a user name to session id's has been deprecated and is no
longer used. If an application configures a custom UserSessionRegistr
still, it will be adapted accordingly to SimpUserRegistry but the
effect is rather limited (comparable to pre-existing functionality)
and will not work in multi-server scenarios.

Issue: SPR-12029
2015-05-12 15:29:12 -04:00
Sam Brannen
52153bd454 Document search scope in Ann*[Element]Utils
This commit improves the documentation for AnnotationUtils and
AnnotatedElementUtils by explaining that the scope of most annotation
searches is limited to finding the first such annotation, resulting in
additional such annotations being silently ignored.

Issue: SPR-13015
2015-05-12 21:06:27 +02:00
Juergen Hoeller
00147379f9 Polishing
(cherry picked from commit 9e925aa)
2015-05-11 22:22:23 +02:00
Juergen Hoeller
0d2859c99b Javadoc fixes
(cherry picked from commit a8f7539)
2015-05-11 22:01:23 +02:00
Brian Clozel
58d8a81b16 Fix maven dependency scope conflicts in MergePlugin
Spring Framework's build is using a custom MergePlugin in order to merge
a project into another one and share/override configuration and
dependencies.

Prior to this commit, two projects merged into a third one could trigger
dependency conflicts when exporting the project definition into a POM.
When trying to define the scope for a given dependency, those two
projects would compete for this with the same priority, resulting in a
Gradle exception.

One could trigger this issue by running:

    ./gradlew :spring-orm:install -x javadoc

Because `spring-orm-hibernate4` and `spring-orm-hibernate5` get merged
into `spring-orm` and both define optional/test dependencies to
spring-mvc, etc.

This commit makes sure that two projects, when defining dependency
scopes, don't use the same priority value; the MergePlugin now adds the
index of the current subproject to the priority value. So when two
projects compete for this, the one defined in last will define the
dependency scope.

Issue: SPR-13013
2015-05-11 20:42:24 +02:00
Sam Brannen
6422f7a0a1 Add TODO re: FailOnTimeout.builder() & JUnit 4.12 2015-05-11 18:13:45 +02:00
Juergen Hoeller
64a01d64c5 Polishing 2015-05-11 14:42:45 +02:00
Juergen Hoeller
549e888cd7 CustomBooleanEditor avoids potential NPE in case of allowEmpty=false
Issue: SPR-13010
2015-05-11 14:20:19 +02:00
Sam Brannen
d14e29a5c0 Polish SpringJUnit4ClassRunner and related support classes 2015-05-11 13:39:22 +02:00
Brian Clozel
7ea50238a6 Upgrade Netty to 4.0.28.Final 2015-05-11 10:51:07 +02:00
Sam Brannen
fcf75c90b1 Fix broken AnnotationAttributesTests
Issue: SPR-13007
2015-05-10 13:10:04 +02:00
Sam Brannen
92c1751d35 Merge pull request #797 from marschall/SPR-13007
* SPR-13007:
  Avoid eager formatting in pre-condition checks
2015-05-10 12:43:27 +02:00
Philippe Marschall
994d86992c Avoid eager formatting in pre-condition checks
In general, the Spring Framework aims to construct error message
strings only if an actual error has occurred. This seems to be the
common pattern in the codebase and saves both CPU and memory. However,
there are some places where eager error message formatting occurs
unnecessarily.

This commit addresses this issue in the following classes:
AdviceModeImportSelector, AnnotationAttributes, and
ReadOnlySystemAttributesMap.

The change in ReadOnlySystemAttributesMap also avoids a potential
NullPointerException.

Issue: SPR-13007
2015-05-10 12:36:01 +02:00
Sam Brannen
cf51f0c0aa Assert pre-conditions in AopTestUtils
Issue: SPR-13005
2015-05-09 21:02:40 +02:00
Sam Brannen
efe3a35da8 Introduce AOP testing utilities
This commit introduces support in the spring-test module for obtaining a
reference to the underlying target object hidden behind one or more
proxies.

Specifically this commit introduces AopTestUtils with two methods:

 - getTargetObject(Object)

 - getUltimateTargetObject(Object)

Issue: SPR-13005
2015-05-09 20:32:28 +02:00
Sam Brannen
1f54ba001b Polish Javadoc for AopUtils, Advised, & related classes 2015-05-09 20:32:27 +02:00
Juergen Hoeller
94f9a0b03a Hibernate 5 version references in javadoc
Issue: SPR-11694
2015-05-09 19:27:14 +02:00
Juergen Hoeller
cf0a916793 Consistent non-public AsyncRequestInterceptor classes
Issue: SPR-11694
2015-05-09 18:05:31 +02:00
Juergen Hoeller
f9c3910341 Support for Hibernate ORM 5.0 Beta 2
Issue: SPR-11694
2015-05-09 17:55:18 +02:00
Juergen Hoeller
1e046435ab AntPathMatcher actually throws IllegalArgumentException if patterns cannot be combined
Issue: SPR-12998
2015-05-09 15:29:33 +02:00
Juergen Hoeller
acfc95e260 Merge pull request #796 from kazuki43zoo/SPR-13000
Modify to use the ConfigurableApplicationContext in reference document
2015-05-09 12:24:16 +02:00
Kazuki Shimizu
7926dea352 Modify to use the ConfigurableApplicationContext in reference document
Issue: SPR-13000
2015-05-09 10:25:06 +09:00
Juergen Hoeller
1722fa6678 JSR-223 based StandardScriptFactory (including <lang:std> support)
This commit also completes 4.2 schema variants in spring-context.

Issue: SPR-5215
2015-05-08 23:56:08 +02:00
Sam Brannen
4bf32578b5 Rename MethodBasedEvaluationContextTest to *Tests 2015-05-08 18:44:49 +02:00
Sam Brannen
b84b0e237b Delete spring-context's dependency on spring-beans-groovy
Commit 5648fbfc31 introduced a
compile-time dependency on spring-beans-groovy in the spring-context
module which breaks the build on the CI server since the Animal Sniffer
task cannot find a JAR file for spring-beans-groovy.

This commit reverts that change so that the "sniffer" task once again
succeeds.
2015-05-08 18:33:55 +02:00
Sam Brannen
04d6afe54d Support arbitrary levels of meta-annotations in TypeDescriptor
Prior to this commit, the `getAnnotation()` method in `TypeDescriptor`
only supported a single level of meta-annotations. In other words, the
annotation hierarchy would not be exhaustively searched.

This commit provides support for arbitrary levels of meta-annotations
in `TypeDescriptor` by delegating to `AnnotationUtils.findAnnotation()`
within `TypeDescriptor.getAnnotation()`.

Issue: SPR-12793
2015-05-08 16:05:18 +02:00
Sam Brannen
5f03c97295 Polish Javadoc for MethodParameter 2015-05-08 16:03:55 +02:00
Sam Brannen
638926be4f Use JUnit ExpectedException rule in AntPathMatcherTests 2015-05-08 14:37:15 +02:00
Sam Brannen
c7cdbe126d Introduce failing test case in AntPathMatcherTests
Issue: SPR-12998
2015-05-08 14:31:21 +02:00
Sam Brannen
a80d0e87a4 Merge pull request #795 from poutsma/SPR-12975
* SPR-12975:
  Remove duplicate separators when combining paths
2015-05-08 13:54:12 +02:00
Arjen Poutsma
76beb36e4b Remove duplicate separators when combining paths
Prior to this commit, AntPathMatcher would not correctly combine a path
that ends with a separator with a path that starts with a separator.
For example, `/foo/` + `/bar` combined into `/foo//bar`.

Specifically, this commit:

 - Removes the duplicated separator in combined paths

 - Improves RequestMappingInfo's toString() representation

 - Fixes Javadoc formatting in AntPathMatcher

 - Polishes AntPathMatcherTests

 - Polishes Javadoc in AbstractRequestCondition

Issue: SPR-12975
2015-05-08 13:49:34 +02:00
Juergen Hoeller
5648fbfc31 Latest dependency updates (EhCache 2.10, Jackson 2.5.3, JasperReports 6.0.4, SLF4J 1.7.12, Tomcat 8.0.22, Undertow 1.2.5) 2015-05-07 20:29:40 +02:00
Juergen Hoeller
dbd82d128d Polishing 2015-05-07 20:18:17 +02:00
Juergen Hoeller
e87dc9f82d Test for AspectJ pointcuts with lambdas (currently marked as ignored)
Issue: SPR-11807
2015-05-07 19:59:54 +02:00
Rossen Stoyanchev
eb9eadbb50 Polish 2015-05-07 12:01:54 -04:00
Arjen Poutsma
a36319e91c Introduce Marshalling MessageConverter
This commit introduces a messaging.converter.MessageConverter that
marshals to/from XML using the abstractions provided in the OXM module.

Issue: SPR-12726
2015-05-07 12:01:54 -04:00
Rossen Stoyanchev
2b528bb643 Improve and update docs on MvcUriComponentsBuilder
Issue: SPR-12617
2015-05-07 10:43:57 -04:00
Juergen Hoeller
1cc042d4c7 Polishing 2015-05-07 16:03:15 +02:00
Juergen Hoeller
783cb2c438 StringUtils.commaDelimitedListToSet/removeDuplicateStrings preserves original order
Issue: SPR-12003
2015-05-07 16:02:48 +02:00
Juergen Hoeller
b90085500d Revert introduction of isNotEmpty aliases
Issue: SPR-12009
2015-05-07 15:54:55 +02:00
Juergen Hoeller
db80378dbe Avoid infinite loop in PatternMatchUtils
Issue: SPR-12971
2015-05-07 15:41:40 +02:00
Juergen Hoeller
2c043ec9d7 Fix for ASM issue 317555
Issue: SPR-12957
2015-05-07 15:41:24 +02:00
Rossen Stoyanchev
cb01f89a40 Upgrade to reactor 2.0.1 2015-05-07 09:33:45 -04:00
Sebastien Deleuze
5465506fdd Register automatically Jackson's JDK 8 module when available
Issue: SPR-12983
2015-05-07 14:43:06 +02:00