Commit Graph

976 Commits

Author SHA1 Message Date
Juergen Hoeller dc55da0988 Polishing 2018-08-16 13:02:27 +02:00
Juergen Hoeller 2ec8fa9cac SmartLifecycle default methods for auto-startup in default phase
Issue: SPR-17188
2018-08-16 12:08:02 +02:00
Rossen Stoyanchev 430065c31d Order property for SimpUserRegistry
Issue:SPR-17142
2018-08-13 11:56:34 +03:00
Sam Brannen cfb1ed1009 Clean up warnings and delete dead code 2018-08-12 15:55:11 +02:00
Juergen Hoeller 247ec572b2 Consistent hasAnnotation check for findMergedAnnotation lookup
Issue: SPR-16933
2018-08-08 23:54:56 +02:00
Juergen Hoeller 589b7048ec Avoid synthesizable annotation creation for @Bean/@Scope processing
Includes consistent (non-)use of AnnotationUtils/AnnotatedElementUtils.

Issue: SPR-16933
2018-08-01 11:43:28 +02:00
Juergen Hoeller 4a147d26fc Initialize pre-filled HashMaps with large enough capacity
Empty Maps are preferably initialized without capacity (not initializing them at all or lazily initializing with default capacity when needed).

Issue: SPR-17105
2018-07-30 22:07:31 +02:00
Juergen Hoeller 3881a4aded Polishing 2018-07-25 14:16:02 +02:00
Juergen Hoeller fd8e4abe5d Introduce ResolvableType.toClass() shortcut
Issue: SPR-17086
2018-07-25 14:15:19 +02:00
Juergen Hoeller 90d395edcf Polishing 2018-07-24 22:18:12 +02:00
Juergen Hoeller 02403f6a34 Polishing 2018-07-24 21:44:43 +02:00
Juergen Hoeller fac2e35f96 Refactor util.log.LogUtils into core.log.LogDelegateFactory
Issue: SPR-17012
2018-07-24 14:44:34 +02:00
Rossen Stoyanchev 7500b144ae Option to preserve publish order
Issue: SPR-13989
2018-07-23 23:24:39 -04:00
Juergen Hoeller 1b09718104 Polishing 2018-07-24 00:45:21 +02:00
Sebastien Deleuze 0def1640f2 Support single-value reactive types in @MessageMapping
This commit adds support for single-value reactive types in
@MessageMapping by converting them using ReactiveAdapterRegistry
and MonoToListenableFutureAdapter.

MonoToListenableFutureAdapter previously package private and used only
in org.springframework.messaging.tcp.reactor has been moved to
org.springframework.messaging.support and made public in order to be
used by ReactiveReturnValueHandler as well.

Issue: SPR-16634
2018-07-23 15:20:48 +02:00
Juergen Hoeller 9a43d2ec20 Revised log levels: less WARN and INFO, fine-tuned DEBUG vs TRACE
Issue: SPR-16946
2018-07-20 15:05:16 +02:00
Rossen Stoyanchev 833aee9b2d Add SimpLogging and use o.s.messaging.simp classes
Issue: SPR-17012
2018-07-18 15:33:20 -04:00
Sebastien Deleuze 3c9049d530 Leverage Jetty BOM
Issue: SPR-17058
2018-07-18 14:49:49 +02:00
Rossen Stoyanchev a40d25a760 Remove no-op classes in web-related Java config 2018-07-11 11:10:03 -04:00
Juergen Hoeller e22466e9d5 Polishing 2018-06-29 19:44:15 +02:00
Juergen Hoeller 40efcc933c Polishing 2018-06-28 14:51:33 +02:00
Phillip Webb a89e716cc7 Use tabs rather than spaces in tests
Update tests to ensure that tabs are used instead of spaces. Also
consistently apply a new line at the end of each file.

Issue: SPR-16968
2018-06-28 10:28:44 +02:00
Phillip Webb 5cedd0d5d4 Consistently use tabs rather than spaces
Update code that has accidentally used spaces instead of tabs.
Also remove all trailing whitespace.

Issue: SPR-16968
2018-06-28 10:28:44 +02:00
Phillip Webb 9de3689f63 Never use 'this.' when accessing loggers
Ensure that `this.` is never used when accessing loggers.

Issue: SPR-16968
2018-06-28 10:28:44 +02:00
Phillip Webb 0b53c1096a Always use 'this.' when accessing fields
Ensure that `this.` is used consistently when accessing class
fields.

Issue: SPR-16968
2018-06-28 10:28:44 +02:00
Phillip Webb eeebd51f57 Use consistent class design
Update all classes so that inner classes are always last. Also
ensure that utility classes are always final and have a private
constructor and make exceptions final whenever possible.

Issue: SPR-16968
2018-06-28 10:28:44 +02:00
Phillip Webb e9d1b39aff Apply consistent copyright header
Add copyright header to `package-info.java` files and fix a few
malformed headers on existing java files.

Issue: SPR-16968
2018-06-28 10:28:44 +02:00
Phillip Webb c3a17dfd47 Ensure all files end with a newline
Update all files to ensure that they always end with a new line.

Issue: SPR-16968
2018-06-28 10:28:44 +02:00
Phillip Webb e0480f75ac Fix javadoc checkstyle issues
Fix checkstyle violations for javadoc.

Issue: SPR-16968
2018-06-28 10:28:44 +02:00
Juergen Hoeller 003d643adc Consistent support for new JsonMappingException wording in Jackson 2.9
Issue: SPR-16947
2018-06-17 21:42:20 +02:00
Juergen Hoeller 9c36b53833 Upgrade to JAXB 2.3.0.1, Aalto XML 1.1, Rome 1.10 2018-06-11 22:01:51 +02:00
Rossen Stoyanchev d196cdc5cd Update docs on @SendTo and @SendToUser
1. Explain that both can be used on the same method
2. Better describe semantics for class vs method level
3. General improvements

Issue: SPR-16336
2018-06-11 12:42:55 -04:00
Rossen Stoyanchev f4bffea739 Support for @SendTo and @SendToUser for same method
Issue: SPR-16891
2018-06-11 12:42:55 -04:00
Rossen Stoyanchev 7a70f7c5d8 Polish @SendTo test 2018-06-11 12:42:55 -04:00
Brian Clozel 417354da8a Remove dependency management noise from POMs
Prior to this commit, the generated POMs for Spring Framework modules
would contain unneeded/harmful information from the Spring Framework
build:

1. The BOM imports applied to each module by the dependency
management plugin, for example for Netty or Reactor Netty.
Spring should not export that opinion to its POMs.

2. The exclusion of "org.slf4:jcl-over-slf4j" from *all* dependencies,
which made the POMs much larger than necessary and suggested to
developers that they should exclude it as well when using all those
listed dependencies. In fact, only Apache Tiles currently brings that
transitively.

This commit removes that information from the POMs.
The dependencyManagement Gradle plugin is disabled for POM generation
and we manually resolve the dependency versions during the generation
phase.
The Gradle build is streamlined to exclude "org.slf4:jcl-over-slf4j"
only when necessary.

