Update note on channel interceptors in docs
Update `channel.adoc` including `afterReceiveCompletion(..)` in the
list of methods that are not invoked when an interceptor is applied
to `PollableChannel`
Improve `aggregator.adoc` formatting in docs
Fix and improve `channel.adoc` formatting in docs
Convert tabs to spaces of `codec.adoc` in docs
Convert tabs to spaces and fix formatting of `content-enrichment.adoc` in docs
Convert tabs to spaces and fix formatting of `logging-adapter.adoc` in docs
Convert tabs to spaces on `metrics.adoc` in docs
Improve `resequencer.adoc` formatting in docs
Improve `splitter.adoc` formatting in docs
* Fix more typos in the Reference Manual
fixes
fixModifiers after fixFinal
Revert CachingSessionFactory
Class is spied in tests.
checkstyle - Import Rules
checkstyle InterfaceIsType
checkstyle InnerTypeLast
checkstyle OneStatementPerLine
CovariantEquals
OneTopLevelClass
* Revert `'\n'` -> `System.lineSeparator()` in the Gradle scripts to meet Git `autocrlf = true` on Windows
* Fix timing issue with the `LastModifiedFileListFilterTests`, when the `age = 1` might not be enough for the file object when we have some delay before checking
JIRA: https://jira.spring.io/browse/INT-3976
The class name in case of `StaticScriptSource` (for inline scripts) is required only for Groovy native engine.
Even if `GroovyScriptParser` provides an explicit `scriptClassName` option, we still can configure
`GroovyScriptExecutingMessageProcessor` with the `StaticScriptSource` from Java without the script class name.
Therefore the logic in the `GroovyScriptParser` isn't robust.
* Remove the `GroovyScriptParser` `scriptClassName` logic altogether
* Change the `GroovyScriptExecutingMessageProcessor` to rely on the Groovy native `scriptClassName` generation
in case of the `scriptSource` is provided without the class name option
* Fix the test for the actual generated script class name
JIRA: https://jira.spring.io/browse/INT-3975
Also, switch the default mapping to map all inbound headers, but
don't map `x-*` on outbound (by default).
This will provide apps access to important headers such as `x-death` by
default, while not propagating dangerous headers outbound.
Polishing - PR Comments
Simple code style polishing
JIRA: https://jira.spring.io/browse/INT-3591
Modify `TestFtpServer` and `FtpServerOutboundTests` for file with leading whitespace
to confirm the `FtpServerFactory` has been fixed in the `commons-net-3.4`
JIRA: https://jira.spring.io/browse/INT-3944
Polishing (PR comments) and Doc Polish
Polishing - PR Comments
Remove custom `async` boolean in favor of the now public setter.
Add exception to `JmsException` hierarchy.
INT-3944: Polishing
* Rename `asyncReplySupported` just to `async`. As well as its getter and setter. Plus fix docs on the matter
* Polishing for the `JmsOutboundGateway` according PR comments
* Rework `JmsOutboundGateway` to return `AbstractIntegrationMessageBuilder` instead of `Message`
since `AbstractMessageProducingHandler` rebuilds `Message` for a new one to copy headers from request
* Add `getPayload()` and `getHeaders()` to the `AbstractIntegrationMessageBuilder` to make the `Routing Slip`
users happy, when the `AbstractIntegrationMessageBuilder` is pushed to the `Routing Slip path` function
* Fix race condition in the `ChatMessageListeningEndpointTests`: the `stanza` parsing is done in the different Thread.
Doc Polishing (Routing Slip)
Fix timing issue in the `LastModifiedFileListFilterTests`:
`Thread.sleep()` not always reflects the reality.
Switch to the "past simulation" via explicit `File.setLastModified()`
JIRA: https://jira.spring.io/browse/INT-3959
Also add `LifecycleMessageHandlerMetrics.getDelegate()` and `LifecycleMessageSourceMetrics.getDelegate()`
to avoid reflection on each `extractManagedBean()`
* `gradlew clean check -x test --parallel --continue` - to collect reports
* `gradlew fixThis --parallel` - to fix all possible vulnerabilities. With `-Dfile.encoding=UTF-8` on Windows
Since the `RequireThisCheck` doesn't see parents for anonymous classes (e.g. `Runnable` callback), its report doesn't contains the outer class name with `this.`,
therefore we still have to fix those cases manually.
Thanks to the wrong `replacer` just with `this.` we have uncompilable code enough easy to find problems.
Not so easy to fix for good readability though...
* Upgrade to Grade 2.12
* Upgrade to SonarQube native plugin
The fix contains at about 300 files. So, will be done on merge.
Fix `fixThis.gradle` according PR comments
Apply `fixThis` and also `fixModifiers` for test classes.
Fix some `this.` inner issues manually.
Make code polishing for long lines after `fixThis`
Fix conflicts and vulnerabilities after the rebase
JIRA: https://jira.spring.io/browse/INT-3968
Also deprecate `o.s.i.jms.JmsHeaders` in favor of the `o.s.jms.support` version.
*Fix JavaDocs for `JmsHeaders` and `DefaultScriptExecutor`
JIRA: https://jira.spring.io/browse/INT-3963
* Update to Smack-4.1.6
* Introduce `stanza-filter` option for the `<int-xmpp:inbound-channel-adapter>`
* Introduce `payloadExpression` for the complex and specific `stanza` parsing, e.g. GCM packets
* Deprecate `extract-payload` in favor of `payload-expression`
* Add `ChatMessageListeningEndpointTests` test for GCM protocol
* Add `ChatMessageInboundChannelAdapterParser` test for new attributes
* Document changes
Polishing according PR comments
Extract `#extension` SpEL variable
Document the `#extension` SpEL variable
JIRA: https://jira.spring.io/browse/INT-3970
NOTE: Don't see reason to back-port, because we have catched `ScriptingException` for the same reason at runtime.
Fix typo in the `AbstractScriptExecutor` method name.
Use that method from the `Assert`on the `engine`
Add `fixModifiers.gradle` to run after `check` task.
The `RedundantModifierChecker` doesn't catch all errors at once.
We need run `check -> fixModifiers` pair several times to reach `SUCCESSFUL`.
The `fixThis` has been ported from the SA, but without applying.
* Polishing for `fixModifiers.gradle`
* Fix all redundant modifier with the `fixModifiers.gradle`
NOTE: Since all these task modify files on Windows we have to run them with the `-Dfile.encoding=UTF-8`.
Otherwise they are read and write with the Windows default `cp1251` making them incompatible with Unix system.
https://build.spring.io/browse/INT-MJATS41-573/
The latest SF changes (https://jira.spring.io/browse/SPR-14042) added a restriction (breaking change) when
only `public` classes and their methods can be exposed as a managed resources and attributes, operations, respectively.
* Make `NotificationPublishingMessageHandler.PublisherDelegate` as `public` according the new requirement.
Even if it doesn't look necessary, because our `PublisherDelegate` is just for notification,
it sounds logical that any exposed into the JMX resource won't be `private` any more.
https://build.spring.io/browse/INT-MJATS41-569/
The `fixHeaders` Gradle task (and similar) must be run from Windows with the `-Dfile.encoding=UTF-8`.
Otherwise read/write operations for files are done in the native Windows `cp1251`
JIRA: https://jira.spring.io/browse/INT-3961
The `@InboundChannelAdapter` may be initialized by its `MessagingAnnotationPostProcessor` a bit earlier than the
provided channel is created and registered in the context - via some other more late `BPP`, e.g. `IntegrationFlowBeanPostProcessor` from Java DSL.
* Add channel late-binding logic to the `InboundChannelAdapterAnnotationPostProcessor` and `SourcePollingChannelAdapter` by the provided `outputChannelName` option.
* Add the `channel` alias for the `value` annotation attribute in the `@InboundChannelAdapter`
* Add the `@InboundChannelAdapter` configuration into the `EnableIntegrationTests` without the channel declaration to be sure that the fix provide the expected results without `DestinationResolutionException`
* Mention both changes in the `configuration.adoc` and `whats-new.adoc`
JIRA: https://jira.spring.io/browse/INT-3958
* Introduce `compileStatic` and `compilerConfiguration` properties for the `GroovyScriptExecutingMessageProcessor`,
to allow to customize the Groovy Script compilation
* Introduce `compile-static` and `compiler-configuration` options on the `<int-groovy:script>` component
* Change `RefreshableResourceScriptSource.suggestedClassName()` to return the **full** file name together with the
extension. That may be useful during the filtering phase for Compiler customization
* Modify tests to demonstrate different Compiler customization tricks
* Since Spring Boot 1.4 is already based on the SF-4.3, make an appropriate upgrade, too
Doc Polishing
More Docs Polishing
Even it isn't harmful, the one useless class in the `.file.test` package looks confusing.
Move it out to the `test` scope and change the dependant projects respectively.
JIRA: https://jira.spring.io/browse/INT-3956
Use reflection in tests to access private members
fix assertion imports
Polishing author rights.
Make tests `Threas.sleep()` free.
* Use `NO_REFERENCE_TASK=true` ENV var to skip `reference` tasks
* To enable `reference` tasks directly even with `NO_REFERENCE_TASK=true` use `ignoreEnvToStopReference` project (`-P`) variable
On a gateway remote timeout, there's a race between the reader and writer
thread to close the connection.
Change the `released` boolean to an `AtomicBoolean` to avoid the unexpected
exception when the other thread attempts to return a non-existent connection
to the pool.
JIRA: https://jira.spring.io/browse/INT-3919
Since `FtpClient` supports `null` for the `LS` command, treating it as a current `working directory`,
there is no reason to forbid `null` from the FTP adapters end-user perspective.
* Allow `null` for the `FtpSession` `list()` and `listNames()` methods
* Allow `null` in the `remote-directory` for the `<int-ftp:inbound-channel-adapter>`
* Allow `null` in the `expression` for the `FtpOutboundGateway`
Polishing - send error if error on async output
Cover `onFailure()` from `onSuccess()` with the `errorChannel`
Address PR Comments
* Get rid of `null` population for the `remoteDirectoryExpression` in the `AbstractPollingInboundChannelAdapterParser`
* Populate `new LiteralExpression(null)` from the `FtpInboundFileSynchronizer` ctor
* Introduce `buildRemotePath(parent, child)` function in the `AbstractRemoteFileOutboundGateway` with the `null` logic for `parent`
* Rework `mGetWithoutRecursion()` to use `LS` command and allow `null` for the dir.
* Fix tests according the new `mGetWithoutRecursion()` logic
Polishing