Commit Graph

235 Commits

Author SHA1 Message Date
Christian Tzolov
c38ed96ee9 GH-8643: Replace synchronized with Lock
Fixes https://github.com/spring-projects/spring-integration/issues/8643

* First pass - trivial synchronized blocks
  - Convert the "trivial" `synchronized` block into `ReentrantLock`.

* fix checkstyle

* use blocking lock

* Secon pass - handle multi-lock cases

* javadoc + year

* addres first batch of review suggestions

* fix checkstyle issues

* fix the mqtt parent/child lock monitor sharing

* fix the mqtt parent/child lock monitor sharing, v2

* patch the stomp test
2023-06-21 13:25:45 -04:00
Artem Bilan
32e34bf2ec GH-5871: Add missed order attr to XSDs (#8624)
* GH-5871: Add missed `order` attr to XSDs

Fixes https://github.com/spring-projects/spring-integration/issues/5871

* * Fix `spring-integration-xml.xsd` for duplicates
2023-05-22 11:59:47 -04:00
abilan
b0093ef161 TestXmlAppCtxHelper: Fix trailing white space 2023-03-30 10:47:46 -04:00
abilan
63937abf3e Migrate XML module tests to JUnit 5
* Use Java text blocks for xml snippets
2023-03-30 10:36:53 -04:00
abilan
7864658d01 GH-3686: Apply SF editor config
Fixes https://github.com/spring-projects/spring-integration/issues/3686

* Add `src/idea` with respective editor config for IntelliJ IDEA.
Must be imported into an IDE
* Add `src/eclipse` with respective editor config for Eclipse/STS
* Reformat imports in source code according a new editor config
2022-11-14 10:55:21 -05:00
Artem Bilan
5f1c0c17de Fix more issues from Sonar report 2022-11-03 12:44:26 -04:00
Artem Bilan
5080fc2f45 GH-3828: Initial Spring AOT support (#3832)
* GH-3828: Initial Spring AOT support

Fixes https://github.com/spring-projects/spring-integration/issues/3828

* Provide an infrastructure based on a new Spring AOT engine in the latest Spring Framework
* Introduce `RuntimeHintsRegistrar` impls into modules which require some reflection,
resources or proxies and serialization available in the native image
* Mark some framework method with the `@Reflective` to make their reflection
info available in the native image, for example for SpEL or JMX invocations
* Add a `GatewayProxyBeanRegistrationAotProcessor` to register proxy interfaces
info for messaging gateways (either instance of the `GatewayProxyFactoryBean`)
* Rework `ConverterRegistrar` to not use a `beanFactory.getBeansWithAnnotation()`
since it is not available after AOT phase.
Instead, register an intermediate `IntegrationConverterRegistration` bean definition
from the `IntegrationConverterInitializer`
* Refactor `GlobalChannelInterceptorInitializer` a bit according to a new logic in the
`IntegrationConverterInitializer`
* Remove `JsonNodeWrapperToJsonNodeConverter` bean registration from the
`DefaultConfiguringBeanFactoryPostProcessor` - it is added by the `ConverterRegistrar`
into the target `ConversionService`
* Fix `ParentContextTests` respectively a `JsonNodeWrapperToJsonNodeConverter` bean removal
* Refactor `XsltPayloadTransformer` to not load a `ServletContextResource`, but just use its
name for the `xslResource` condition

* * Rework AOT support according latest changes and requirements
* Remove `@Bean` reflection since it is not needed any more
* Add `AotDetector.useGeneratedArtifacts()` condition to not register beans
one more time at runtime after AOT build phase
* Fix deprecation in the WebFlux test from the latest SF
2022-09-01 13:59:07 -04:00
Artem Bilan
2022c40d55 Fix compatibility with the latest SF
* Upgrade Spring dependencies to the latest SNAPSHOTs
* Fix tests to verify against stack traces: the message
of the `NestedRuntimeException`  does not include the nested exception information.
Related to https://github.com/spring-projects/spring-framework/issues/25162
* Fix `JdbcMessageStore` and `DefaultLockRepository` to rely on the `DataIntegrityViolationException`
instead of only its `DuplicateKeyException` extension.
This is the current behavior of the SQL errors translation
* Disable `WebFluxDslTests.testValidation()` - doesn't subscribe to the reply somehow...
* Refine `SimplePool.PoolSemaphore.reducePermits()`
2022-06-27 20:30:14 -04:00
Artem Bilan
a80b22638d Start 6.0 version
* Upgrade to Java 17, SF-6.0, Gradle 7.2
* Upgrade to Jakarta dependencies and respective namespaces
* Fix some tests for Java 17 compatibility
* Fix wrong Javadocs
* Add some missed Javadocs
* Fix more `jakarta` namespace
* Fix WS & XML modules to use Jakarta EE
* `--add-opens` in some modules for their reflection-based tests
* Disable Kafka tests which does not work on Windows; see Apache Kafka `3.0.1`
* Upgrade to JUnit `5.8.1`
* Migrate JMS tests to Artemis
* Remove RMI module as it was deprecated before
* Fix `pr-build-workflow.yml` for Java 17
* Fix JavaDocs warnings using `Xdoclint:syntax` per module, not in the top-level `api` task
* Move docs for version `6.0`
2022-01-18 14:38:50 -05:00
Artem Bilan
3dabf7aec1 Fix Checkstyle violations
* Make version block for dependencies as code-switcher in the XML, ZeroMQ and Zookeeper docs
2021-11-15 12:21:52 -05:00
Artem Bilan
f5f1c82082 Some docs clean up for ZK & XML modules 2021-11-15 10:41:02 -05:00
Artem Bilan
d86647807e Use ReflectionUtils.makeAccessible() - not direct
The `LambdaMessageProcessor` and `MethodInvokingMessageSource`
 call `method.setAccessible(true)` unconditionally.

* Use `ReflectionUtils.makeAccessible()` for some optimization
* Remove `Content is not allowed in prolog` from the `JaxbMarshallingIntegrationTests`
since it is locale dependant and not relevant for the unit test logic
2021-11-03 10:54:24 -04:00
Artem Bilan
fe57fd281c Checkstyle changes
* Upgrade to Checkstyle 9.0
* apply some JavaDocs rules
* Fix JavaDocs rules violations
* Some other minor clean up in the affected classes
2021-09-28 11:55:25 -04:00
trungPa
9c718c37a6 GH-3424: Refactor to use logging methods from LogAccessor
Fixes https://github.com/spring-projects/spring-integration/issues/3424

* Use `LogMessage.format()` for lazily formatting

* Fix some logging statements in `JdbcChannelMessageStore`
2021-07-19 11:30:01 -04:00
Artem Bilan
3c541c52b4 Make @IntegrationConverter Native compatible (#3551)
* Make `@IntegrationConverter` Native compatible

* Add `BASE_PACKAGE` into an `IntegrationContextUtils`;
deprecate similar in the `IntegrationConfigUtils`.
This fixes a package tangle between `config` and `context`
* Move `ConverterRegistrar` and `CustomConversionServiceFactoryBean`
into a `config` package since they are package protected and
created their instances in the `IntegrationConverterInitializer`
functional way instead of reflection
* Use new `IntegrationContextUtils.BASE_PACKAGE` constant instead of
deprecated one
* Make `DefaultConfiguringBeanFactoryPostProcessor` `public` to
make it available for Spring Native `trigger` option in the `@NativeHint`
declaration
* Simplify logic around `JsonPath` to just a `ClassUtils.isPresent()`
* Move the `@IntegrationConverter` processing logic into the `ConverterRegistrar`
to avoid reflection via `BeanDefinition` ctor arg manipulation
* Move the reflection logic into a `ConverterParser` which, being a part of XML
configuration, is not going to be compatible with native any way
* Mark `JsonNodeWrapperToJsonNodeConverter` with an `@IntegrationConverter`
since it is not registered via reflection any more
* Expose `MicrometerMetricsCaptorRegistrar.METER_REGISTRY_PRESENT` and use
it in the `IntegrationGraphServer`
* Extract `UnmarshallingTransformer.MIME_MESSAGE_PRESENT` for less
reflection at runtime
* Use `null` for a `ClassLoader` arg in the `ClassUtils.isPresent()`
relying on the default one internally

* * Fix Checkstyle violations
2021-04-21 11:01:05 -04:00
Artem Bilan
bdb3ba8ebd Upgrade dependencies including Gradle
* Fix compatibility with upgraded dependencies
* Move `What's New` for `5.4` to `history`
* Add `XmlUnit` dependency since the latest AssertJ has deprecated its `isXmlEqualTo()`
* Remove `javax.annotation-api` and `apiguardian-api` as redundant dependencies
2020-12-02 17:20:46 -05:00
Artem Bilan
ac6a0982e5 Fix deprecations from Spring's StringUtils
* Use `LogAccessor` in the `XmlValidatingMessageSelector`
2020-10-28 16:33:51 -04:00
Artem Bilan
3f5aba2cb9 Support Java 14 (#3310)
* Support Java 14

* Provide changes to avoid deprecated Java API
and have a compatibility back to Java 8
* Change affected test classes to JUnit 5 whenever it is possible
* Ignore/Disable some TCP/IP tests which don't pass on Java 14

* Fix (some) TCP tests on JRE 14

* Fix SSL Handshake test - client side handshake is successful with java 14

- change the badClient cert to a badServer cert to force an error on the client side

Co-authored-by: artembilan <raven666>
Co-authored-by: Gary Russell <grussell@pivotal.io>
2020-06-17 14:00:06 -04:00
Artem Bilan
1f2a33437d Fix new Sonar smell 2020-04-03 12:04:32 -04:00
Artem Bilan
24e6be6f01 GH-3238: Fix Unmarshaller to close File resource
Fixes https://github.com/spring-projects/spring-integration/issues/3238

* Extract an `InputStream` from a `File` payload in the `UnmarshallingTransformer`
before parsing an XML.
Close this `InputStream` in the `finally` block to release the file resource

**Cherry-pick to 5.2.x, 5.1.x & 4.3.x**
2020-04-02 13:04:15 -04:00
Tim Feuerbach
c6cf261e25 GH-3202: Fix tests failing with non-English locales
Fixes https://github.com/spring-projects/spring-integration/issues/3202

Set the locale to en-US for tests that assert error messages
2020-03-02 14:03:27 -05:00
Artem Bilan
5ac262f866 GH-3132: Remove usage of super();
Fixes https://github.com/spring-projects/spring-integration/issues/3132

It turns out that Checkstyle EmptyBlock doesn't complain about
empty default ctor.
Plus a new check for `super();` call treats it as a violation

* Remove `super();` from all the no-arg ctors
* Code style clean up in the affected classes according
IDEA suggestions

* Fix new Sonar smells
2019-12-27 15:13:00 -05:00
Artem Bilan
9dc3519f20 Start version 5.3
* Move `What's New` into `changes-5.1-5.2.adoc`
* Remove version from the `XSD` files:
 1. Align with SF
 2. The version for XSD doesn't matter for the current jar version,
 since only the version is available in classpath is from the current
 jar version
 3. Modify `spring.schemas` to map all the possible versions for XSD
 into the current one in a jar.
 This way target applications can upgrade without changing the version
 for XSD location and we don't need to require `versionless` variant
 any more
 4. The jar in classpath can handle only its own XSD, so independently
 of version or no-version variants we still may fail because the current
 jar may not support end-user code any more - need some fix over there
 anyway.
* Remove `checkTestConfigs` Gradle task since we don't worry about XSD
version any more
* Modify `schemaZip` Gradle task to populate XSDs into a distribution
still with a version to avoid overriding on-line XSDs for version `1.0.x`.
We may consider not do that since SF doesn't and just bite a bullet
for always overriding those on-line XSDs to the actual one from the latest
release.
2019-12-26 15:41:19 -05:00
Artem Bilan
80d679a9b0 GH-2748: More bean definitions into exceptions
Fixes https://github.com/spring-projects/spring-integration/issues/2748

* Refactor more `MessageHandlingException`s to include `this` into an
exception message
* Revert using `MessagingException` in some places which really are not
about messaging.
This helps to wrap them into `MessageHandlingException` later in the
`MessageHandler` for the `BeanDefinition` reference
* Remove `volatile` from configuration properties in the affected
classes
* Remove already deprecated `JmsOutboundGateway.setPriority()`
* Add `resource` and `source` for `BeanDefinition` in the
`AbstractChannelAdapterParser` & `AbstractInboundGatewayParser`
* Document the feature
2019-07-23 15:19:56 -04:00
Artem Bilan
c109e1df34 GH-2987: Add HTTPS entries into spring.schemas
Fixes https://github.com/spring-projects/spring-integration/issues/2987

To resolve XSD files properly from the classpath, their HTTPS reference
must be present in the `spring.schemas` to avoid the Internet interaction
for resolving an XSD file

**Cherry-pick to 5.1.x, 5.0.x & 4.3.x**
2019-07-18 14:05:18 -04:00
Artem Bilan
0c32a57e99 Fix Sonar smells for XML module 2019-05-31 10:44:36 -04:00
Artem Bilan
e9591c6fdf Make spring-ws-core optional for SI-xml
It turns out that `spring-ws-core` brings too much WS stuff which
triggers and auto-configuration to be enabled in Spring Boot app when
we don't expect it.

* The `UnmarshallingTransformer` is already aware of `MimeMessage` and
`MarshallingUtils` being optional, so just remove redundant `public`
modifier for `maybeUnmarshalMimeMessage()` method
* Load `ServletContextResource` class in the `XsltPayloadTransformer`
on demand making such a dependency as optional
2019-05-30 14:08:15 -04:00
Gary Russell
6d7bc1fc39 Sonar: repeated literals
* Polishing - PR Comments

* GatewayParser: Restore suppress warnings; remove size from `toArray()`.

* Merge conflict resolution
2019-05-03 12:39:02 -04:00
Gary Russell
36c33bb5ab Sonar fixes
- a few complexities
- final method calls from ctor
- raw exception throwing
- useless overrides
- loss of stack trace
2019-04-29 18:20:40 -04:00
Artem Bilan
818be4cbe8 GH-2765: Add discardChannel for splitter (#2883)
* GH-2765: Add discardChannel for splitter

Fixes https://github.com/spring-projects/spring-integration/issues/2765

When encountering empty collections, splitter should be able to send
the result to a discard channel.
Currently, when encountering an empty collection,
the splitter ends the flow.
Some use-cases may rely on a custom split function which may returns
empty collections.
These use-cases should be able to define a discard channel
so they can proceed with a possible compensation flow.

* Add `discardChannel` option to the `AbstractMessageSplitter`
* Delegate `discardChannel` population from everywhere it is possible:
DSL, XML, `AbstractMessageSplitter` extension like `FileSplitter` etc.
* Fix `FileSplitterTests` for broken charset
* Document new feature; fix some typos and out-dated code sample

* * Fix `SplitterFactoryBean` for NPE on the `discardChannelName`
propagation

* * Check `this.discardChannel` first
* `Assert.state()` in `doInit()` for mutual exclusiveness
2019-04-08 16:42:57 -04:00
Artem Bilan
d21e8f0349 URL Cleanup
This commit updates URLs to prefer the https protocol.
Redirects are not followed to avoid accidentally expanding intentionally
shortened URLs (i.e. if using a URL shortener).

# Fixed URLs

## Fixed Success
These URLs were switched to an https URL with a 2xx status.
While the status was successful, your review is still recommended.

* [ ] http://www.apache.org/licenses/ with 1 occurrences migrated to:
  https://www.apache.org/licenses/ ([https](https://www.apache.org/licenses/) result 200).
* [ ] http://www.apache.org/licenses/LICENSE-2.0 with 2638 occurrences migrated to:
  https://www.apache.org/licenses/LICENSE-2.0 ([https](https://www.apache.org/licenses/LICENSE-2.0) result 200).
2019-03-21 19:22:26 -04:00
Artem Bilan
20e8f0af2f Fix HTTP urls to HTTPS
* Do not fix urls for the `http://apache.org/xml/features` when we
configure XML components
* Do not fix urls for localhost and fake links in tests
* Fix all the dead links in docs
2019-03-21 17:16:30 -04:00
Spring Operator
fd30d1b48b URL Cleanup
This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener).

# HTTP URLs that Could Not Be Fixed
These URLs were unable to be fixed. Please review them to see if they can be manually resolved.

* http://foo.com (301) with 1 occurrences could not be migrated:
   ([https](https://foo.com) result SSLHandshakeException).

# Fixed URLs

## Fixed But Review Recommended
These URLs were fixed, but the https status was not OK. However, the https status was the same as the http request or http redirected to an https URL, so they were migrated. Your review is recommended.

* http://diveintomark.org/ (302) with 1 occurrences migrated to:
  /ZKSXZ/ ([https](https://diveintomark.org/) result IllegalArgumentException).
* http://foo.bar.com (UnknownHostException) with 1 occurrences migrated to:
  https://foo.bar.com ([https](https://foo.bar.com) result UnknownHostException).
* http://site1.com,http://site2.com (UnknownHostException) with 1 occurrences migrated to:
  https://site1.com,http://site2.com ([https](https://site1.com,https://site2.com) result UnknownHostException).
* http://example.org/2005/04/02/atom (404) with 1 occurrences migrated to:
  https://example.org/2005/04/02/atom ([https](https://example.org/2005/04/02/atom) result 404).
* http://example.org/audio/ph34r_my_podcast.mp3 (404) with 1 occurrences migrated to:
  https://example.org/audio/ph34r_my_podcast.mp3 ([https](https://example.org/audio/ph34r_my_podcast.mp3) result 404).
* http://example.org/feed.atom (404) with 1 occurrences migrated to:
  https://example.org/feed.atom ([https](https://example.org/feed.atom) result 404).
* http://www.puppycrawl.com/dtds/configuration_1_2.dtd (404) with 1 occurrences migrated to:
  https://www.puppycrawl.com/dtds/configuration_1_2.dtd ([https](https://www.puppycrawl.com/dtds/configuration_1_2.dtd) result 404).
* http://www.puppycrawl.com/dtds/suppressions_1_1.dtd (404) with 1 occurrences migrated to:
  https://www.puppycrawl.com/dtds/suppressions_1_1.dtd ([https](https://www.puppycrawl.com/dtds/suppressions_1_1.dtd) result 404).
* http://www.springframework.org/schema/integration/jsr223/spring-integration-jsr223.xsd (404) with 1 occurrences migrated to:
  https://www.springframework.org/schema/integration/jsr223/spring-integration-jsr223.xsd ([https](https://www.springframework.org/schema/integration/jsr223/spring-integration-jsr223.xsd) result 404).
* http://www.springframework.org/schema/integration/spring-integration-ws.xsd (404) with 1 occurrences migrated to:
  https://www.springframework.org/schema/integration/spring-integration-ws.xsd ([https](https://www.springframework.org/schema/integration/spring-integration-ws.xsd) result 404).
* http://www.springframework.org/schema/integration/webflux/spring-integration-webflux.xsd (404) with 4 occurrences migrated to:
  https://www.springframework.org/schema/integration/webflux/spring-integration-webflux.xsd ([https](https://www.springframework.org/schema/integration/webflux/spring-integration-webflux.xsd) result 404).

## Fixed Success
These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended.

* http://example.org with 22 occurrences migrated to:
  https://example.org ([https](https://example.org) result 200).
* http://example.org/ with 2 occurrences migrated to:
  https://example.org/ ([https](https://example.org/) result 200).
* http://feeds.bbci.co.uk/news/rss.xml with 1 occurrences migrated to:
  https://feeds.bbci.co.uk/news/rss.xml ([https](https://feeds.bbci.co.uk/news/rss.xml) result 200).
* http://www.example.com/ with 1 occurrences migrated to:
  https://www.example.com/ ([https](https://www.example.com/) result 200).
* http://www.springframework.org/schema/aop/spring-aop.xsd with 12 occurrences migrated to:
  https://www.springframework.org/schema/aop/spring-aop.xsd ([https](https://www.springframework.org/schema/aop/spring-aop.xsd) result 200).
* http://www.springframework.org/schema/beans/spring-beans.xsd with 813 occurrences migrated to:
  https://www.springframework.org/schema/beans/spring-beans.xsd ([https](https://www.springframework.org/schema/beans/spring-beans.xsd) result 200).
* http://www.springframework.org/schema/context/spring-context.xsd with 122 occurrences migrated to:
  https://www.springframework.org/schema/context/spring-context.xsd ([https](https://www.springframework.org/schema/context/spring-context.xsd) result 200).
* http://www.springframework.org/schema/data/jpa/spring-jpa.xsd with 2 occurrences migrated to:
  https://www.springframework.org/schema/data/jpa/spring-jpa.xsd ([https](https://www.springframework.org/schema/data/jpa/spring-jpa.xsd) result 200).
* http://www.springframework.org/schema/data/mongo/spring-mongo.xsd with 18 occurrences migrated to:
  https://www.springframework.org/schema/data/mongo/spring-mongo.xsd ([https](https://www.springframework.org/schema/data/mongo/spring-mongo.xsd) result 200).
* http://www.springframework.org/schema/geode/spring-geode.xsd with 4 occurrences migrated to:
  https://www.springframework.org/schema/geode/spring-geode.xsd ([https](https://www.springframework.org/schema/geode/spring-geode.xsd) result 200).
* http://www.springframework.org/schema/integration/amqp/spring-integration-amqp.xsd with 14 occurrences migrated to:
  https://www.springframework.org/schema/integration/amqp/spring-integration-amqp.xsd ([https](https://www.springframework.org/schema/integration/amqp/spring-integration-amqp.xsd) result 200).
* http://www.springframework.org/schema/integration/event/spring-integration-event.xsd with 4 occurrences migrated to:
  https://www.springframework.org/schema/integration/event/spring-integration-event.xsd ([https](https://www.springframework.org/schema/integration/event/spring-integration-event.xsd) result 200).
* http://www.springframework.org/schema/integration/feed/spring-integration-feed.xsd with 4 occurrences migrated to:
  https://www.springframework.org/schema/integration/feed/spring-integration-feed.xsd ([https](https://www.springframework.org/schema/integration/feed/spring-integration-feed.xsd) result 200).
* http://www.springframework.org/schema/integration/file/spring-integration-file.xsd with 27 occurrences migrated to:
  https://www.springframework.org/schema/integration/file/spring-integration-file.xsd ([https](https://www.springframework.org/schema/integration/file/spring-integration-file.xsd) result 200).
* http://www.springframework.org/schema/integration/ftp/spring-integration-ftp.xsd with 15 occurrences migrated to:
  https://www.springframework.org/schema/integration/ftp/spring-integration-ftp.xsd ([https](https://www.springframework.org/schema/integration/ftp/spring-integration-ftp.xsd) result 200).
* http://www.springframework.org/schema/integration/gemfire/spring-integration-gemfire.xsd with 6 occurrences migrated to:
  https://www.springframework.org/schema/integration/gemfire/spring-integration-gemfire.xsd ([https](https://www.springframework.org/schema/integration/gemfire/spring-integration-gemfire.xsd) result 200).
* http://www.springframework.org/schema/integration/groovy/spring-integration-groovy.xsd with 11 occurrences migrated to:
  https://www.springframework.org/schema/integration/groovy/spring-integration-groovy.xsd ([https](https://www.springframework.org/schema/integration/groovy/spring-integration-groovy.xsd) result 200).
* http://www.springframework.org/schema/integration/http/spring-integration-http.xsd with 18 occurrences migrated to:
  https://www.springframework.org/schema/integration/http/spring-integration-http.xsd ([https](https://www.springframework.org/schema/integration/http/spring-integration-http.xsd) result 200).
* http://www.springframework.org/schema/integration/ip/spring-integration-ip.xsd with 27 occurrences migrated to:
  https://www.springframework.org/schema/integration/ip/spring-integration-ip.xsd ([https](https://www.springframework.org/schema/integration/ip/spring-integration-ip.xsd) result 200).
* http://www.springframework.org/schema/integration/jdbc/spring-integration-jdbc.xsd with 47 occurrences migrated to:
  https://www.springframework.org/schema/integration/jdbc/spring-integration-jdbc.xsd ([https](https://www.springframework.org/schema/integration/jdbc/spring-integration-jdbc.xsd) result 200).
* http://www.springframework.org/schema/integration/jms/spring-integration-jms.xsd with 93 occurrences migrated to:
  https://www.springframework.org/schema/integration/jms/spring-integration-jms.xsd ([https](https://www.springframework.org/schema/integration/jms/spring-integration-jms.xsd) result 200).
* http://www.springframework.org/schema/integration/jmx/spring-integration-jmx.xsd with 32 occurrences migrated to:
  https://www.springframework.org/schema/integration/jmx/spring-integration-jmx.xsd ([https](https://www.springframework.org/schema/integration/jmx/spring-integration-jmx.xsd) result 200).
* http://www.springframework.org/schema/integration/jpa/spring-integration-jpa.xsd with 11 occurrences migrated to:
  https://www.springframework.org/schema/integration/jpa/spring-integration-jpa.xsd ([https](https://www.springframework.org/schema/integration/jpa/spring-integration-jpa.xsd) result 200).
* http://www.springframework.org/schema/integration/mail/spring-integration-mail.xsd with 18 occurrences migrated to:
  https://www.springframework.org/schema/integration/mail/spring-integration-mail.xsd ([https](https://www.springframework.org/schema/integration/mail/spring-integration-mail.xsd) result 200).
* http://www.springframework.org/schema/integration/mongodb/spring-integration-mongodb.xsd with 17 occurrences migrated to:
  https://www.springframework.org/schema/integration/mongodb/spring-integration-mongodb.xsd ([https](https://www.springframework.org/schema/integration/mongodb/spring-integration-mongodb.xsd) result 200).
* http://www.springframework.org/schema/integration/mqtt/spring-integration-mqtt.xsd with 4 occurrences migrated to:
  https://www.springframework.org/schema/integration/mqtt/spring-integration-mqtt.xsd ([https](https://www.springframework.org/schema/integration/mqtt/spring-integration-mqtt.xsd) result 200).
* http://www.springframework.org/schema/integration/redis/spring-integration-redis.xsd with 17 occurrences migrated to:
  https://www.springframework.org/schema/integration/redis/spring-integration-redis.xsd ([https](https://www.springframework.org/schema/integration/redis/spring-integration-redis.xsd) result 200).
* http://www.springframework.org/schema/integration/rmi/spring-integration-rmi.xsd with 4 occurrences migrated to:
  https://www.springframework.org/schema/integration/rmi/spring-integration-rmi.xsd ([https](https://www.springframework.org/schema/integration/rmi/spring-integration-rmi.xsd) result 200).
* http://www.springframework.org/schema/integration/scripting/spring-integration-scripting.xsd with 14 occurrences migrated to:
  https://www.springframework.org/schema/integration/scripting/spring-integration-scripting.xsd ([https](https://www.springframework.org/schema/integration/scripting/spring-integration-scripting.xsd) result 200).
* http://www.springframework.org/schema/integration/security/spring-integration-security.xsd with 3 occurrences migrated to:
  https://www.springframework.org/schema/integration/security/spring-integration-security.xsd ([https](https://www.springframework.org/schema/integration/security/spring-integration-security.xsd) result 200).
* http://www.springframework.org/schema/integration/sftp/spring-integration-sftp.xsd with 18 occurrences migrated to:
  https://www.springframework.org/schema/integration/sftp/spring-integration-sftp.xsd ([https](https://www.springframework.org/schema/integration/sftp/spring-integration-sftp.xsd) result 200).
* http://www.springframework.org/schema/integration/spring-integration.xsd with 731 occurrences migrated to:
  https://www.springframework.org/schema/integration/spring-integration.xsd ([https](https://www.springframework.org/schema/integration/spring-integration.xsd) result 200).
* http://www.springframework.org/schema/integration/stomp/spring-integration-stomp.xsd with 1 occurrences migrated to:
  https://www.springframework.org/schema/integration/stomp/spring-integration-stomp.xsd ([https](https://www.springframework.org/schema/integration/stomp/spring-integration-stomp.xsd) result 200).
* http://www.springframework.org/schema/integration/stream/spring-integration-stream.xsd with 17 occurrences migrated to:
  https://www.springframework.org/schema/integration/stream/spring-integration-stream.xsd ([https](https://www.springframework.org/schema/integration/stream/spring-integration-stream.xsd) result 200).
* http://www.springframework.org/schema/integration/syslog/spring-integration-syslog.xsd with 5 occurrences migrated to:
  https://www.springframework.org/schema/integration/syslog/spring-integration-syslog.xsd ([https](https://www.springframework.org/schema/integration/syslog/spring-integration-syslog.xsd) result 200).
* http://www.springframework.org/schema/integration/websocket/spring-integration-websocket.xsd with 1 occurrences migrated to:
  https://www.springframework.org/schema/integration/websocket/spring-integration-websocket.xsd ([https](https://www.springframework.org/schema/integration/websocket/spring-integration-websocket.xsd) result 200).
* http://www.springframework.org/schema/integration/ws/spring-integration-ws.xsd with 10 occurrences migrated to:
  https://www.springframework.org/schema/integration/ws/spring-integration-ws.xsd ([https](https://www.springframework.org/schema/integration/ws/spring-integration-ws.xsd) result 200).
* http://www.springframework.org/schema/integration/xml/spring-integration-xml.xsd with 12 occurrences migrated to:
  https://www.springframework.org/schema/integration/xml/spring-integration-xml.xsd ([https](https://www.springframework.org/schema/integration/xml/spring-integration-xml.xsd) result 200).
* http://www.springframework.org/schema/integration/xmpp/spring-integration-xmpp.xsd with 14 occurrences migrated to:
  https://www.springframework.org/schema/integration/xmpp/spring-integration-xmpp.xsd ([https](https://www.springframework.org/schema/integration/xmpp/spring-integration-xmpp.xsd) result 200).
* http://www.springframework.org/schema/integration/zookeeper/spring-integration-zookeeper.xsd with 1 occurrences migrated to:
  https://www.springframework.org/schema/integration/zookeeper/spring-integration-zookeeper.xsd ([https](https://www.springframework.org/schema/integration/zookeeper/spring-integration-zookeeper.xsd) result 200).
* http://www.springframework.org/schema/jdbc/spring-jdbc.xsd with 52 occurrences migrated to:
  https://www.springframework.org/schema/jdbc/spring-jdbc.xsd ([https](https://www.springframework.org/schema/jdbc/spring-jdbc.xsd) result 200).
* http://www.springframework.org/schema/jms/spring-jms.xsd with 7 occurrences migrated to:
  https://www.springframework.org/schema/jms/spring-jms.xsd ([https](https://www.springframework.org/schema/jms/spring-jms.xsd) result 200).
* http://www.springframework.org/schema/lang/spring-lang.xsd with 4 occurrences migrated to:
  https://www.springframework.org/schema/lang/spring-lang.xsd ([https](https://www.springframework.org/schema/lang/spring-lang.xsd) result 200).
* http://www.springframework.org/schema/mvc/spring-mvc.xsd with 1 occurrences migrated to:
  https://www.springframework.org/schema/mvc/spring-mvc.xsd ([https](https://www.springframework.org/schema/mvc/spring-mvc.xsd) result 200).
* http://www.springframework.org/schema/rabbit/spring-rabbit.xsd with 9 occurrences migrated to:
  https://www.springframework.org/schema/rabbit/spring-rabbit.xsd ([https](https://www.springframework.org/schema/rabbit/spring-rabbit.xsd) result 200).
* http://www.springframework.org/schema/security/spring-security.xsd with 2 occurrences migrated to:
  https://www.springframework.org/schema/security/spring-security.xsd ([https](https://www.springframework.org/schema/security/spring-security.xsd) result 200).
* http://www.springframework.org/schema/task/spring-task.xsd with 44 occurrences migrated to:
  https://www.springframework.org/schema/task/spring-task.xsd ([https](https://www.springframework.org/schema/task/spring-task.xsd) result 200).
* http://www.springframework.org/schema/tool/spring-tool.xsd with 4 occurrences migrated to:
  https://www.springframework.org/schema/tool/spring-tool.xsd ([https](https://www.springframework.org/schema/tool/spring-tool.xsd) result 200).
* http://www.springframework.org/schema/tx/spring-tx.xsd with 14 occurrences migrated to:
  https://www.springframework.org/schema/tx/spring-tx.xsd ([https](https://www.springframework.org/schema/tx/spring-tx.xsd) result 200).
* http://www.springframework.org/schema/util/spring-util.xsd with 92 occurrences migrated to:
  https://www.springframework.org/schema/util/spring-util.xsd ([https](https://www.springframework.org/schema/util/spring-util.xsd) result 200).
* http://www.springframework.org/schema/websocket/spring-websocket.xsd with 1 occurrences migrated to:
  https://www.springframework.org/schema/websocket/spring-websocket.xsd ([https](https://www.springframework.org/schema/websocket/spring-websocket.xsd) result 200).
* http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd with 1 occurrences migrated to:
  https://java.sun.com/xml/ns/persistence/persistence_2_0.xsd ([https](https://java.sun.com/xml/ns/persistence/persistence_2_0.xsd) result 302).

# Ignored
These URLs were intentionally ignored.

* http://java.sun.com/xml/ns/persistence with 2 occurrences
* http://localhost with 1 occurrences
* http://localhost/ with 1 occurrences
* http://localhost/test1 with 25 occurrences
* http://localhost/test1/%2f with 1 occurrences
* http://localhost/test2 with 2 occurrences
* http://localhost/test2/ with 1 occurrences
* http://localhost:18080/it/ with 3 occurrences
* http://localhost:51235/%2f/testApps?param= with 1 occurrences
* http://test with 1 occurrences
* http://test.example.org with 1 occurrences
* http://test.org with 1 occurrences
* http://testServer/test with 1 occurrences
* http://testServer/testmp with 1 occurrences
* http://www.springframework.org/schema/aop with 25 occurrences
* http://www.springframework.org/schema/beans with 1633 occurrences
* http://www.springframework.org/schema/c with 1 occurrences
* http://www.springframework.org/schema/context with 244 occurrences
* http://www.springframework.org/schema/data/jpa with 3 occurrences
* http://www.springframework.org/schema/data/mongo with 36 occurrences
* http://www.springframework.org/schema/geode with 8 occurrences
* http://www.springframework.org/schema/integration with 1465 occurrences
* http://www.springframework.org/schema/integration/amqp with 28 occurrences
* http://www.springframework.org/schema/integration/event with 8 occurrences
* http://www.springframework.org/schema/integration/feed with 8 occurrences
* http://www.springframework.org/schema/integration/file with 54 occurrences
* http://www.springframework.org/schema/integration/ftp with 30 occurrences
* http://www.springframework.org/schema/integration/gemfire with 12 occurrences
* http://www.springframework.org/schema/integration/groovy with 27 occurrences
* http://www.springframework.org/schema/integration/http with 36 occurrences
* http://www.springframework.org/schema/integration/ip with 54 occurrences
* http://www.springframework.org/schema/integration/jdbc with 94 occurrences
* http://www.springframework.org/schema/integration/jms with 186 occurrences
* http://www.springframework.org/schema/integration/jmx with 64 occurrences
* http://www.springframework.org/schema/integration/jpa with 22 occurrences
* http://www.springframework.org/schema/integration/jsr223 with 2 occurrences
* http://www.springframework.org/schema/integration/mail with 36 occurrences
* http://www.springframework.org/schema/integration/mongodb with 34 occurrences
* http://www.springframework.org/schema/integration/mqtt with 8 occurrences
* http://www.springframework.org/schema/integration/redis with 34 occurrences
* http://www.springframework.org/schema/integration/rmi with 8 occurrences
* http://www.springframework.org/schema/integration/scripting with 28 occurrences
* http://www.springframework.org/schema/integration/security with 6 occurrences
* http://www.springframework.org/schema/integration/sftp with 36 occurrences
* http://www.springframework.org/schema/integration/stomp with 2 occurrences
* http://www.springframework.org/schema/integration/stream with 34 occurrences
* http://www.springframework.org/schema/integration/syslog with 10 occurrences
* http://www.springframework.org/schema/integration/webflux with 8 occurrences
* http://www.springframework.org/schema/integration/websocket with 2 occurrences
* http://www.springframework.org/schema/integration/ws with 22 occurrences
* http://www.springframework.org/schema/integration/xml with 24 occurrences
* http://www.springframework.org/schema/integration/xmpp with 28 occurrences
* http://www.springframework.org/schema/integration/zookeeper with 2 occurrences
* http://www.springframework.org/schema/jdbc with 104 occurrences
* http://www.springframework.org/schema/jms with 13 occurrences
* http://www.springframework.org/schema/lang with 8 occurrences
* http://www.springframework.org/schema/mvc with 2 occurrences
* http://www.springframework.org/schema/p with 19 occurrences
* http://www.springframework.org/schema/rabbit with 18 occurrences
* http://www.springframework.org/schema/security with 4 occurrences
* http://www.springframework.org/schema/task with 88 occurrences
* http://www.springframework.org/schema/tool with 8 occurrences
* http://www.springframework.org/schema/tx with 28 occurrences
* http://www.springframework.org/schema/util with 184 occurrences
* http://www.springframework.org/schema/websocket with 2 occurrences
* http://www.w3.org/1999/xhtml with 1 occurrences
* http://www.w3.org/2001/XMLSchema with 1 occurrences
* http://www.w3.org/2001/XMLSchema-instance with 814 occurrences
* http://www.w3.org/2005/Atom with 1 occurrences

* Use the latest Checkstyle DTDs with their HTTPS variants
2019-03-20 10:39:37 -04:00
Gary Russell
78199dca9b Avoid throws Exception where possible - Phase III 2019-03-07 17:59:53 -05:00
Artem Bilan
1d54f9663a GH-2760: use assertThatExceptionOfType in tests
Fixes https://github.com/spring-projects/spring-integration/issues/2760

* The `assertThatExceptionOfType()` is more convenient,
than `assertThatThrownBy`, so, replace all the usages accordingly
* Fix JavaDoc typo in the `AbstractScriptExecutingMessageProcessor`
* Fix Sonar smells for `throws Exception` in `AbstractScriptExecutingMessageProcessor`
hierarchy and some code polishing for them
2019-02-22 13:54:36 -05:00
Artem Bilan
221393e02f MessageHandlingException consistency
* Use `IntegrationUtils.wrapInHandlingExceptionIfNecessary()` whenever
it is possible to avoid double wrapping into the `MessageHandlingException`
* Some code polishing for affected classes `@Nullable`, streams, diamonds etc.
2019-02-22 09:43:59 -05:00
Artem Bilan
7e3b56939e Fix XSDs for actual core schema version 2019-02-21 12:43:21 -05:00
Artem Bilan
622d42c71a Migrate tests to AssertJ
Mostly thanks to IDEA's plugin: https://plugins.jetbrains.com/plugin/10345-assertions2assertj
There is still a lot of work to do when complex and composite matchers are used.

* Add `awaitility` dependency and deprecate `EventuallyMatcher` in favor
of `awaitility`
* Remove Hamcrest from dependencies and disable JUnit & Hamcrest
static imports to encourage to use only AssertJ
* Migrate JUnit assumptions in rules to AssertJ's assumptions
* Deprecate some custom matchers in favor of existing in Hamcrest
after upgrading the last to version `2.1`
* Replace `ExpectedException` rules with `assertThatThrownBy()`
* Mention `MessagePredicate` in the `testing.adoc`
2019-02-21 10:20:45 -05:00
Gary Russell
520ebbbd2c Move master to 5.2 2019-02-15 12:01:24 -05:00
Artem Bilan
a283ad60fb GH-2723: Handle unsupported XML properties
Fixes spring-projects/spring-integration#2723

Not all XML components support all the configuration properties.
For example Saxon HE doesn't support `XMLConstants.ACCESS_EXTERNAL_DTD`
and end up with an exception like:
`IllegalArgumentException: Unknown configuration property http://javax.xml.XMLConstants/property/accessExternalDTD`

* Change `XsltPayloadTransformer` to re-use `TransformerFactoryUtils`
from spring-ws as a centralized source of `TransformerFactory`
configuration.
* Wrap `XMLConstants.ACCESS_EXTERNAL_STYLESHEET` to the `try..catch`
and log INFO about not supported property

**Cherry-pick to 5.0.x & 4.3.x**
2019-01-29 12:27:05 -05:00
Artem Bilan
eed16f02ca Fix BeanFactory propagation for MMInvokerHelper (#2694)
* Fix BeanFactory propagation for MMInvokerHelper

* Remove check for `null` in the
`MessagingMethodInvokerHelper.isProvidedMessageHandlerFactoryBean()`
* Fix `RecipientListRouter` for `BeanFactory` propagation to the
`Recipient.selector`
* Fix tests for `BeanFactory` population and propagation
* Add `errorChannel` into the `TestUtils.createTestApplicationContext()`
* Fix some Sonar smell, including new reported

* * Restore NPE check for the `BeanFactory` in the
`MessagingMethodInvokerHelper` to avoid breaking changes in the current
point release
* Some other polishing and optimizations in the
`MessagingMethodInvokerHelper`
2019-01-15 15:16:33 -05:00
Artem Bilan
59c69ed40d Allow XML components injection
**Cherry-pick to 5.0.x & 4.3.x**

* Polishing after rebase
* Copyright to 2019

* Rebase and update according upstream deps
2019-01-10 14:43:06 -05:00
Gary Russell
2766707547 Sonar fixes
- remaining hidden fields

* Fix copyright
2019-01-09 13:30:08 -05:00
Gary Russell
1bafe89d49 Sonar Fixes
- avoid parameter assignments
2019-01-07 11:35:58 -05:00
Gary Russell
e8df546b04 Sonar Fixes - Javadoc-only imports 2019-01-02 12:26:22 -05:00
Gary Russell
113a371f2c Remove Exception from IOS.onInit() 2018-12-22 17:25:56 -05:00
Artem Bilan
0d09bdccd4 Replace xmlunit dependecy with AssertJ methods 2018-12-21 09:10:23 -05:00
Artem Bilan
93d7c58b64 Enable ModifierOrderCheck Checkstyle rule (#2673)
* Enable ModifierOrderCheck Checkstyle rule

* Fix violations for `static` and `abstract` modifier
* Remove redundant code in the `TcpNioConnection`
* Mark `connectionFactoryName` as `@Nullable` in the `TcpConnectionSupport`
ctor and its inheritors
* Fix some smells according IDEA suggestions in the affected classes
* This should fix some Sonar smells as well

* * Fix `HeaderMapperTests`

* * Polishing `TcpConnection` code style and fix Javdocs
2018-12-20 19:19:47 -05:00
Artem Bilan
648aeb8e96 Unable ImportOrder Checkstyle rule for tests
* Fix wrong import order in tests
* Polishing for not closed application contexts
* Use diamonds
* Use proper assertion operators
* Remove redundant classes
* Improve performance in JPA tests
* Fix typos
2018-11-07 15:32:31 -05:00
Artem Bilan
674d5adfc0 INT-4114: Add missed <poller> to XSDs
JIRA: https://jira.spring.io/browse/INT-4114
2018-10-26 13:51:18 -04:00