Issue: SPR-16893
2018-06-11 15:57:54 +02:00
Juergen Hoeller 646d7f9e57 Unit tests for @MessageExceptionHandler cause and error resolution
Issue: SPR-16912
2018-06-11 13:44:43 +02:00
Juergen Hoeller 0c8cfa05b5 AbstractMethodMessageHandler processes Error as MessageHandlingException
Issue: SPR-16912
2018-06-10 23:59:07 +02:00
Juergen Hoeller 25559b9e44 Polishing 2018-06-06 21:31:24 +02:00
Rossen Stoyanchev 72b1d4c648 Remove explicit references to Reactor Netty version
...now that 0.8 is also listed in the Reactor bom.

Issue: SPR-16387
2018-06-06 14:35:54 -04:00
Rossen Stoyanchev a3216432b5 Polish
Issue: SPR-16387
2018-05-31 15:38:30 -04:00
Violeta Georgieva ffbc75ae47 Upgrade to Reactor Netty 0.8
Issue: SPR-16387
2018-05-31 15:37:39 -04:00
Juergen Hoeller 836a09d5c0 Upgrade to Woodstox 5.1, XMLUnit 2.6, Gson 2.8.5 2018-05-25 00:18:06 +02:00
Rossen Stoyanchev fbf25c536d ChannelInterceptor default methods + deprecate adapter 2018-05-23 21:48:19 -04:00
Rossen Stoyanchev e043481a26 STOMP client supports setting accept-version
Issue: SPR-16844
2018-05-18 21:32:46 -04:00
Rossen Stoyanchev 37b0ed9fcb Improve TCP connection info logging.
After the recent changes to expose configuring TcpOperations, it no
longer makes sense to automatically log the relayHost/Port since that's
mutually exclusive with a custom TcpOperations.

Instead we delegate to TcpOperations.toString().

Issue: SPR-16801
2018-05-16 11:40:51 -04:00
Juergen Hoeller 53aa9cc4cd Upgrade to Servlet API 4.0.1 (aligned with Tomcat 9 and Undertow 2)
Issue: SPR-16470
2018-05-07 14:17:28 +02:00
Johnny Lim fb898e1727 Remove inconsistent spaces 2018-05-05 11:07:35 +02:00
Rossen Stoyanchev f7029ffca6 Uncomment ignored test after Reactor Core fix 2018-05-02 15:44:24 -04:00
Rossen Stoyanchev 4c021d04ce @Ignore failing test from reactor-core regression 2018-05-02 07:23:46 -04:00
Rossen Stoyanchev ff2228fdaf Selector header name is exposed for configuration
Issue: SPR-16732
2018-04-16 23:56:30 -04:00
Juergen Hoeller 0754833b37 Local XMLUnit dependency declarations with consistent version 2.5.1 2018-04-14 21:03:20 +02:00
Rossen Stoyanchev cca78e42f1 Polish 2018-04-11 21:52:59 -04:00
Carter Kozak e2febbdd8c Remove unnecessary iterator allocation in type handlers
HandlerMethodReturnValueHandlerComposite and
AbstractMethodMessageHandler iterate using index over collections
implementing RandomAccess to avoid unnecessary iterators.
2018-04-11 21:39:32 -04:00
igor-suhorukov 4aae6a6dda Use Map.forEach instead of manual Map.Entry iteration wherever possible SPR-16646 2018-03-28 01:09:03 +02:00
Juergen Hoeller e3d0ef6015 Use Map.forEach instead of manual Map.Entry iteration wherever possible
Issue: SPR-16646
2018-03-27 00:38:32 +02:00
Juergen Hoeller f00afe3247 Use (Concurrent)Map.computeIfAbsent for lazy nested collection creation 2018-03-23 17:36:23 +01:00
Rossen Stoyanchev 1b83f129a2 ReactorNettyTcpClient uses elastic pool
Issue: SPR-16626
2018-03-22 20:22:07 -04:00
Juergen Hoeller 51c57d77d9 SimpleEvaluationContext with dedicated factory methods for common cases
Aligned with DataBindingPropertyAccessor and shown in ref doc examples.

