checkstyle MutableException
checkstyle EmptyBlock checkstyle fixRightCurly Script checkstyle EmptyStatement checkstyle RightCurly checkstyle TailingWhite checkstyle NeedBraces Fix the line separator in the `fixRightCurly.gradle`
This commit is contained in:
committed by
Artem Bilan
parent
c0b19e61b5
commit
842aded9a4
@@ -19,7 +19,7 @@ package org.springframework.integration.mail;
|
||||
/**
|
||||
* Pre-defined header names to be used for setting and/or retrieving Mail
|
||||
* Message attributes from/to integration Message Headers.
|
||||
*
|
||||
*
|
||||
* @author Mark Fisher
|
||||
*/
|
||||
public abstract class MailHeaders {
|
||||
@@ -41,7 +41,7 @@ public abstract class MailHeaders {
|
||||
public static final String MULTIPART_MODE = PREFIX + "multipartMode";
|
||||
|
||||
public static final String ATTACHMENT_FILENAME = PREFIX + "attachmentFilename";
|
||||
|
||||
|
||||
public static final String CONTENT_TYPE = PREFIX + "contentType";
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2015 the original author or authors.
|
||||
* Copyright 2002-2016 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.
|
||||
@@ -199,7 +199,8 @@ public class MailSendingMessageHandler extends AbstractMessageHandler {
|
||||
if (value != null) {
|
||||
if (value instanceof String[]) {
|
||||
returnedHeaders = (String[]) value;
|
||||
} else if (value instanceof String) {
|
||||
}
|
||||
else if (value instanceof String) {
|
||||
returnedHeaders = StringUtils.commaDelimitedListToStringArray((String) value);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ import org.springframework.util.Assert;
|
||||
/**
|
||||
* A {@link MailReceiver} implementation that polls a mail server using the
|
||||
* POP3 protocol.
|
||||
*
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
* @author Mark Fisher
|
||||
*/
|
||||
|
||||
@@ -20,7 +20,7 @@ import org.springframework.integration.config.xml.AbstractIntegrationNamespaceHa
|
||||
|
||||
/**
|
||||
* Namespace handler for the 'mail' namespace.
|
||||
*
|
||||
*
|
||||
* @author Mark Fisher
|
||||
*/
|
||||
public class MailNamespaceHandler extends AbstractIntegrationNamespaceHandler {
|
||||
|
||||
@@ -30,8 +30,8 @@ import org.springframework.util.Assert;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
/**
|
||||
* Parser for the <outbound-channel-adapter/> element of the 'mail' namespace.
|
||||
*
|
||||
* Parser for the <outbound-channel-adapter/> element of the 'mail' namespace.
|
||||
*
|
||||
* @author Mark Fisher
|
||||
*/
|
||||
public class MailOutboundChannelAdapterParser extends AbstractOutboundChannelAdapterParser {
|
||||
@@ -66,7 +66,7 @@ public class MailOutboundChannelAdapterParser extends AbstractOutboundChannelAda
|
||||
}
|
||||
IntegrationNamespaceUtils.setReferenceIfAttributeDefined(
|
||||
mailSenderBuilder, element, "java-mail-properties", "javaMailProperties");
|
||||
|
||||
|
||||
String mailSenderBeanName = BeanDefinitionReaderUtils.registerWithGeneratedName(
|
||||
mailSenderBuilder.getBeanDefinition(), parserContext.getRegistry());
|
||||
builder.addConstructorArgReference(mailSenderBeanName);
|
||||
|
||||
@@ -25,7 +25,7 @@ import org.springframework.integration.config.xml.IntegrationNamespaceUtils;
|
||||
|
||||
/**
|
||||
* Parser for the <mail-to-string-transformer> element.
|
||||
*
|
||||
*
|
||||
* @author Mark Fisher
|
||||
*/
|
||||
public class MailToStringTransformerParser extends AbstractTransformerParser {
|
||||
|
||||
@@ -808,7 +808,8 @@ public class ImapMailReceiverTests {
|
||||
public void run(){
|
||||
try {
|
||||
receiver.receive();
|
||||
} catch (javax.mail.MessagingException e) {
|
||||
}
|
||||
catch (javax.mail.MessagingException e) {
|
||||
if (e.getCause() instanceof NullPointerException){
|
||||
e.printStackTrace();
|
||||
failed.getAndIncrement();
|
||||
@@ -823,7 +824,8 @@ public class ImapMailReceiverTests {
|
||||
public void run(){
|
||||
try {
|
||||
receiver.destroy();
|
||||
} catch (Exception ignore) {
|
||||
}
|
||||
catch (Exception ignore) {
|
||||
// ignore
|
||||
ignore.printStackTrace();
|
||||
}
|
||||
@@ -918,7 +920,7 @@ public class ImapMailReceiverTests {
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
}
|
||||
ImapMailReceiver receiver = new TestReceiver();
|
||||
Message[] received = receiver.receive();
|
||||
assertEquals(1, received.length);
|
||||
|
||||
@@ -145,7 +145,7 @@ public class MailSendingMessageHandlerContextTests {
|
||||
catch (Exception e) {
|
||||
assertThat(e, instanceOf(MessageHandlingException.class));
|
||||
assertThat(e.getCause(), instanceOf(IllegalStateException.class));
|
||||
assertThat(e.getMessage(),
|
||||
assertThat(e.getMessage(),
|
||||
containsString("this adapter requires a 'JavaMailSender' to send a 'MimeMailMessage'"));
|
||||
}
|
||||
|
||||
@@ -159,7 +159,7 @@ public class MailSendingMessageHandlerContextTests {
|
||||
catch (Exception e) {
|
||||
assertThat(e, instanceOf(MessageHandlingException.class));
|
||||
assertThat(e.getCause(), instanceOf(IllegalStateException.class));
|
||||
assertThat(e.getMessage(),
|
||||
assertThat(e.getMessage(),
|
||||
containsString("this adapter requires a 'JavaMailSender' to send a 'MimeMailMessage'"));
|
||||
}
|
||||
|
||||
@@ -170,7 +170,7 @@ public class MailSendingMessageHandlerContextTests {
|
||||
catch (Exception e) {
|
||||
assertThat(e, instanceOf(MessageHandlingException.class));
|
||||
assertThat(e.getCause(), instanceOf(IllegalStateException.class));
|
||||
assertThat(e.getMessage(),
|
||||
assertThat(e.getMessage(),
|
||||
containsString("this adapter requires a 'JavaMailSender' to send a 'MimeMailMessage'"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ import org.springframework.mail.SimpleMailMessage;
|
||||
* @author Marius Bogoevici
|
||||
* @author Oleg Zhurakousky
|
||||
*/
|
||||
public class MailSendingMessageHandlerTests {
|
||||
public class MailSendingMessageHandlerTests {
|
||||
|
||||
private MailSendingMessageHandler handler;
|
||||
|
||||
@@ -50,7 +50,7 @@ public class MailSendingMessageHandlerTests {
|
||||
this.mailSender = new StubJavaMailSender(new MimeMessage((Session) null));
|
||||
this.handler = new MailSendingMessageHandler(this.mailSender);
|
||||
}
|
||||
|
||||
|
||||
@After
|
||||
public void reset() {
|
||||
this.mailSender.reset();
|
||||
|
||||
Reference in New Issue
Block a user