7933 Commits

Author SHA1 Message Date
Spring Operator
be8d31c1f6 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 2075 occurrences migrated to:
  https://www.apache.org/licenses/LICENSE-2.0 ([https](https://www.apache.org/licenses/LICENSE-2.0) result 200).
2019-03-22 12:30:40 -04:00
Spring Operator
d614fa8f84 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://docs.oracle.com/javaee/6/api/ with 1 occurrences migrated to:
  https://docs.oracle.com/javaee/6/api/ ([https](https://docs.oracle.com/javaee/6/api/) result 200).
* http://docs.oracle.com/javase/7/docs/api/ with 1 occurrences migrated to:
  https://docs.oracle.com/javase/7/docs/api/ ([https](https://docs.oracle.com/javase/7/docs/api/) result 200).
* http://docs.spring.io/spring-amqp/docs/current/api/ with 1 occurrences migrated to:
  https://docs.spring.io/spring-amqp/docs/current/api/ ([https](https://docs.spring.io/spring-amqp/docs/current/api/) result 200).
* http://docs.spring.io/spring-data-gemfire/docs/current/api/ with 1 occurrences migrated to:
  https://docs.spring.io/spring-data-gemfire/docs/current/api/ ([https](https://docs.spring.io/spring-data-gemfire/docs/current/api/) result 200).
* http://docs.spring.io/spring-data/data-mongo/docs/current/api/ with 1 occurrences migrated to:
  https://docs.spring.io/spring-data/data-mongo/docs/current/api/ ([https](https://docs.spring.io/spring-data/data-mongo/docs/current/api/) result 200).
* http://docs.spring.io/spring-data/data-redis/docs/current/api/ with 1 occurrences migrated to:
  https://docs.spring.io/spring-data/data-redis/docs/current/api/ ([https](https://docs.spring.io/spring-data/data-redis/docs/current/api/) result 200).
* http://docs.spring.io/spring-social-twitter/docs/current/apidocs/ with 1 occurrences migrated to:
  https://docs.spring.io/spring-social-twitter/docs/current/apidocs/ ([https](https://docs.spring.io/spring-social-twitter/docs/current/apidocs/) result 200).
* http://docs.spring.io/spring-ws/sites/2.0/apidocs/ with 1 occurrences migrated to:
  https://docs.spring.io/spring-ws/sites/2.0/apidocs/ ([https](https://docs.spring.io/spring-ws/sites/2.0/apidocs/) result 200).
* http://docs.spring.io/spring/docs/current/javadoc-api/ with 1 occurrences migrated to:
  https://docs.spring.io/spring/docs/current/javadoc-api/ ([https](https://docs.spring.io/spring/docs/current/javadoc-api/) result 200).
* http://spring.io with 1 occurrences migrated to:
  https://spring.io ([https](https://spring.io) result 200).
* http://www.apache.org/licenses/LICENSE-2.0.txt with 1 occurrences migrated to:
  https://www.apache.org/licenses/LICENSE-2.0.txt ([https](https://www.apache.org/licenses/LICENSE-2.0.txt) result 200).
2019-03-16 12:51:42 -04:00
Artem Bilan
8e66e53576 More JMX tests polishing 2017-04-24 17:54:59 -04:00
Artem Bilan
fb517dbba6 Add @DirtiesContext for some JMX tests
https://build.spring.io/browse/INT-B41X-121/
2017-04-24 17:17:45 -04:00
Gary Russell
83f6c9e86f Update to Gradle 2.14 2017-04-17 10:34:55 -04:00
Gary Russell
7aa833478e Minimal Gradle Upgrade to 2.3 for CI 2017-04-16 20:36:03 -04:00
Gary Russell
005119784f Increase Timeout for Promise Test 2017-04-16 13:18:29 -04:00
Spring Buildmaster
c1649fd8fa [artifactory-release] Next development version 2016-07-25 23:28:06 +00:00
Spring Buildmaster
979e8bc038 [artifactory-release] Release version 4.1.9.RELEASE 2016-07-25 23:28:00 +00:00
Artem Bilan
b9e51088d6 INT-4067: Cover empty file case in FileSplitter
JIRA: https://jira.spring.io/browse/INT-4067

When `FileSplitter` is configured with `markers = true` and file is empty, an `iterator` for file throws `IOException: Stream closed`,
because we close the `buffer` just after the first `readLine()` attempt, but still return `true` from the first `hasNext()` call
where the `this.sof` and `this.eof` are `true` for markers.

