From 5eef58e9df1c62d167050124f042bacbe09e7fc1 Mon Sep 17 00:00:00 2001 From: Mark Fisher Date: Mon, 17 Jan 2011 14:50:47 -0500 Subject: [PATCH] modified assert error to 'must not be empty' rather than null for hasText(..) check --- .../file/remote/handler/FileTransferringMessageHandler.java | 5 +++-- .../remote/synchronizer/AbstractInboundFileSynchronizer.java | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/spring-integration-file/src/main/java/org/springframework/integration/file/remote/handler/FileTransferringMessageHandler.java b/spring-integration-file/src/main/java/org/springframework/integration/file/remote/handler/FileTransferringMessageHandler.java index e34b118da9..01bcbf3897 100644 --- a/spring-integration-file/src/main/java/org/springframework/integration/file/remote/handler/FileTransferringMessageHandler.java +++ b/spring-integration-file/src/main/java/org/springframework/integration/file/remote/handler/FileTransferringMessageHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2010 the original author or authors. + * Copyright 2002-2011 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -64,8 +64,9 @@ public class FileTransferringMessageHandler extends AbstractMessageHandler { this.sessionFactory = sessionFactory; } + public void setRemoteFileSeparator(String remoteFileSeparator) { - Assert.hasText(remoteFileSeparator, "'remoteFileSeparator' must not be null"); + Assert.hasText(remoteFileSeparator, "'remoteFileSeparator' must not be empty"); this.remoteFileSeparator = remoteFileSeparator; } diff --git a/spring-integration-file/src/main/java/org/springframework/integration/file/remote/synchronizer/AbstractInboundFileSynchronizer.java b/spring-integration-file/src/main/java/org/springframework/integration/file/remote/synchronizer/AbstractInboundFileSynchronizer.java index 00597b618b..7e241b47e6 100644 --- a/spring-integration-file/src/main/java/org/springframework/integration/file/remote/synchronizer/AbstractInboundFileSynchronizer.java +++ b/spring-integration-file/src/main/java/org/springframework/integration/file/remote/synchronizer/AbstractInboundFileSynchronizer.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2010 the original author or authors. + * Copyright 2002-2011 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -88,8 +88,9 @@ public abstract class AbstractInboundFileSynchronizer implements InboundFileS this.sessionFactory = sessionFactory; } + public void setRemoteFileSeparator(String remoteFileSeparator) { - Assert.hasText(remoteFileSeparator, "'remoteFileSeparator' must not be null"); + Assert.hasText(remoteFileSeparator, "'remoteFileSeparator' must not be empty"); this.remoteFileSeparator = remoteFileSeparator; }