Issue: SPR-16588
2018-03-22 18:09:27 +01:00
Christoph Dreis d3a0a8e007 Use Collection.removeIf() where possible (#1747)
Use Collection.removeIf() where possible

Issue: SPR-16622
2018-03-22 11:36:11 +01:00
Rossen Stoyanchev e0de9126ed Re-use EvaluationContext in DefaultSubscriptionRegistry
Rather than create a new EvaluationContext instance per evaluation, we
now create a statically shared instance, without the root object in it,
and re-use it for all evalutations.
2018-03-21 23:29:58 -04:00
Rossen Stoyanchev 88a17a4b10 Reactor2TcpClient constructor with address supplier
Issue: SPR-12452
2018-03-20 12:21:45 -04:00
Juergen Hoeller d4a8f76bf9 Consistent volatile access to running flag in Lifecycle implementations
Issue: SPR-16488
2018-03-15 15:17:55 +01:00
igor-suhorukov 407ecf7334 to get rid of "magic" time constants 2018-03-08 20:37:48 +01:00
Juergen Hoeller 139dc1d373 Polishing (collapsed if checks, consistent downcasts, refined javadoc) 2018-03-08 18:11:57 +01:00
Juergen Hoeller 9962df6527 Polishing 2018-02-28 00:09:15 +01:00
Rossen Stoyanchev 356ef5199e Polish
Issue: SPR-16519
2018-02-27 15:38:34 -05:00
Mariusz Jasinski 184ed6da57 Overloaded acknowledge method with StompHeaders
Issue: SPR-16519
2018-02-27 15:38:10 -05:00
Juergen Hoeller 2a379e099c Polishing 2018-02-25 21:24:38 +01:00
igor-suhorukov 49fd724d8f Polish: String function use should be optimized for single characters 2018-02-25 20:48:47 +01:00
Juergen Hoeller d7cab23e6d Consistent use of StringUtils.toStringArray
(cherry picked from commit 6d11b40)
2018-02-16 20:49:17 +01:00
Juergen Hoeller 8d3264f680 Prefer List.sort(Comparator) over Collections.sort(List, Comparator) 2018-02-16 10:23:18 +01:00
Juergen Hoeller 3b810f3544 Consistent Class array vs vararg declarations (and related polishing) 2018-02-14 14:44:00 +01:00
Juergen Hoeller d3cee45f30 Polishing 2018-02-13 13:15:29 +01:00
Vladimir Sitnikov 659f13be1c Avoid creating message arguments to Assert.isABC calls
See 67f184293b
2018-02-13 12:31:49 +01:00
Rossen Stoyanchev 0585fb3999 Polish 2018-02-12 22:04:53 -05:00
Rossen Stoyanchev 4ee09c89b5 Fix regression in MappingJackson2MessageConverter
As of 4.3.13 MappingJackson2MessageConverter uses the MethodParameter
hint to obtain generic type information but it needs to be careful, and
nest one level, if the target parameter type has a Message wrapper.

Issue: SPR-16486
2018-02-12 21:30:26 -05:00
igor-suhorukov 9a6fbf59c5 Polish: follow name convention - make immutable fields final 2018-02-10 12:09:19 +01:00
Stephane Nicoll 991eb4858e Update copyright header 2018-02-09 10:16:58 +01:00
igor-suhorukov 4c888d0f32 Polish
Closes gh-1669
2018-02-09 10:10:05 +01:00
Juergen Hoeller 5c813a366b Consistent use of @throws instead of @exception 2018-02-05 22:51:51 +01:00
Rossen Stoyanchev 0fb31c5e36 Refine "." separator support for STOMP messaging
After this commit DefaultUserDestinationResolves no longer looks at
whether AntPathMatcher is configured with "." as separator and rather
expects to be explicitly told whether to keep the leading slash in
translated destinations which actually depends on what the message
broker supports (e.g. RabbitMQ "/", Artemis ".") or how it is
configured (simple broker could be either way).

There is also a minor improvement in SimpMessagingTemplate to ensure
user destinations are correctly formed based on what the
DefaultUserDestinationResolver expects. When using "." as separtor it
allows sending messages to "queue.q1" rather than "/queue.q1".

Issue: SPR-16275
2018-01-19 21:02:43 -05:00
Rossen Stoyanchev 17f9b61249 Polish MessageBrokerConfigurationTests 2018-01-19 21:02:43 -05:00
Rossen Stoyanchev 583201b02c MappingJackson2MessageConverter uses generic type
Issue: SPR-16252
2017-12-12 22:32:33 -05:00
Rossen Stoyanchev f736b665bd Fix compile issue from previous commit 2017-12-11 16:37:11 -05:00
Rémi Alvergnat 76dcde9e31 Fix Stomp Broker Relay ignoring destination prefixes in some cases
Issue: SPR-16265
2017-12-11 13:25:29 -08:00
Christoph Dreis f4e9fb52a8 Reduce access on user in SimpleBrokerMessageHandler.handleMessageInternal
Issue: SPR-16264
2017-12-05 11:18:02 +01:00
Christoph Dreis 9fab208fdd Reduce access on headers for STOMP messaging
Issue: SPR-16165
2017-11-06 20:19:00 +01:00
Juergen Hoeller 9b7af8b5aa Polishing 2017-11-05 21:07:26 +01:00
Rossen Stoyanchev abe4420006 Improve ReactorNettyTcpClient shutdown logic
This commit takes care of the TODOs in ReactorNettyTcpClient by taking
advantage of improvements in Reactor Netty.

Issue: SPR-16145
2017-11-01 16:34:32 -04:00
Rossen Stoyanchev b35b50bef1 Polish 2017-11-01 09:21:36 -04:00
Rossen Stoyanchev 64bc9b4311 Do match message type
SimpMessageTypeMessageCondition was lenient in matching the message
type, essentially matching on any non-null message type with an exact
match given a preference only in comparing mulitple matches.

This commit modifies matching logic to look for an exact match.

Issue: SPR-16109
2017-11-01 09:21:36 -04:00
Juergen Hoeller 9bab7a2708 Upgrade to Java Activation Framework 1.2 for test runtime
Includes upgrade to Hibernate Validator 6.0.4 (where applicable)

Issue: SPR-16115
2017-10-25 19:18:10 +02:00
Rossen Stoyanchev 1cc5afe24b Fix lines over 120 characters
https://github.com/spring-projects/spring-framework/wiki/Spring-Framework-Code-Style#line-wrapping
2017-10-20 16:42:26 -04:00
Tom Fitzhenry 1fe3e0cd06 Fix typo in exception message: quite -> quiet
Closes gh-1547
2017-10-03 08:24:34 +02:00
Juergen Hoeller efce7902c4 Polishing 2017-09-27 01:34:11 +02:00
Juergen Hoeller e2882fe1db Build against EE 8 API level wherever possible
Upgrade to JAXB 2.3, JAX-WS 2.3, Annotations 1.3.1, Interceptor 1.2.1.
Also includes Log4J 2.9.1 and Asciidoctor 1.5.6.
2017-09-24 17:18:21 +02:00
Juergen Hoeller 9190b76ab9 Latest dependency updates (POI 3.17, Rome 1.8, EhCache 3.4, Caffeine 2.5.6, RxJava 2.1.4, Tomcat 8.5.21, JRuby 9.1.13, Rhino 1.7.7.2) 2017-09-23 11:28:19 +02:00
Juergen Hoeller 7ae59d0c2a Nullability refinements on private and static methods
Based on IntelliJ IDEA 2017.3 introspection results.

Issue: SPR-15756
2017-09-22 18:22:14 +02:00
Juergen Hoeller ac9cfefaff TaskExecutorRegistration does not apply its default settings to a user-provided executor
Also, ChannelRegistration.setInterceptors is deprecated now: in favor of a fluently named interceptors(...) method which is documented to add the given interceptors to the channel's current list.

Issue: SPR-15962
Issue: SPR-15976
2017-09-19 13:47:43 +02:00
Juergen Hoeller 3bd2154046 Polishing 2017-09-19 00:02:40 +02:00
Sebastien Deleuze 1bc93e3d0f Revisit nullability annotations
This commit introduces the following changes.

1) It adds a new Spring @NonNull annotation which allows to apply
@NonNullApi semantic on a specific element, like @Nullable does.
Combined with @Nullable, it allows partial null-safety support when
package granularity is too broad.

2) @Nullable and @NonNull can apply to ElementType.TYPE_USE in order
to be used on generic type arguments (SPR-15942).

3) Annotations does not apply to ElementType.TYPE_PARAMETER anymore
since it is not supported yet (applicability for such use case is
controversial and need to be discussed).

4) @NonNullApi does not apply to ElementType.FIELD anymore since in a
lot of use cases (private, protected) it is not part for the public API
+ its usage should remain opt-in. A dedicated @NonNullFields annotation
has been added in order to set fields default to non-nullable.

5) Updated Javadoc and reference documentation.

Issue: SPR-15756
2017-09-15 13:26:41 +02:00
Juergen Hoeller aa4ae7a750 Heart-beat log message potentially without session id
Issue: SPR-15937
2017-09-08 16:55:27 +02:00
Rossen Stoyanchev 39cefb5bd7 One more instance of modified method name in Mono 2017-09-05 13:59:45 -04:00
Juergen Hoeller 97ded1dcc7 Polishing 2017-09-01 14:05:35 +02:00
Juergen Hoeller 2b44e6e21c Strong references to mapped exception handler methods
Issue: SPR-15907
2017-08-29 15:07:23 +02:00
Brian Clozel 397fd24849 Revert "Leverage Kotlin plugin dependency management"
This reverts commit 3e2f6c848a.
2017-08-22 21:29:39 +02:00
Sebastien Deleuze 3e2f6c848a Leverage Kotlin plugin dependency management 2017-08-22 17:35:57 +02:00
Brian Clozel cc3d7d2d48 Apply dependency management to selected modules
This commit applies the Dependency Management Plugin to modules that
require it; right now Spring Framework is importing BOMs for Netty and
Reactor dependencies only.

Instead of applying those BOMs to all modules, they're applied only
where they're needed.

Issue: SPR-15885
2017-08-21 14:42:03 +02:00
Brian Clozel 2eeb428e95 Move modules to independent build files
The main `build.gradle` file contains now only the common build
infrastructure; all module-specific build configurations have
been moved to their own build file.