Add logic to mark internal splitter `iterator` as `done` where we don't have content and still in `sof` state.
2016-07-11 14:39:12 +01:00
Artem Bilan
2090aade05 INT-4046: Add FtpRemoteFileTemplate.ExistsMode
JIRA: https://jira.spring.io/browse/INT-4046

Since not all FTP servers provide proper `STAT` command implementation,
plus the `NLIST` doesn't work properly for directories cases, introduce the `FtpRemoteFileTemplate.ExistsMode`
to let:
* to perform `STAT` by default (previous) behavior;
* to switch to `NLIST` for `FtpRemoteFileTemplate` internal use;
* perform the full `NLIST` and `FTPClient.changeWorkingDirectory()` algorithm if needed.

* Improve (S)Ftp components to use proper `RemoteFileTemplate` for internal instantiation
* Introduce `FtpMessageHandler` to wrap `FtpRemoteFileTemplate` with the proper `NLIST` `ExistsMode`
* Cover `NLIST` switching from the `FtpOutboundChannelAdapterParser` and `FtpOutboundGatewayParser`
* Document the `FtpRemoteFileTemplate.ExistsMode`

* Fix typo in the recently introduced `RemoteFileOperations.getSession()` method name
* Add JavaDoc to `Session.exists()`
* Add `NLIST` support for the `FtpSession.exists()` to meet the API requirements

**Cherry-pick to 4.2.x and 4.1.x**

Addressing PR comments

Doc Polishing

Conflicts:
	spring-integration-file/src/main/java/org/springframework/integration/file/remote/AbstractRemoteFileStreamingMessageSource.java
	spring-integration-file/src/main/java/org/springframework/integration/file/remote/RemoteFileOperations.java
	spring-integration-file/src/main/java/org/springframework/integration/file/remote/RemoteFileTemplate.java
	spring-integration-ftp/src/main/java/org/springframework/integration/ftp/session/FtpSession.java
	spring-integration-ftp/src/test/java/org/springframework/integration/ftp/config/FtpOutboundChannelAdapterParserTests.java
	spring-integration-sftp/src/main/java/org/springframework/integration/sftp/gateway/SftpOutboundGateway.java
	spring-integration-sftp/src/main/java/org/springframework/integration/sftp/outbound/SftpMessageHandler.java
	spring-integration-sftp/src/main/java/org/springframework/integration/sftp/outbound/package-info.java

Conflicts:
	spring-integration-ftp/src/main/java/org/springframework/integration/ftp/gateway/FtpOutboundGateway.java
	spring-integration-sftp/src/main/java/org/springframework/integration/sftp/gateway/SftpOutboundGateway.java
2016-06-08 16:18:41 -04:00
Artem Bilan
b68d3630e8 Remove JsonConverterCompatibilityTests
The test isn't compatible with `4.2.x` and `4.1.x` and its purpose is demonstration.
Therefore only the `master` version is enough.
(cherry picked from commit f6d6fc9)
2016-06-06 16:24:37 -04:00
Gary Russell
222bc95a69 INT-4045: Fix NPE in ObjectToJsonTransformer
JIRA: https://jira.spring.io/browse/INT-4045

Handle the situation when the first element of a container type (or map)
is null; set the generic type of the container to `Object`.

Also, clarify how the compatibility between the transformer and Spring AMQP
message converter is achieved.
(cherry picked from commit 2650aef)
(cherry picked from commit d5e753c)
2016-06-06 16:17:29 -04:00
Gary Russell
29d9401104 INT-4043: Fix ExecutorChannel with datatypes Attr.
JIRA: https://jira.spring.io/browse/INT-4043

The `ExecutorChannel` overrides `onInit()` but fails to call the super
which is where the message converter for datatype conversion is set up.

Also, when Jackson is not on the class path and there are no converters in the
context, the default integration conversion service is not registered.

The `DefaultDatatypeChannelMessageConverter` overwites its default conversion
service with this bean, unconditionally - setting it to null in this case.

Check for a null conversion service before replacing the default.

* Polishing according PR comments
(cherry picked from commit dae1a01)
2016-06-03 14:37:35 -04:00
Artem Bilan
7d5371e76c Restore DelayHandler.expressionParser property
(cherry picked from commit f67fdb2)
2016-04-20 16:33:51 -04:00
Artem Bilan
7564f1c32a INT-3999: Avoid "hard" References from Futures
JIRA: https://jira.spring.io/browse/INT-3999

