diff --git a/org.springframework.integration.mail/src/test/java/org/springframework/integration/mail/SubscribableMailSourceTests.java b/org.springframework.integration.mail/src/test/java/org/springframework/integration/mail/SubscribableMailSourceTests.java index 13f16ec8e1..246e6ab094 100644 --- a/org.springframework.integration.mail/src/test/java/org/springframework/integration/mail/SubscribableMailSourceTests.java +++ b/org.springframework.integration.mail/src/test/java/org/springframework/integration/mail/SubscribableMailSourceTests.java @@ -26,10 +26,11 @@ import javax.mail.internet.MimeMessage; import org.easymock.classextension.EasyMock; import org.junit.Test; +import org.springframework.core.task.SimpleAsyncTaskExecutor; import org.springframework.integration.channel.QueueChannel; import org.springframework.integration.message.Message; +import org.springframework.integration.scheduling.SimpleTaskScheduler; import org.springframework.integration.scheduling.TaskScheduler; -import org.springframework.integration.util.TestUtils; /** * @author Jonas Partner @@ -41,7 +42,7 @@ public class SubscribableMailSourceTests { javax.mail.Message message = EasyMock.createMock(MimeMessage.class); StubFolderConnection folderConnection = new StubFolderConnection(message); QueueChannel channel = new QueueChannel(); - TaskScheduler scheduler = TestUtils.createTaskScheduler(5); + TaskScheduler scheduler = new SimpleTaskScheduler(new SimpleAsyncTaskExecutor()); scheduler.start(); ListeningMailSource mailSource = new ListeningMailSource(folderConnection); mailSource.setTaskScheduler(scheduler); diff --git a/org.springframework.integration/src/main/java/org/springframework/integration/scheduling/CronSequenceGenerator.java b/org.springframework.integration/src/main/java/org/springframework/integration/scheduling/CronSequenceGenerator.java index 56cb676f32..6e6c07b9a7 100644 --- a/org.springframework.integration/src/main/java/org/springframework/integration/scheduling/CronSequenceGenerator.java +++ b/org.springframework.integration/src/main/java/org/springframework/integration/scheduling/CronSequenceGenerator.java @@ -63,7 +63,7 @@ public class CronSequenceGenerator { /** * Construct a {@link CronSequenceGenerator} from the pattern provided. * - * @param pattern a single space separated list of time fields + * @param pattern a space separated list of time fields * * @throws IllegalArgumentException if the pattern cannot be parsed */ @@ -175,7 +175,7 @@ public class CronSequenceGenerator { * @param expression */ private void parse(String expression) throws IllegalArgumentException { - String[] fields = StringUtils.delimitedListToStringArray(expression, " "); + String[] fields = StringUtils.tokenizeToStringArray(expression, " "); if (fields.length != 6) { throw new IllegalArgumentException(String.format("Expression must consist of 6 fields (found %d in %s)", fields.length, expression));