Issue: SPR-15885
2017-08-21 14:41:55 +02:00
Juergen Hoeller fac1f236c3 Upgrade to Servlet API 4.0 for MVC and merge EhCache 3 tests into spring-context-support
Includes general streamlining of dependency declarations with reduced version variables, direct use of EclipseLink 2.7 and its implicit JPA 2.2 dependency in spring-orm, mixed use of Hibernate 5.2.10 and 5.1.10 for integration tests, as well as an upgrade to Jetty 9.4.7 RC0 and a downgrade to Groovy 2.4.12 (since Groovy 2.5 won't be final in time for Spring Framework 5.0).

Issue: SPR-15879
Issue: SPR-15880
2017-08-21 01:34:11 +02:00
Stephane Nicoll f6e7fef236 Polish 2017-08-19 10:50:41 +02:00
Juergen Hoeller b94302b5bd Enforce non-null value from getBean and at injection points
Bean-derived null values may still get passed into bean properties and injection points but only if those are declared as non-required. Note that getBean will never return null; a manual bean.equals(null) / "null".equals(bean.toString()) check identifies expected null values now.  This will only ever happen with custom FactoryBeans or factory methods returning null - and since all common cases are handled by autowiring or bean property values in bean definitions, there should be no need to ever manually check for such a null value received from getBean.

Issue: SPR-15829
2017-08-18 00:11:35 +02:00
Sebastien Deleuze 73cf07e9a4 Fix overridden methods nullability
Issue: SPR-15869
2017-08-17 15:02:59 +02:00
Juergen Hoeller adeb521ce4 Polishing 2017-08-08 17:27:28 +02:00
Sebastien Deleuze ed6fe2b723 Upgrade to Kotlin 1.1.4-eap-33
Issue: SPR-15814
2017-07-24 17:29:02 +02:00
Juergen Hoeller 46eba3dbfa Nullability fine-tuning around declaration inconsistencies
Issue: SPR-15720
Issue: SPR-15792
2017-07-19 22:22:20 +02:00
Juergen Hoeller 9fc4fb10b0 Nullability fine-tuning around bean properties
Issue: SPR-15720
Issue: SPR-15792
2017-07-19 11:43:58 +02:00
Sebastien Deleuze fb4ddb0746 Make getters and setters null-safety consistent
This commit ensure that null-safety is consistent between
getters and setters in order to be able to provide beans
with properties with a common type when type safety is
taken in account like with Kotlin.

It also add a few missing property level @Nullable
annotations.

Issue: SPR-15792
2017-07-19 09:07:56 +02:00
Rossen Stoyanchev 095cc2283e Replace constant from QueueSupplier with local one 2017-07-13 22:07:19 +02:00
Juergen Hoeller 5f767a86f5 Always invoke Jackson serialization with AtomicReference cause
Issue: SPR-15760
2017-07-12 19:13:03 +02:00
Alan Hong fc7e7a3304 Fix typo
closes gh-1465
2017-07-12 17:12:34 +02:00
Juergen Hoeller 122ee3096c Efficient log checks in STOMP encoder/decoder 2017-07-10 20:44:51 +02:00
Violeta Georgieva fd1859c34c Adapt to the changes in Reactor Netty ClientOptions
ClientOptions/HttpClientOptions are now created via Builder
2017-07-04 15:26:29 +02:00
Juergen Hoeller cc74a2891a @Nullable all the way: null-safety at field level
This commits extends nullability declarations to the field level, formalizing the interaction between methods and their underlying fields and therefore avoiding any nullability mismatch.

Issue: SPR-15720
2017-06-30 01:54:16 +02:00
Juergen Hoeller 7e251274ee Consistent nullability of headers Map and MessagePostProcessor
Issue: SPR-15670
2017-06-15 22:45:06 +02:00
Stephane Nicoll 1ab678a2a3 Polish "Refactor iterator of Map with Java8's Map.forEach"
Closes gh-1459
2017-06-13 16:06:20 +02:00
diguage 1ef5f61ab2 Refactor iterator of Map with Java8's Map.forEach
See gh-1459
2017-06-13 16:06:20 +02:00
Juergen Hoeller 7dd8dc62a5 Fixes for ignored tests after last week's nullability commit
Issue: SPR-15540
2017-06-13 11:37:58 +02:00
Stephane Nicoll 58242f2249 Polish 2017-06-13 10:13:14 +02:00
Stephane Nicoll fc64b8040f Polish "Replace relevant code with lambda"
Closes gh-1454
2017-06-13 09:42:20 +02:00
diguage 4b1478d830 Replace relevant code with lambda
See gh-1454
2017-06-13 08:55:38 +02:00
Arjen Poutsma 9bf82dc18f Add addAll(MultiValueMap)
This commit introduces a new method for MultiValueMap: addAll, which
adds all values of a given map (cf putAll, which replaces existing
values).
2017-06-12 14:12:12 +02:00
diguage c1d44d9a34 Use the diamond syntax
Closes gh-1450
2017-06-12 09:19:06 +02:00
Rob Winch b1345014b9 Update to Reactor Bismuth-M2
Issue: SPR-15646
2017-06-09 09:49:31 -05:00
Juergen Hoeller fd53d2a51a Consistent use of @Nullable in spring-test
This commit also removes nullability from two common spots: ResolvableType.getType() and TargetSource.getTarget(), both of which are never effectively null with any regular implementation. For such scenarios, a non-null empty type/target is the cleaner contract.

Issue: SPR-15540
2017-06-08 22:52:59 +02:00
Juergen Hoeller 7eaedf2916 Debug-level log entry for any Jackson exception during canConvert
Issue: SPR-15582
2017-06-07 18:33:19 +02:00
Juergen Hoeller f813712f5b Consistent use of @Nullable across the codebase (even for internals)
Beyond just formally declaring the current behavior, this revision actually enforces non-null behavior in selected signatures now, not tolerating null values anymore when not explicitly documented. It also changes some utility methods with historic null-in/null-out tolerance towards enforced non-null return values, making them a proper citizen in non-null assignments.

Some issues are left as to-do: in particular a thorough revision of spring-test, and a few tests with unclear failures (ignored as "TODO: NULLABLE") to be sorted out in a follow-up commit.

Issue: SPR-15540
2017-06-07 14:19:15 +02:00
Rossen Stoyanchev 4a3f6e4546 Polish 2017-05-31 22:43:25 -04:00
Christoph Dreis 0ef1623643 Optimize DefaultUserDestinationResolver.resolveDestination()
Issue: SPR-15602
2017-05-31 22:37:42 -04:00
Sebastien Deleuze 1f28825f9d Add more @Nullable parameters based on null usage
Issue: SPR-15540
2017-05-31 21:42:23 +02:00
Gary Russell f9b319d3ba Revert Incorrect MessagingTemplate Change
The change to "optimize" the template by not rebuilding the reply
message when the original header channels was null was incorrect.

We need to null out those headers if they were originally null.

Issue: SPR-15991
2017-05-31 15:12:46 -04:00
Sebastien Deleuze b47d713e14 Add missing @Nullable annotations on parameters
Issue: SPR-15540
2017-05-31 16:56:08 +02:00
Gary Russell e06c4d5116 Timeout Overrides in Messaging Templates
Provide a mechanism to override the configured send and receive
timeouts in the GenericMessagingTemplate.

- overload `doReceive()` to take a receive timeout argument
- for `sendAndReceive()` methods examine message headers for these
  timeout values
  - remove headers to avoid propagation
  - avoid the unconditional rebuild of the reply message if the
    original headers weren't present
- also remove headers from simple `send()` operations
- change javadocs for the setters to indicate they are now defaults
- add properties to allow the user to override the header names used
- change `TemporaryReplyChannel` to use `send` arg and change to static
  - add package-protected ctor to avoid the compiler creating a
    synthetic constructor for access

Issue: SPR-15591
2017-05-30 17:03:46 -04:00
Sebastien Deleuze 87598f48e4 Introduce null-safety of Spring Framework API
This commit introduces 2 new @Nullable and @NonNullApi
annotations that leverage JSR 305 (dormant but available via
Findbugs jsr305 dependency and already used by libraries
like OkHttp) meta-annotations to specify explicitly
null-safety of Spring Framework parameters and return values.

In order to avoid adding too much annotations, the
default is set at package level with @NonNullApi and
@Nullable annotations are added when needed at parameter or
return value level. These annotations are intended to be used
on Spring Framework itself but also by other Spring projects.

@Nullable annotations have been introduced based on Javadoc
and search of patterns like "return null;". It is expected that
nullability of Spring Framework API will be polished with
complementary commits.

In practice, this will make the whole Spring Framework API
null-safe for Kotlin projects (when KT-10942 will be fixed)
since Kotlin will be able to leverage these annotations to
know if a parameter or a return value is nullable or not. But
this is also useful for Java developers as well since IntelliJ
IDEA, for example, also understands these annotations to
generate warnings when unsafe nullable usages are detected.

Issue: SPR-15540
2017-05-27 08:57:01 +02:00
Rossen Stoyanchev b6e252495a Protect against NPE in DefaultSubscriptionRegistry
Follow-up fix on the recent commit:
https://github.com/spring-projects/spring-framework/commit/44c31a

Issue: SPR-15543
2017-05-22 16:08:34 -04:00
Bao Tran 44c31a6aad Fix duplicate STOMP subscription id issue
Issue: SPR-15543
2017-05-19 15:20:14 -04:00
Juergen Hoeller 9e3f4ccce9 Merge pull request #1394 from alexander-riss/keySet
Fix inefficient use of keySet operators in messaging classes

Issue: SPR-15553
2017-05-16 11:22:22 +02:00
Alexander Riss e49a5d8424 fix inefficient use of keySet operators in messaging classes
issue: SPR-15553
2017-05-16 10:41:22 +02:00
Juergen Hoeller e93e49f268 ErrorMessage.toString() includes original message at top level
Issue: SPR-15459
2017-04-19 20:50:20 +02:00
Gary Russell e677342628 Add originalMessage to ErrorMessage
Issue: SPR-15459
2017-04-19 14:04:25 -04:00
Sebastien Deleuze 4d9144132e Upgrade to Reactor Core 3.1
Issue: SPR-15318
2017-04-11 18:13:04 +02:00
Juergen Hoeller 5986f881d0 HandlerMethod evaluates ResponseStatus annotation for early caching
Issue: SPR-15227
2017-04-08 15:56:05 +02:00
Brian Clozel b799013567 Update to Reactor Aluminium SNAPSHOT
Currently the BOM versions are:

* reactor-core 3.0.6.BUILD-SNAPSHOT
* reactor-netty 0.6.2.BUILD-SNAPSHOT

This commit fixes as well a few deprecations in reactor-core.
2017-03-10 15:20:40 +01:00
stonio 7d062df992 Use String#isEmpty()
Closes gh-1335
2017-02-22 11:55:17 +01:00
Juergen Hoeller d2cc97af47 Polishing 2017-02-21 22:41:40 +01:00
Rossen Stoyanchev f219680d42 Add equals/hashcode for STOMP Subscription
Issue: SPR-15229
2017-02-21 15:05:06 -05:00
Stephane Maldini ba97432043 prepare for reactor-netty 0.6.1.RELEASE 2017-02-21 16:00:19 +00:00
Juergen Hoeller 370e3d683a Polishing 2017-02-20 23:00:12 +01:00
Juergen Hoeller 74bdcd8ed4 MutableMessageHeaders serializes itself as regular MessageHeaders
Issue: SPR-15262
2017-02-17 20:59:17 +01:00
Juergen Hoeller 50d93d3794 Consistently support CompletionStage next to CompletableFuture
Issue: SPR-15258
2017-02-15 23:16:11 +01:00
Rossen Stoyanchev 60517b23e2 StompSession supports custom headers for UNSUBSCRIBE
Issue: SPR-15131
2017-01-31 17:55:53 -05:00
Juergen Hoeller 9b26fcd7d2 Refined assertion messages
Issue: SPR-15196
2017-01-31 15:56:39 +01:00
Juergen Hoeller 1b2dc3638f Revisit Assert to avoid single-arg assert methods (with refined messages)
Issue: SPR-15196
2017-01-30 22:15:55 +01:00
Arjen Poutsma 69c16f3821 Add headers in InterceptingClientHttpRequest
This commit *adds* the "intercepted" headers to the ClientHttpRequest,
as opposed to replacing them, which is what happened before this commit.

Issue: SPR-15166
2017-01-30 14:18:50 +01:00
Juergen Hoeller 8038fb9c8b HandlerMethod pre-resolves parameter types at construction time
Issue: SPR-15186
2017-01-25 11:09:43 +01:00
Juergen Hoeller 12973ac702 Polishing 2017-01-24 00:12:53 +01:00
Juergen Hoeller f095aa20eb Polishing 2017-01-23 21:28:40 +01:00
Juergen Hoeller e9db4d6f96 Proper resolution of Optional.empty() for header arguments
Issue: SPR-15151
2017-01-17 10:46:37 +01:00
Juergen Hoeller 62e530ec94 Resolve minor 4.3.x deprecations in master
Issue: SPR-15139
2017-01-16 21:43:12 +01:00
Juergen Hoeller 047786acef Revised InvocableHandlerMethod exception messages (controller vs endpoint vs handler)
Introduces dedicated MethodArgumentResolutionException for spring-messaging invocations.

Issue: SPR-15139
2017-01-16 21:14:46 +01:00
Juergen Hoeller 7c05b427a7 MimeTypeUtils constants cleanup: removed web media types
Issue: SPR-15137
2017-01-12 23:30:57 +01:00
Juergen Hoeller 743ce2cda6 Polishing 2017-01-12 23:30:38 +01:00
Sam Brannen 9ed66bf2eb Clean up warnings across code base 2017-01-07 01:54:38 +01:00
Gary Russell 80bc8fc596 Implement MessagingException.toString()
Issue: SPR-15091
Closes gh-1284
2017-01-05 10:25:04 +01:00
Rossen Stoyanchev e62b104e03 Resource cleanup on shutdown in ReactorNettyTcpClient 2016-12-28 21:37:12 -05:00
Rossen Stoyanchev 698c885e06 Reconnect failures delegated to TcpConnectionHandler
When connecting with a ReconnectStrategy we can only report the outcome
of the first connect to the ListenableFuture<Void> return value.

Failures for all subsequent attempts to reconnect however must be
channeled to TcpConnectHandler#afterConnectFailure which is used in
the STOMP broker relay for example to publish
BroadcastAvailability(true/false) events.
2016-12-28 21:37:07 -05:00
Rossen Stoyanchev ea274ebc0a Fix decoding issue in Reactor TcpClient
When decoding STOMP messages unread portions of a given input ByteBuf
must be kept until more input is received and the next complete STOMP
frame can be parsed.

In Reactor Net 2.x this was handled for us through the "remainder"
field in NettyChannelHandlerBridge. The Reactor Netty 0.6 upgrade
however applied only a simple map operator on the input ByteBuf
after which the buffer is relased.

This commit replaces the use of a simple map operator for decoding
and installs a ByteToMessageDecoder in the Netty channel pipeline
which has a built-in ability to preserve and merge unread input into
subsequent input buffers.
2016-12-28 21:36:37 -05:00
Rossen Stoyanchev fdf88c9795 Workaround for onReadIdle issue in Reactor TcpClient
https://github.com/reactor/reactor-netty/issues/22
2016-12-28 21:36:37 -05:00
Rossen Stoyanchev 2a3e01399a Polish ReactorNettyTcpClient 2016-12-28 21:36:37 -05:00
Juergen Hoeller 5c48daa8eb Remove unused Log object from MessageHeaderAccessor
Issue: SPR-15045
2016-12-22 23:34:19 +01:00
Juergen Hoeller ae62341fa3 Avoid deprecated Scheduler.shutdown() in favor of Scheduler.dispose() 2016-12-22 22:35:54 +01:00
Juergen Hoeller 4c005e6336 ResolvableType-based matching respects generic factory method return type
Includes consistent use of ResolvableType.resolve() wherever applicable.

Issue: SPR-15011
2016-12-17 23:10:48 +01:00
Stephane Maldini 2802926c1d update STOMP support to reactor-netty 0.6 2016-12-13 17:31:09 +00:00
Stephane Maldini 70bab23609 update STOMP support to reactor-netty 0.6 2016-12-13 17:29:43 +00:00
Rossen Stoyanchev b3fa1b40a0 Synchronized updates of STOMP header key cache
Issue: SPR-14901
2016-12-08 11:13:57 -05:00
Christoph Dreis 9b76dc2ab4 SPR-14901 Allow customization of STOMP message header encoding
Fixes SPR-14901
2016-12-08 11:13:56 -05:00
Sergei Ustimenko e4ed1f6ffd ChannelFutureMono renamed to FutureMono
In the latest reactor-netty there is renaming
of ChannelFutureMono class to FutureMono. Thus
build fails on the latest master.
2016-12-03 18:56:42 +01:00
Juergen Hoeller f6fc0a86b3 Polishing
(cherry picked from commit 0028b29)
2016-12-01 20:11:47 +01:00
Rossen Stoyanchev b874692452 Simplify ReactorNettyTcpClient input
Create a ReactorNettyCodec to hold the decoding and encoding function
and consumer along with a package-private sub-class that delegates to
StompDecoder and StompEncoder.

Issue: SPR-14531
2016-11-30 21:17:04 -05:00
Rossen Stoyanchev 85c93f5d67 Polish Reactor Netty TCP client support 2016-11-30 21:17:04 -05:00
Stephane Maldini 870f61fd8e update STOMP support to reactor-netty 2016-11-30 21:17:04 -05:00
Juergen Hoeller 5458a427a1 Polishing 2016-11-30 22:31:47 +01:00
Rossen Stoyanchev a203b74d20 PayloadArgumentResolver has useDefaultResolution flag
Issue: SPR-14937
2016-11-28 17:00:22 -05:00
Sebastien Deleuze a143b57d4b Polish Kotlin nullable support
This commit polishes Kotlin nullable support by reusing
MethodParameter#isOptional() instead of adding a new
MethodParameter#isNullable() method, adds
Kotlin tests and introduces Spring Web Reactive
support.

Issue: SPR-14165
2016-11-24 18:28:50 +01:00
Raman Gupta fada91e538 Treat Kotlin nullable as non-required
Where `isOptional` is used, also check for `isNullable` i.e.
values are not considered required if they are Kotlin nullables:
- spring-messaging: named value method arguments
- spring-web: named value method arguments
- spring-webmvc: request parts

This means that Kotlin client code no longer has to explicity specify
"required=false" for Kotlin nullables -- this information is inferred
automatically by the framework.

Issue: SPR-14165
2016-11-24 17:18:55 +01:00
Juergen Hoeller 80931b211c Shared DefaultConversionService instance for simple fallback purposes
Issue: SPR-14948
2016-11-24 15:29:17 +01:00
Juergen Hoeller 9bf4d7cf4e Polishing 2016-11-22 14:57:00 +01:00
Christoph Dreis a929e9ccaa Implement allocation-friendly method to get user count in SimpUserRegistry
SPR-14930
2016-11-21 21:02:10 +01:00
Juergen Hoeller ac774cdcef Avoid deprecated Mockito methods
Issue: SPR-14880
2016-11-04 12:24:46 +01:00
Juergen Hoeller 84d3808b3b Upgrade to Mockito 2.2
Issue: SPR-14880
2016-11-03 22:53:35 +01:00
Juergen Hoeller dc080cb1be Revised NoSuchBeanDefinitionException message and ResolvableType handling
Includes consistent quoting of qualified type names in related classes.

Issue: SPR-14831
2016-10-28 23:39:05 +02:00
Juergen Hoeller dbaafdd04e MessageChannel declares send(Message) as default method
Issue: SPR-14854
2016-10-28 15:11:03 +02:00
Juergen Hoeller 3726c6f18d Polishing 2016-10-21 12:26:27 +02:00
Juergen Hoeller eafaaa5cb8 Polishing 2016-10-12 17:11:04 +02:00
Juergen Hoeller ffc781b163 Explicit calls on Buffer base type (for compatibility with covariant return type on JDK 9's ByteBuffer)
Issue: SPR-14645
2016-10-05 00:10:06 +02:00
Juergen Hoeller fb7ae010c8 Avoid unnecessary generics on emptyMap/Set/List 2016-09-26 18:04:49 +02:00
Juergen Hoeller a6b0b6e279 Efficient STOMP content-length header check
Issue: SPR-14747
2016-09-26 17:25:21 +02:00
Juergen Hoeller c64f39943f Polishing 2016-09-26 17:20:30 +02:00
Juergen Hoeller e188b4428e Polishing 2016-09-25 21:00:07 +02:00
Christoph Dreis 774e4c3dc1 Improve performance of StompEncoder
Fixes SPR-14747
2016-09-25 19:09:01 +02:00
Rossen Stoyanchev 99c7917124 Reset connection before delegating to handler
Resetting the connection first before invoking a failure callback on
the application handler ensures that any checks to isConnected will
return false.

Issue: SPR-14721
2016-09-19 09:04:23 -04:00
Juergen Hoeller 6dc1898dbb Timeout exceptions as RuntimeExceptions
Issue: SPR-14669
2016-09-15 08:54:17 +02:00
Rossen Stoyanchev 3bc1121b9d Check both connection and connected flag
Issue: SPR-14703
2016-09-14 17:19:49 -04:00
Juergen Hoeller f592599349 Polishing
(cherry picked from commit 54db496)
2016-09-13 23:48:41 +02:00
Juergen Hoeller 03609c1518 Consistent comma splitting without regex overhead
Issue: SPR-14635
2016-08-30 23:56:58 +02:00
Rossen Stoyanchev 8b4f60b8e5 Support receipt on DISCONNECT with simple broker
Issue: SPR-14568
2016-08-29 18:31:19 -04:00
Juergen Hoeller 899ebd8ee2 Avoid collection lookups in StompCommand
Issue: SPR-14636
2016-08-29 11:54:21 +02:00
Juergen Hoeller dfdfd72a3e Polishing
(cherry picked from commit 430180a)
2016-08-26 18:59:40 +02:00
Juergen Hoeller 2e4a7480fc Consistent use of JDK 7 StandardCharsets over Charset.forName
Issue: SPR-14492
2016-08-26 14:16:19 +02:00
Juergen Hoeller 14046575b0 Polishing 2016-08-26 13:27:33 +02:00
Juergen Hoeller f3f691cc37 Revised assertions in StompHeaderAccessor
Issue: SPR-14625
2016-08-24 21:04:01 +02:00
Juergen Hoeller c4fff6db1b Reintroduced MessageMethodArgumentResolver default constructor
Issue: SPR-14616
2016-08-23 13:20:02 +02:00
Juergen Hoeller eeeab27f1f Polishing
(cherry picked from commit 35e247a)
2016-08-10 16:42:21 +02:00
Juergen Hoeller 59a24b406a Polishing 2016-08-10 14:20:42 +02:00
Juergen Hoeller 5db449556b Polishing 2016-07-27 16:21:55 +02:00
Juergen Hoeller 6d5af60a7c Expose DefaultSubscriptionRegistry's cache limit through SimpleBrokerMessageHandler and MessageBrokerRegistry
Issue: SPR-14516
2016-07-27 12:11:58 +02:00
Juergen Hoeller e03dea1d64 Polishing 2016-07-26 17:15:19 +02:00
Marius Grama 3635c9dbfe Update xmlunit library to version 2.1.0
xmlunit 2.1.0 is the latest release for xmlunit.
Most of the xmlunit functionality used within spring-framework
was done through the xmlunit 1.x helper class
`org.custommonkey.xmlunit.XMLAssert`.

As of xmlunit 2.0.0 most of the XML comparison methods are done
through hamcrest matchers exposed by the xmlunit-matchers
library. In some cases during the migration, the matchers
had to be customized with custom `NodeMatcher` or
`DifferenceEvaluator` instances in order to keep the assertions
correct (they were performed with xmlunit 1.x previously).

Issue: SPR-14043
2016-07-21 15:04:21 +02:00
Juergen Hoeller 99be15f58b Revise encoding steps towards use of JDK Charset and StandardCharsets
Issue: SPR-14492
2016-07-19 23:43:06 +02:00
Juergen Hoeller a4743c07d4 Polishing 2016-07-19 20:09:00 +02:00
Juergen Hoeller aaac199e8b Consistently use constructor-based instantiation instead of Class.newInstance / BeanUtils.instantiate
Issue: SPR-14486
2016-07-19 19:21:06 +02:00
Juergen Hoeller b1663585dc MessageHeaderAccessor properly removes header even in case of null value
Issue: SPR-14468
2016-07-15 00:15:46 +02:00
Juergen Hoeller a1f5fb53db Java 8 getParameterCount() instead of getParameterTypes().length
Issue: SPR-13188
2016-07-07 01:04:24 +02:00
Stephane Nicoll e4b0486c5a Add @FunctionalInterface on candidate interfaces
Issue: SPR-14432
2016-07-06 14:32:13 +02:00
Sam Brannen 1391248ea6 Introduce log4j 2 for Spring's test suite
This commit adds a test runtime dependency on log4j 2 for every project
and migrates all log4j.properties files to log4j2-test.xml files.

Issue: SPR-14431
2016-07-05 19:19:09 +02:00
Stephane Nicoll 00d2606b00 Explicit type can be replaced by <>
Issue: SPR-13188
2016-07-05 17:00:34 +02:00
Juergen Hoeller b5db5d3aac Broadly remove deprecated core classes and methods
Issue: SPR-14430
2016-07-05 15:52:49 +02:00
Juergen Hoeller 51252ebbca Avoid defensive checks against Java 8 API (java.util.Optional etc)
This commit also fixes broken javadoc links and code references.

Issue: SPR-13188
2016-07-05 02:09:00 +02:00
Juergen Hoeller f6334fc62b Aligned default Map capacity 2016-07-02 15:17:34 +02:00
Juergen Hoeller b204437cef Polishing 2016-07-02 14:48:15 +02:00
Juergen Hoeller e5122d084a Avoid wrapping in plain RuntimeException in favor of IllegalStateException 2016-07-02 13:03:33 +02:00
Juergen Hoeller e5de7d5455 @MessageExceptionHandler matches cause as well (analogous to @ExceptionHandler)
Issue: SPR-14424
2016-07-02 12:56:37 +02:00
Juergen Hoeller cfc560c4c4 Leniently accept custom DeferredResult etc subclasses for null values
Issue: SPR-14423
2016-07-02 12:55:30 +02:00
Rossen Stoyanchev ebdc770ed3 Use appropriate message id header for STOMP 1.1 vs 1.2
Issue: SPR-14391
2016-06-27 16:12:59 -04:00
Juergen Hoeller f5282bc1e3 PayloadArgumentResolver's MessageConversionException includes original payload type
Issue: SPR-14394
2016-06-23 17:32:30 +02:00
Juergen Hoeller a9fda3e7e2 Defensive catching of any Throwable subclasses instead of just Error
Issue: SPR-14329
2016-06-04 00:17:20 +02:00
Juergen Hoeller e4976a2c6d ExecutorSubscribableChannel consistently rethrows Error as MessageDeliveryException
Issue: SPR-14323
2016-06-01 11:38:56 +02:00
Rossen Stoyanchev 1e003a1c90 Remove unnecessary assertion
Issue: SPR-14279
2016-05-18 10:57:54 -04:00
Rossen Stoyanchev 4a81aaba6c Fix STOMP connect failure related memory leak
Normally heartbeats keep connections from hanging. However in some
cases a connection may hang before a CONNECTED frame is received
and heartbeats are put in place. This commit adds a change to enforce
a 60 limit on receiving the CONNECTED frame.

Issue: SPR-14266
2016-05-12 11:24:50 -04:00
Juergen Hoeller c15f27cfa8 Avoid package import cycle through explicit javadoc reference 2016-05-06 13:41:02 +02:00
Sam Brannen 7b13311f03 Delete unused imports 2016-05-03 20:12:37 +02:00
Rossen Stoyanchev 46e41a9d94 Consolidate SendTo vs SendToUser detection
SendTo and SendToUser are treated as mutually exclusive. The addition of
type-level support in 4.3. RC1 however did not consider the possibility
to mix and match of the two betwee type and method level.

This commit consolidates the detection of SendTo and SendToUser
annotations and considers them all together.

Issue: SPR-14238
2016-05-03 12:34:19 -04:00
Juergen Hoeller f83cbff543 Consistent SmartLifecycle implementations
Issue: SPR-14233
2016-05-02 13:01:44 +02:00
Rossen Stoyanchev bd40a93604 Ensure Environment.shutdown() in Reactor2TcpClient
Issue: SPR-14229
2016-04-28 17:47:59 -04:00
Rossen Stoyanchev 220711d45b Reactor2TcpClient cleans up TcpClient instances
Issue: SPR-14231
2016-04-28 15:27:53 -04:00
Rossen Stoyanchev 9798912557 Add missing @since tag 2016-04-26 16:48:45 -04:00
Rossen Stoyanchev 06b2d2b89e STOMP client session supports sending ack/nack
Issue: SPR-14208
2016-04-26 16:44:58 -04:00
Johnny Lim 44e652f99e Remove duplicate words
Closes gh-1039
2016-04-19 08:24:21 +02:00
Juergen Hoeller f1cb793ccb Rename MimeType's getCharSet() to getCharset()
Issue: SPR-14172
2016-04-14 16:38:59 +02:00
Juergen Hoeller 5f4e838f41 Jackson-based message converters do not log warning for serializer not found
Issue: SPR-14163
2016-04-14 14:13:13 +02:00
Juergen Hoeller 517ebd1d3e Consistent formatting 2016-03-24 19:22:50 +01:00
Juergen Hoeller 5025c615b1 Consistent use of AnnotatedElementUtils.findMergedAnnotation/hasAnnotation
Issue: SPR-13440
2016-03-23 18:39:20 +01:00
Rossen Stoyanchev 183594207f Support user destinations without leading slash
Before this commit the DefaultUserDestinationResolver did not support
well broker destinations that use dot as separator with a built in
assumptions that the destinations it resolves must start with slash.

This change adds PathMatcher property that is used to determine if
an alternative path separator is in use and if so the leading slash is
left out.

Issue: SPR-14044
2016-03-15 17:50:13 -04:00
Rossen Stoyanchev 68f6cf9d3a Support same user connected to multiple servers
The MultiServerUserRegistry now supports scenarios where the same user
is connected to multiple servers. For such cases the SimpUser returned
from the registry exposes all sessions across all servers.

Issue: SPR-13800
2016-03-10 14:37:22 -05:00
Rossen Stoyanchev 6aa216afb6 Polish SimpUserRegistry related classes
Issue: SPR-13800
2016-03-10 14:37:22 -05:00
Rossen Stoyanchev 18a59dad52 Minor Javadoc update 2016-02-18 18:11:59 -05:00
Rossen Stoyanchev 416966d943 Support Message argument with payload conversion
The MessageMethodArgumentResolver now also supports applying a
MessageConverter to the payload.

This is effectively a shortcut for declaring a method with an @Payload
argument + MessageHeaders and then creating a new message from the two.

Issue: SPR-13288
2016-02-18 18:09:16 -05:00
Rossen Stoyanchev ec3571fd4d Polish 2016-02-18 18:09:16 -05:00
Juergen Hoeller e0d7c6be00 Name attributes in method argument annotations allow for placeholders and expressions
Issue: SPR-13952
2016-02-17 22:59:12 +01:00
Juergen Hoeller 8558cbc9bf Polishing 2016-02-10 19:40:47 +01:00
Juergen Hoeller 901c2d5f74 Consistent API between spring-web and spring-messaging HandlerMethod infrastructure
Issue: SPR-13929
2016-02-10 16:23:11 +01:00
Rossen Stoyanchev e81c7dfc4c Polish SendToMethodReturnValueHandlerTests 2016-01-29 16:16:21 -05:00
Rossen Stoyanchev 03e3ef53ab @SendToUser supported on the class level
Issue: SPR-12047
2016-01-29 16:10:02 -05:00
Juergen Hoeller b4f33adf48 Consistent java.util.Optional resolution, lenient handling of optional multipart files, correct Servlet 3.0 Part list/array selection
Issue: SPR-13418
Issue: SPR-13849
Issue: SPR-13850
Issue: SPR-13893
2016-01-26 18:06:15 +01:00
Stephane Nicoll a112557dc4 Support SendTo at class-level
Issue: SPR-13578
2016-01-16 16:34:02 +01:00
Stephane Nicoll 2fc2c29e9a Update copyright header 2016-01-15 10:51:11 +01:00
Rossen Stoyanchev 3dae3fd8a9 Refine ListenableFutureCallback policy for exceptions
This change updates all cases where callbacks are invoked to catch and
suppress errors (since there is not match to do with and error from
a callback be it success or failure).

Also updated is the contract itself to clarify this and emphasize the
callbacks are really notifications for the outcome of the
ListenableFuture not the callbacks themselves.

Issue: SPR-13785
2016-01-14 17:49:01 -05:00
Sam Brannen 5b3edcd9f9 Spring Cleaning in December
- Delete unused imports
- Delete unused code
- Clean up warnings
2015-12-17 20:27:33 +01:00
Juergen Hoeller 8ce5e88c66 Require Jackson 2.6+, FreeMarker 2.3.21+, XStream 1.4.5+
Issue: SPR-13062
2015-12-17 17:14:50 +01:00
Juergen Hoeller 753347ea98 Consistent static final logger declarations 2015-12-16 20:44:00 +01:00
Juergen Hoeller bdb606b8b1 Polishing 2015-12-13 23:27:05 +01:00
Juergen Hoeller beef5ff4c3 Polishing 2015-12-10 01:12:58 +01:00
Juergen Hoeller ca9a078d82 Polishing 2015-12-10 00:31:37 +01:00
Juergen Hoeller f119962378 SimpAnnotationMethodMessageHandler ignores empty marker annotations
Issue: SPR-13704
2015-12-10 00:30:50 +01:00
Juergen Hoeller 11806b9215 Class identity comparisons wherever possible (and further polishing)
Issue: SPR-12926
2015-12-09 12:28:09 +01:00
Juergen Hoeller 8c4436926f Polishing 2015-11-26 02:09:37 +01:00
Juergen Hoeller a0747c2148 Consistent bean type checking for endpoint handlers
Issue: SPR-13725
2015-11-25 21:26:03 +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
Juergen Hoeller 760bc719f2 Polishing 2015-11-09 15:03:14 +01:00
Juergen Hoeller bc7bcab578 Consistent method selection for listeners and endpoint mappings
Issue: SPR-13654
2015-11-09 14:57:45 +01:00
Juergen Hoeller 23c8f712c4 Polishing 2015-11-02 21:30:03 +01:00
Juergen Hoeller cca037a74d Polishing 2015-11-02 14:42:46 +01:00
Sebastien Deleuze 994a11da3e Document default charset in Jackson message converters Javadoc
Issue: SPR-13600
2015-10-26 11:39:00 +01:00
Rossen Stoyanchev 922e6de788 Avoid filtering if selector header is not in use 2015-10-13 12:14:17 -04:00
Rossen Stoyanchev 7ff915a01a Enforce cacheLimit in DefaultSubscriptionRegistry
When the cacheLimit is reached and there is an eviction from the
updateCache, the accessCache is now also updated.

This change also ensures that adding a destination to the cache is
protected with synchronization on the updateCache.

Issue: SPR-13555
2015-10-13 12:14:16 -04:00
Juergen Hoeller 181533c464 MessageHeaders serialization preserves non-serializable entries in original instance
Issue: SPR-13541
2015-10-06 13:24:05 +02:00
Rossen Stoyanchev 8c316e1863 Avoid issue with switching from Reactor 2.0.5 to 2.0.6
We can't compile directly against NettyClientSocketOptions method which
changed signatures in 2.0.6. This change ensures the method is invoked
reflectively instead.
2015-09-30 18:43:07 -04:00
Rossen Stoyanchev c75206f975 Prepare for Reactor 2.0.6 2015-09-29 10:42:44 -04:00
Rossen Stoyanchev daa49c9bcd StompDecoder handles partial headers correctly
Issue: SPR-13416
2015-09-23 16:51:55 -04:00
Juergen Hoeller c4f5a0fb10 MessagingException provides null description (instead of empty String) to NestedRuntimeException
Issue: SPR-13447
2015-09-09 11:42:59 +02:00