Since the scheduled tasks may live for a long time it can finish
with the `OutOfMemory` if we use the direct reference to big objects, like `Message<?>`.

* Fix `AbstractCorrelatingMessageHandler` to deal only with the `groupId`
from the `scheduleGroupToForceComplete()` when we `schedule` `Runnable` for the `forceRelease` logic.
* Fix `DelayHandler` to deal only with `messageId` in the `releaseMessageAfterDelay()`, when we
`schedule` `Runnable` for the `releaseMessageAfterDelay`.
* Since the logic hasn't been changed for those components, there is no any new test.
There is just enough to be sure that all existing tests are fine.

**Cherry-pick to 4.0.x, 4.1.x, 4.2.x**

Optimise the release task for the `SimpleMessageStore` case

Conflicts:
	spring-integration-core/src/main/java/org/springframework/integration/aggregator/AbstractCorrelatingMessageHandler.java
2016-04-20 16:13:51 -04:00
Artem Bilan
47cff60384 INT-3950: Fix Aggregator documentation
JIRA: https://jira.spring.io/browse/INT-3950

Previously there was a mention of the `MessageGroupStore.expireMessageGroup(groupId)` which just doesn't existing
in the Framework and never has been there.

* Fix the documentation for the existing `MessageGroupStore.expireMessageGroups(timeout)`.
Although the mention there of `Control Bus` requires to have `@ManagedOperation` on the method.

* Add `@ManagedOperation` for the `MessageGroupStore.expireMessageGroups(timeout)` and confirm with the test-case: `AggregatorWithMessageStoreParserTests`
* Fix the same docs in the XSD for `<aggregator>`
* Fix other typos in the `aggregator.adoc` and `resequencer.adoc`

Conflicts:
	spring-integration-core/src/main/java/org/springframework/integration/store/AbstractMessageGroupStore.java

Conflicts:
	spring-integration-core/src/main/java/org/springframework/integration/store/AbstractMessageGroupStore.java
	src/reference/asciidoc/aggregator.adoc
	src/reference/asciidoc/resequencer.adoc
2016-02-08 11:59:51 -05:00
Spring Buildmaster
196551c64c [artifactory-release] Next development version 2015-12-16 10:27:25 -08:00
Spring Buildmaster
3165a3ecd2 [artifactory-release] Release version 4.1.8.RELEASE 2015-12-16 10:27:19 -08:00
Gary Russell
c3bb695341 INT-3915: Possible Memory Leak in FileChannelCache
JIRA: https://jira.spring.io/browse/INT-3915

Close the redundant `FileChannel` when Map collision occurs.
(cherry picked from commit b5ec73b)
(cherry picked from commit ff18530)
2015-12-15 19:56:31 -05:00
Artem Bilan
a91518c97b INT-3907: Downgrade to Kryo-2.22
JIRA: https://jira.spring.io/browse/INT-3907

The IO-1.1.x is based on the Kryo-2.22 and can't be upgraded to 3.0.
Therefore we should downgrade.

* Change `PojoCodec` to use `StdInstantiatorStrategy` directly, because the `DefaultInstantiatorStrategy` logic is as a core code of `Kryo`.
* Introduce `org.springframework.integration.codec.kryo.pool` package and copy/paste `com.esotericsoftware.kryo.pool` classes,
 since they have been introduced since Kryo-3.0.
* That copy/paste seemed to me the simplest fix, since the `KryoPool` logic is encapsulated in the `AbstractKryoCodec`
2015-12-15 13:15:39 -05:00
Artem Bilan
2dfdfee95e INT-3908: Fix NPE in the AbstractAggrMGProcessor
JIRA: https://jira.spring.io/browse/INT-3908

**Cherry-pick to ALL**
2015-12-14 12:56:42 -05:00
Artem Bilan
70b3d8f98c INT-3904: Fix NPE in the JsonPropertyAccessor
JIRA: https://jira.spring.io/browse/INT-3904

When we use the same expression several times, the SpEL engine cache an `accessor` after the first use.
The next evaluation just bypass `canRead()` and in case of JSON that mean that we don't check that the income has the field or not.
For this case the `read()` must return `TypedValue.NULL` instead of just `null`.
2015-12-08 15:59:54 -05:00
Artem Bilan
d78cf3160b INT-3893: UnicastReceivingChannelAdapter: fix NPE
JIRA: https://jira.spring.io/browse/INT-3893

Polishing

