trivial performance tweak

This commit is contained in:
Iwein Fuld
2009-02-23 19:36:35 +00:00
parent a0da740a3d
commit dac5c41712

View File

@@ -136,7 +136,7 @@ public class FileReadingMessageSource implements MessageSource<File> {
public Message<File> receive() throws MessagingException {
Message<File> message = null;
// rescan only if needed or explicitly configured
if (toBeReceived.isEmpty() || scanEachPoll) {
if (scanEachPoll || toBeReceived.isEmpty()) {
scanInputDirectory();
}
File file = toBeReceived.poll();