Send on the calling thread if the executor is shut down.
2015-11-20 10:53:53 -05:00
Gary Russell
95333a276a INT-3885: Fix JMS Outbound Gateway Concurrency
JIRA: https://jira.spring.io/browse/INT-3885

Possible dropped reply, causing timeout.

WARN org.springframework.integration.jms.JmsOutboundGateway#1.replyListener-1 jms.JmsOutboundGateway:1202
    - Failed to consume reply with correlationId 164a49bf-c41d-4c0b-b012-55deecf001d1_2
      java.lang.RuntimeException: No sender waiting for reply

- Reproduced by running the test in a loop
- Cleaned up test to aid debugging - capture a unique message at each stage
- Added additional debug logging to th gateway

Polishing
(cherry picked from commit f1bd6e3)
2015-11-13 12:24:49 -05:00
Artem Bilan
482bf1bdee INT-3871: Fix NPE in the JsonPropertyAccessor
JIRA: https://jira.spring.io/browse/INT-3871

**Cherry-pick to 4.1.x, 4.0.x, 3.0.x**
2015-11-10 11:29:58 -05:00
Gary Russell
8d2b278c93 Fix Stomp Test Race Condition
Message producers are started in phase `Integer.MAX_INT / 2`.

The test case has a stomp inbound adapter and an event producer.

Since they are both in the same phase, the event producer can miss the `StompReceiptEvent`.

Change the phase of the event producer to ensure it is started before other message producers.
(cherry picked from commit 1107bfa)
2015-11-10 10:52:20 -05:00
Gary Russell
2a04536f0a MQTT: Possible NPE
Examining the code revealed a possible (but improbable) NPE.

Checking the connection was disjoint from the publish; encapsulate the check within publish.
Synchronize the connectionLost method so it can't null the client while it is being checked.

Add `@SuppressWarnings("deprecation")` on the deprecated `connectIfNeeded()` usage.
(cherry picked from commit f5fa979)
2015-11-09 18:37:00 -05:00
Spring Buildmaster
e0c7e5d8e2 [artifactory-release] Next development version 2015-10-27 07:24:00 -07:00
Spring Buildmaster
5bd25a69ec [artifactory-release] Release version 4.1.7.RELEASE 2015-10-27 07:23:54 -07:00
Gary Russell
844c1d41f2 Bump Spring Project Versions 2015-10-27 09:49:12 -04:00
Spring Buildmaster
de084fd30d [artifactory-release] Next development version 2015-10-27 06:06:47 -07:00
Spring Buildmaster
96249e5713 [artifactory-release] Release version 4.1.7.RELEASE 2015-10-27 06:06:42 -07:00
Artem Bilan
59f8a0cdf2 INT-3859: Fix NPE in the ImapMailReceiver
JIRA: https://jira.spring.io/browse/INT-3859

The Java Mail `MessageCache.getMessageBySeqnum()` has the code:
````java
if (msgnum < 0) {		// XXX - < 1 ?
    if (logger.isLoggable(Level.FINE))
	logger.fine("no message seqnum " + seqnum);
        return null;
}
````
about which the `IMAPFolder.search` doesn't care:
````java
matchMsgs[i] = getMessageBySeqNumber(matches[i]);
````
therefore pops `null`s to the top for the `ImapMailReceiver`

* Fix `NPE` filtering the `Message[]` from `null` items

Note: its enough difficult to reproduce it because it isn't clear how we can end up with:
````java
if (seqnums[msgnum-1] > seqnum)
		break;		// message doesn't exist
````

in the `MessageCache`.
That's why there is no test-cases on the matter.

**Cherry-pick to 4.1.x**

Polishing

- Only create a new array if needed.
- Add a test case
2015-10-22 17:15:27 -04:00
Artem Bilan
346e8c63c7 INT-3853: Fix ${} resolution for Ann & XML mix
JIRA: https://jira.spring.io/browse/INT-3853

Previously the placeholder definitions for the Messaging Annotation weren't be resolved
if we use `<context:property-placeholder>` instead of `@PropertySource`.

Fix `MessagingAnnotationPostProcessor` and its "kindergarten" to use
`beanFactory.resolveEmbeddedValue()` instead of `environment.resolvePlaceholders()`.

**Cherry-pick to 4.0.x**
2015-10-20 18:09:05 -04:00
Gary Russell
b2eda2e32d INT-3851: Docs - Fix Typo
JIRA: https://jira.spring.io/browse/INT-3851
2015-10-12 09:17:32 -04:00
Artem Bilan
69a8b3e81c INT-3850: Fix SpEL usage in the CacheWritingMH
JIRA: https://jira.spring.io/browse/INT-3850

**Cherry-pick to 4.1.x, 4.0.x, 3.0.x**

Conflicts:
	spring-integration-gemfire/src/test/java/org/springframework/integration/gemfire/outbound/CacheWritingMessageHandlerTests.java
Resolved.
2015-10-09 13:00:22 -04:00
Artem Bilan
20e37fa031 INT-3848: ERROR log for the null beanName
JIRA: https://jira.spring.io/browse/INT-3848

When the `ConsumerEndpointFactoryBean` is created programmatically
the `beanName` property may be missed and the `catch` for the `NPE`
just hides an issue with the `DEBUG` log message.

Add check for the `null` on the `bean` and log the issue on ERROR level.

**Cherry-pick to the 4.1.x, 4.0.x and 3.0.x**
2015-10-07 12:52:41 -04:00
Artem Bilan
750c3d1cd1 INT-3842: Backport NPE Fix for the AmqpInGateway
JIRA: https://jira.spring.io/browse/INT-3842
2015-10-07 12:46:31 -04:00
Artem Bilan
e06d9a697a INT-3841: Fix NPE in the AmqpChannelFactoryBean
JIRA: https://jira.spring.io/browse/INT-3841

Previously the `isPubSub` was as `Boolean` object and `null` by default.
Convert it to the primitive to achieve the `false` logic by default as expected.

INT-3841: Fix New Test

New test channel remains as a listener on the connection factory.
2015-10-07 10:49:20 -04:00
Gary Russell
9dae2c1088 INT-3840: Fix Backport 2015-10-01 09:46:30 -04:00
Artem Bilan
9074c7f07b INT-3840: Fix RollbackLocalFilterTests
JIRA: https://jira.spring.io/browse/INT-3840

* In addition: fix some typos in the `SftpInboundRemoteFileSystemSynchronizerTests`

**Cherry-pick to 4.1.x**
2015-10-01 09:42:07 -04:00
Gary Russell
474427926d INT-3827: Fix Test Case 2015-09-29 16:22:17 -04:00
Gary Russell
00bd41f8fd (S)FTP Test Cleanup
Stop contexts.
2015-09-29 15:30:19 -04:00
Gary Russell
32af29184f INT-3827: Fix Backport 2015-09-29 14:42:38 -04:00
Artem Bilan
6e838b50ab INT-3827: ResettableFileListFilter
JIRA: https://jira.spring.io/browse/INT-3827

Provide a hook to enable removing a file from an `AcceptOnceFileListFilter`,
for example after a message processing failure.

Make the `CompositeFileListFilter` a `ReversibleFileListFilter` so it can
delegate to any of its composed filters that are reversible.

INT-3827: Polishing - PR Comments
(cherry picked from commit 0d721739e9)

Conflicts:
	src/reference/asciidoc/ftp.adoc
	src/reference/asciidoc/sftp.adoc
2015-09-29 14:03:42 -04:00
Gary Russell
10ae8a7aff INT-3835: Fix ERROR_CHANNEL Constant in Reference
JIRA: https://jira.spring.io/browse/INT-3835
2015-09-29 13:49:13 -04:00
Gary Russell
28879dc539 INT-3837: TCP GW - Propagate Socket Timeout
JIRA: https://jira.spring.io/browse/INT-3837

INT-3103 introduced exception propagation to waiting gateway threads.

However, `SocketTimeoutException`s were not propagated (in all cases
since 4.2 and for single-use sockets since 3.0).

Conflicts:
	spring-integration-ip/src/test/java/org/springframework/integration/ip/tcp/TcpOutboundGatewayTests.java

Resolved.
2015-09-28 10:19:11 -04:00
Artem Bilan
eafdd1ce4e INT-3797-4.1.x: Fix SFTP doc for the CachingSF
JIRA: https://jira.spring.io/browse/INT-3797
2015-08-14 11:19:50 -04:00
Gary Russell
d95b5c9d71 INT-3801: TCP Server Fix NPE with Early Stop
JIRA: https://jira.spring.io/browse/INT-3801

NPE if the server is stopped before it fully started.

Also fix SOLinger tests.

Fix `ConnectionFactoryTests` for Java < 8 compatibility

Fix cherry-picking conflicts
2015-08-13 20:57:25 -04:00