diff --git a/spring-integration-core/src/main/java/org/springframework/integration/router/AbstractSingleChannelNameRouter.java b/spring-integration-core/src/main/java/org/springframework/integration/router/AbstractSingleChannelNameRouter.java
index 3923f88f0d..ec5e5a84ca 100644
--- a/spring-integration-core/src/main/java/org/springframework/integration/router/AbstractSingleChannelNameRouter.java
+++ b/spring-integration-core/src/main/java/org/springframework/integration/router/AbstractSingleChannelNameRouter.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2008 the original author or authors.
+ * Copyright 2002-2010 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.
@@ -22,7 +22,7 @@ import java.util.List;
import org.springframework.integration.Message;
/**
- * Extends {@link AbstractChannelNameResolvingMessageRouter} to support router
+ * Extends {@link AbstractMessageRouter} to support router
* implementations that always return a single channel name (or null).
*
* @author Mark Fisher
diff --git a/spring-integration-core/src/main/java/org/springframework/integration/router/RecipientListRouter.java b/spring-integration-core/src/main/java/org/springframework/integration/router/RecipientListRouter.java
index ee0ea2cdf1..543b003bf2 100644
--- a/spring-integration-core/src/main/java/org/springframework/integration/router/RecipientListRouter.java
+++ b/spring-integration-core/src/main/java/org/springframework/integration/router/RecipientListRouter.java
@@ -41,7 +41,7 @@ import org.springframework.util.Assert;
*
* For more advanced, programmatic control
* of dynamic recipient lists, consider using the @Router annotation or
- * extending {@link AbstractChannelNameResolvingMessageRouter} instead.
+ * extending {@link AbstractMessageRouter} instead.
*
* Contrary to a standard <router .../> this handler will try to send to all channels that are configured as
* recipients. It is to channels what a publish subscribe channel is to endpoints.
diff --git a/spring-integration-file/src/main/java/org/springframework/integration/file/FileReadingMessageSource.java b/spring-integration-file/src/main/java/org/springframework/integration/file/FileReadingMessageSource.java
index 9c2591ee97..6ef2147ea6 100644
--- a/spring-integration-file/src/main/java/org/springframework/integration/file/FileReadingMessageSource.java
+++ b/spring-integration-file/src/main/java/org/springframework/integration/file/FileReadingMessageSource.java
@@ -31,6 +31,7 @@ import org.springframework.integration.MessagingException;
import org.springframework.integration.aggregator.ResequencingMessageGroupProcessor;
import org.springframework.integration.context.IntegrationObjectSupport;
import org.springframework.integration.core.MessageSource;
+import org.springframework.integration.file.filters.AcceptOnceFileListFilter;
import org.springframework.integration.file.filters.FileListFilter;
import org.springframework.integration.support.MessageBuilder;
import org.springframework.util.Assert;
@@ -38,22 +39,19 @@ import org.springframework.util.Assert;
/**
* {@link MessageSource} that creates messages from a file system directory. To
* prevent messages for certain files, you may supply a
- * {@link org.springframework.integration.file.filters.FileListFilter}. By
+ * {@link FileListFilter}. By
* default, an
- * {@link org.springframework.integration.file.entries.AcceptOnceEntryFileListFilter}
+ * {@link AcceptOnceFileListFilter}
* is used. It ensures files are picked up only once from the directory.
*
* A common problem with reading files is that a file may be detected before it
* is ready. The default
- * {@link org.springframework.integration.file.entries.AcceptOnceEntryFileListFilter}
+ * {@link AcceptOnceEntryFileListFilter}
* does not prevent this. In most cases, this can be prevented if the
* file-writing process renames each file as soon as it is ready for reading. A
* pattern-matching filter that accepts only files that are ready (e.g. based on
- * a known suffix), composed with the default
- * {@link org.springframework.integration.file.entries.AcceptOnceEntryFileListFilter}
- * would allow for this. See
- * {@link org.springframework.integration.file.entries.CompositeEntryListFilter}
- * for a way to do this.
+ * a known suffix), composed with the default {@link AcceptOnceFileListFilter}
+ * would allow for this.
*
* A {@link Comparator} can be used to ensure internal ordering of the Files in
* a {@link PriorityBlockingQueue}. This does not provide the same guarantees as
diff --git a/spring-integration-file/src/main/java/org/springframework/integration/file/filters/AbstractPatternMatchingFileListFilter.java b/spring-integration-file/src/main/java/org/springframework/integration/file/filters/AbstractPatternMatchingFileListFilter.java
index 51689e24a1..5cd141498e 100644
--- a/spring-integration-file/src/main/java/org/springframework/integration/file/filters/AbstractPatternMatchingFileListFilter.java
+++ b/spring-integration-file/src/main/java/org/springframework/integration/file/filters/AbstractPatternMatchingFileListFilter.java
@@ -22,7 +22,7 @@ import org.springframework.beans.factory.InitializingBean;
import org.springframework.util.Assert;
/**
- * Filters a listing of files by qualifying their 'name' (as determined by {@link org.springframework.integration.file.entries.EntryNameExtractor})
+ * Filters a listing of files by qualifying their 'name'
* against a regular expression (an instance of {@link java.util.regex.Pattern})
*
* @author Iwein Fuld
diff --git a/spring-integration-file/src/main/java/org/springframework/integration/file/synchronization/AbstractInboundRemoteFileSystemSychronizer.java b/spring-integration-file/src/main/java/org/springframework/integration/file/synchronization/AbstractInboundRemoteFileSystemSychronizer.java
index 524105f16d..40a761fd42 100644
--- a/spring-integration-file/src/main/java/org/springframework/integration/file/synchronization/AbstractInboundRemoteFileSystemSychronizer.java
+++ b/spring-integration-file/src/main/java/org/springframework/integration/file/synchronization/AbstractInboundRemoteFileSystemSychronizer.java
@@ -90,9 +90,9 @@ public abstract class AbstractInboundRemoteFileSystemSychronizer extends Abst
* be a 'live' stateful client (a connection?) that is inappropriate to cache as it has per-request state.
* @param t
* leverages strategy implementations to enable different
- * behavior. It's a hook to the file entry ({@link F}) after it's been
+ * behavior. It's a hook to the file entry after it's been
* successfully downloaded. Conceptually, you might delete the
- * remote one or rename it, etc.
+ * remote one or rename it, etc.
* @throws Throwable
* escape hatch exception, let the adapter deal with it.
*/
diff --git a/spring-integration-ftp/src/main/java/org/springframework/integration/ftp/QueuedFtpClientPool.java b/spring-integration-ftp/src/main/java/org/springframework/integration/ftp/QueuedFtpClientPool.java
index fe488e6228..4b165c7774 100644
--- a/spring-integration-ftp/src/main/java/org/springframework/integration/ftp/QueuedFtpClientPool.java
+++ b/spring-integration-ftp/src/main/java/org/springframework/integration/ftp/QueuedFtpClientPool.java
@@ -88,7 +88,6 @@ public class QueuedFtpClientPool implements FtpClientPool {
* implement their own preparation strategy.
*
* @param client the unprepared client
- * @return
* @throws SocketException
* @throws IOException
*/
diff --git a/spring-integration-jmx/src/main/java/org/springframework/integration/jmx/AttributePollingMessageSource.java b/spring-integration-jmx/src/main/java/org/springframework/integration/jmx/AttributePollingMessageSource.java
index 1470fb4799..d44181a388 100644
--- a/spring-integration-jmx/src/main/java/org/springframework/integration/jmx/AttributePollingMessageSource.java
+++ b/spring-integration-jmx/src/main/java/org/springframework/integration/jmx/AttributePollingMessageSource.java
@@ -35,7 +35,7 @@ import org.springframework.util.Assert;
* @author Mark Fisher
* @since 2.0
*/
-@SuppressWarnings("unchecked")
+@SuppressWarnings("rawtypes")
public class AttributePollingMessageSource implements MessageSource {
private volatile ObjectName objectName;
diff --git a/spring-integration-jmx/src/main/java/org/springframework/integration/jmx/OperationInvokingMessageHandler.java b/spring-integration-jmx/src/main/java/org/springframework/integration/jmx/OperationInvokingMessageHandler.java
index 9d2e310c6f..adf9c02b7d 100644
--- a/spring-integration-jmx/src/main/java/org/springframework/integration/jmx/OperationInvokingMessageHandler.java
+++ b/spring-integration-jmx/src/main/java/org/springframework/integration/jmx/OperationInvokingMessageHandler.java
@@ -186,7 +186,7 @@ public class OperationInvokingMessageHandler extends AbstractReplyProducingMessa
return operationName;
}
- @SuppressWarnings("unchecked")
+ @SuppressWarnings({ "unchecked", "rawtypes" })
private Map resolveParameters(Message> message) {
Map map = null;
if (message.getPayload() instanceof Map) {
@@ -208,7 +208,8 @@ public class OperationInvokingMessageHandler extends AbstractReplyProducingMessa
return map;
}
- @SuppressWarnings("unchecked")
+
+ @SuppressWarnings("rawtypes")
private Map createParameterMapFromList(List parameters) {
Map map = new HashMap();
for (int i = 0; i < parameters.size(); i++) {
diff --git a/spring-integration-jmx/src/main/java/org/springframework/integration/monitor/LifecycleMessageSourceMetrics.java b/spring-integration-jmx/src/main/java/org/springframework/integration/monitor/LifecycleMessageSourceMetrics.java
index 5fcb8cefbf..4762d187fd 100644
--- a/spring-integration-jmx/src/main/java/org/springframework/integration/monitor/LifecycleMessageSourceMetrics.java
+++ b/spring-integration-jmx/src/main/java/org/springframework/integration/monitor/LifecycleMessageSourceMetrics.java
@@ -70,7 +70,7 @@ public class LifecycleMessageSourceMetrics implements MessageSourceMetrics, Life
}
/**
- * @return
+ * @return int
* @see org.springframework.integration.monitor.MessageSourceMetrics#getMessageCount()
*/
public int getMessageCount() {
diff --git a/spring-integration-jmx/src/test/java/org/springframework/integration/jmx/config/SimpleDynamicRouter.java b/spring-integration-jmx/src/test/java/org/springframework/integration/jmx/config/SimpleDynamicRouter.java
index 33fdee5384..0ddb11297f 100644
--- a/spring-integration-jmx/src/test/java/org/springframework/integration/jmx/config/SimpleDynamicRouter.java
+++ b/spring-integration-jmx/src/test/java/org/springframework/integration/jmx/config/SimpleDynamicRouter.java
@@ -61,7 +61,6 @@ public class SimpleDynamicRouter{
}
/**
*
- * @return
*/
public Map getChannelMappings(){
return channelMappings;
@@ -69,7 +68,6 @@ public class SimpleDynamicRouter{
/**
*
* @param key
- * @return
*/
public String route(Object key){
String className = key.getClass().getName();
diff --git a/spring-integration-mail/src/main/java/org/springframework/integration/mail/ImapMailReceiver.java b/spring-integration-mail/src/main/java/org/springframework/integration/mail/ImapMailReceiver.java
index d1a4384128..f365956259 100755
--- a/spring-integration-mail/src/main/java/org/springframework/integration/mail/ImapMailReceiver.java
+++ b/spring-integration-mail/src/main/java/org/springframework/integration/mail/ImapMailReceiver.java
@@ -68,14 +68,12 @@ public class ImapMailReceiver extends AbstractMailReceiver {
/**
* Check if messages should be marked as read
- * @return
*/
public Boolean isShouldMarkMessagesAsRead() {
return shouldMarkMessagesAsRead;
}
/**
* Specify is messages should be marked as read
- * @return
*/
public void setShouldMarkMessagesAsRead(Boolean shouldMarkMessagesAsRead) {
this.shouldMarkMessagesAsRead = shouldMarkMessagesAsRead;
diff --git a/spring-integration-security/src/main/java/org/springframework/integration/security/config/SecuredChannelsParser.java b/spring-integration-security/src/main/java/org/springframework/integration/security/config/SecuredChannelsParser.java
index 5bb69d63d3..6f8272d0ad 100644
--- a/spring-integration-security/src/main/java/org/springframework/integration/security/config/SecuredChannelsParser.java
+++ b/spring-integration-security/src/main/java/org/springframework/integration/security/config/SecuredChannelsParser.java
@@ -68,7 +68,7 @@ public class SecuredChannelsParser extends AbstractSingleBeanDefinitionParser {
builder.addConstructorArgReference(interceptorBeanName);
}
- @SuppressWarnings("unchecked")
+ @SuppressWarnings({ "unchecked", "rawtypes" })
private String parseObjectDefinitionSource(Element element, ParserContext parserContext) {
BeanDefinitionBuilder builder = BeanDefinitionBuilder.genericBeanDefinition(
BASE_PACKAGE_NAME + ".channel.ChannelInvocationDefinitionSource");
diff --git a/spring-integration-sftp/src/main/java/org/springframework/integration/sftp/config/SftpMessageSendingConsumerFactoryBean.java b/spring-integration-sftp/src/main/java/org/springframework/integration/sftp/config/SftpMessageSendingConsumerFactoryBean.java
index bfd0726c6a..9092020559 100644
--- a/spring-integration-sftp/src/main/java/org/springframework/integration/sftp/config/SftpMessageSendingConsumerFactoryBean.java
+++ b/spring-integration-sftp/src/main/java/org/springframework/integration/sftp/config/SftpMessageSendingConsumerFactoryBean.java
@@ -41,17 +41,10 @@ public class SftpMessageSendingConsumerFactoryBean implements FactoryBean messageMatcher) {
+ @SuppressWarnings("rawtypes")
+ public static MessageHandler handlerExpecting(final Matcher messageMatcher) {
return new MessageHandler() {
public void handleMessage(Message> message) throws MessageRejectedException, MessageHandlingException, MessageDeliveryException {
assertThat(message, is(messageMatcher));
diff --git a/spring-integration-twitter/src/test/java/org/springframework/integration/twitter/inbound/DirectMessageReceivingMessageSourceTests.java b/spring-integration-twitter/src/test/java/org/springframework/integration/twitter/inbound/DirectMessageReceivingMessageSourceTests.java
index 65f4e5ffb5..b7d72c9e79 100644
--- a/spring-integration-twitter/src/test/java/org/springframework/integration/twitter/inbound/DirectMessageReceivingMessageSourceTests.java
+++ b/spring-integration-twitter/src/test/java/org/springframework/integration/twitter/inbound/DirectMessageReceivingMessageSourceTests.java
@@ -48,7 +48,6 @@ import twitter4j.Paging;
import twitter4j.RateLimitStatus;
import twitter4j.ResponseList;
import twitter4j.Twitter;
-import twitter4j.TwitterFactory;
/**
* @author Oleg Zhurakousky
diff --git a/spring-integration-ws/src/test/java/org/springframework/integration/ws/MarshallingWebServiceIntegrationTests.java b/spring-integration-ws/src/test/java/org/springframework/integration/ws/MarshallingWebServiceIntegrationTests.java
index d85c56cf95..d3326a438a 100644
--- a/spring-integration-ws/src/test/java/org/springframework/integration/ws/MarshallingWebServiceIntegrationTests.java
+++ b/spring-integration-ws/src/test/java/org/springframework/integration/ws/MarshallingWebServiceIntegrationTests.java
@@ -111,7 +111,8 @@ public class MarshallingWebServiceIntegrationTests {
}
}
- @SuppressWarnings("unchecked")
+
+ @SuppressWarnings("rawtypes")
public boolean supports(Class clazz) {
return true;
}
diff --git a/spring-integration-ws/src/test/java/org/springframework/integration/ws/config/StubMarshaller.java b/spring-integration-ws/src/test/java/org/springframework/integration/ws/config/StubMarshaller.java
index 4033cd4257..2d7cf733d6 100644
--- a/spring-integration-ws/src/test/java/org/springframework/integration/ws/config/StubMarshaller.java
+++ b/spring-integration-ws/src/test/java/org/springframework/integration/ws/config/StubMarshaller.java
@@ -28,7 +28,7 @@ import org.springframework.oxm.XmlMappingException;
*/
public class StubMarshaller implements Marshaller {
- @SuppressWarnings("unchecked")
+ @SuppressWarnings("rawtypes")
public boolean supports(Class clazz) {
return false;
}
diff --git a/spring-integration-ws/src/test/java/org/springframework/integration/ws/config/StubMarshallerAndUnmarshaller.java b/spring-integration-ws/src/test/java/org/springframework/integration/ws/config/StubMarshallerAndUnmarshaller.java
index bcf4a6fe49..e3e487fbe2 100644
--- a/spring-integration-ws/src/test/java/org/springframework/integration/ws/config/StubMarshallerAndUnmarshaller.java
+++ b/spring-integration-ws/src/test/java/org/springframework/integration/ws/config/StubMarshallerAndUnmarshaller.java
@@ -30,7 +30,8 @@ import org.springframework.oxm.XmlMappingException;
*/
public class StubMarshallerAndUnmarshaller implements Marshaller, Unmarshaller {
- @SuppressWarnings("unchecked")
+
+ @SuppressWarnings("rawtypes")
public boolean supports(Class clazz) {
return false;
}
diff --git a/spring-integration-ws/src/test/java/org/springframework/integration/ws/config/StubUnmarshaller.java b/spring-integration-ws/src/test/java/org/springframework/integration/ws/config/StubUnmarshaller.java
index f8252187fa..dce4d47aca 100644
--- a/spring-integration-ws/src/test/java/org/springframework/integration/ws/config/StubUnmarshaller.java
+++ b/spring-integration-ws/src/test/java/org/springframework/integration/ws/config/StubUnmarshaller.java
@@ -28,7 +28,8 @@ import org.springframework.oxm.XmlMappingException;
*/
public class StubUnmarshaller implements Unmarshaller {
- @SuppressWarnings("unchecked")
+
+ @SuppressWarnings("rawtypes")
public boolean supports(Class clazz) {
return false;
}
diff --git a/spring-integration-xml/src/test/java/org/springframework/integration/xml/config/StubMarshaller.java b/spring-integration-xml/src/test/java/org/springframework/integration/xml/config/StubMarshaller.java
index 580a812c0d..8817e50492 100644
--- a/spring-integration-xml/src/test/java/org/springframework/integration/xml/config/StubMarshaller.java
+++ b/spring-integration-xml/src/test/java/org/springframework/integration/xml/config/StubMarshaller.java
@@ -45,7 +45,7 @@ public class StubMarshaller implements Marshaller {
}
- @SuppressWarnings("unchecked")
+ @SuppressWarnings("rawtypes")
public boolean supports(Class clazz) {
return true;
}
diff --git a/spring-integration-xml/src/test/java/org/springframework/integration/xml/config/StubUnmarshaller.java b/spring-integration-xml/src/test/java/org/springframework/integration/xml/config/StubUnmarshaller.java
index 9a5ee85d1f..9151950f5b 100644
--- a/spring-integration-xml/src/test/java/org/springframework/integration/xml/config/StubUnmarshaller.java
+++ b/spring-integration-xml/src/test/java/org/springframework/integration/xml/config/StubUnmarshaller.java
@@ -33,7 +33,7 @@ public class StubUnmarshaller implements Unmarshaller {
public LinkedList sourcesPassed = new LinkedList();
- @SuppressWarnings("unchecked")
+ @SuppressWarnings("rawtypes")
public boolean supports(Class clazz) {
return true;
}
diff --git a/spring-integration-xml/src/test/java/org/springframework/integration/xml/config/XmlPayloadValidatingFilterParserTests.java b/spring-integration-xml/src/test/java/org/springframework/integration/xml/config/XmlPayloadValidatingFilterParserTests.java
index 42779cecfa..d4817c4f9d 100644
--- a/spring-integration-xml/src/test/java/org/springframework/integration/xml/config/XmlPayloadValidatingFilterParserTests.java
+++ b/spring-integration-xml/src/test/java/org/springframework/integration/xml/config/XmlPayloadValidatingFilterParserTests.java
@@ -81,6 +81,7 @@ public class XmlPayloadValidatingFilterParserTests {
inputChannel.send(docMessage);
assertNotNull(validChannel.receive(100));
}
+ @SuppressWarnings("unused")
@Test
public void testInvalidMessageWithValidatorAndDiscardChannel() throws Exception {
ApplicationContext ac = new ClassPathXmlApplicationContext("XmlPayloadValidatingFilterParserTests-context.xml", this.getClass());
diff --git a/spring-integration-xml/src/test/java/org/springframework/integration/xml/router/XPathRouterTests.java b/spring-integration-xml/src/test/java/org/springframework/integration/xml/router/XPathRouterTests.java
index ee71c63ad5..d340a9275d 100644
--- a/spring-integration-xml/src/test/java/org/springframework/integration/xml/router/XPathRouterTests.java
+++ b/spring-integration-xml/src/test/java/org/springframework/integration/xml/router/XPathRouterTests.java
@@ -36,7 +36,7 @@ import org.springframework.xml.xpath.XPathExpressionFactory;
public class XPathRouterTests {
@Test
- @SuppressWarnings("unchecked")
+ @SuppressWarnings({ "unchecked", "rawtypes" })
public void simpleSingleAttribute() throws Exception {
Document doc = XmlTestUtil.getDocumentForString("");
XPathExpression expression = XPathExpressionFactory.createXPathExpression("/doc/@type");
@@ -47,7 +47,7 @@ public class XPathRouterTests {
}
@Test
- @SuppressWarnings("unchecked")
+ @SuppressWarnings({ "unchecked", "rawtypes" })
public void multipleNodeValues() throws Exception {
Document doc = XmlTestUtil.getDocumentForString("bOnebTwo");
XPathExpression expression = XPathExpressionFactory.createXPathExpression("/doc/book");
@@ -59,7 +59,7 @@ public class XPathRouterTests {
}
@Test
- @SuppressWarnings("unchecked")
+ @SuppressWarnings({ "unchecked", "rawtypes" })
public void multipleNodeValuesAsString() throws Exception {
XPathExpression expression = XPathExpressionFactory.createXPathExpression("/doc/book");
XPathRouter router = new XPathRouter(expression);
diff --git a/spring-integration-xmpp/src/main/java/org/springframework/integration/xmpp/messages/XmppMessageDrivenEndpoint.java b/spring-integration-xmpp/src/main/java/org/springframework/integration/xmpp/messages/XmppMessageDrivenEndpoint.java
index 17cd31ee9c..f1b5b5072a 100644
--- a/spring-integration-xmpp/src/main/java/org/springframework/integration/xmpp/messages/XmppMessageDrivenEndpoint.java
+++ b/spring-integration-xmpp/src/main/java/org/springframework/integration/xmpp/messages/XmppMessageDrivenEndpoint.java
@@ -16,7 +16,6 @@
package org.springframework.integration.xmpp.messages;
import org.jivesoftware.smack.Chat;
-import org.jivesoftware.smack.ChatManager;
import org.jivesoftware.smack.PacketListener;
import org.jivesoftware.smack.XMPPConnection;
import org.jivesoftware.smack.packet.Message;
@@ -31,26 +30,11 @@ import org.springframework.util.Assert;
/**
* This component logs in as a user and forwards any messages to that
* user on to downstream components.
- * It takes any message from a given XMPP session (as established by
- * the current {@link XMPPConnection}) and forwards the
- * {@link org.jivesoftware.smack.packet.Message} as the payload of the Spring
- * Integration {@link org.springframework.integration.Message}.
- * Note: the {@link org.jivesoftware.smack.ChatManager}
- * maintains a Map<String, Chat> for threads and users, where the threadID
- * ({@link String}) is the key or the userID {@link String} is the key. This
- * {@link java.util.Map} is a Smack-specific implementation called
- * {@link org.jivesoftware.smack.util.collections.ReferenceMap} that removes
- * key/values as references are dereferenced.
*
* @author Josh Long
* @author Mark Fisher
* @author Oleg Zhurakousky
*
- * @see ChatManager the ChatManager class that
- * keeps watch over all Chats between the client and any other
- * participants.
- * @see XMPPConnection the XMPPConnection (as
- * created by {@link XmppConnectionFactory}
*/
public class XmppMessageDrivenEndpoint extends AbstractXmppConnectionAwareEndpoint {
diff --git a/spring-integration-xmpp/src/main/java/org/springframework/integration/xmpp/presence/XmppRosterEventMessageDrivenEndpoint.java b/spring-integration-xmpp/src/main/java/org/springframework/integration/xmpp/presence/XmppRosterEventMessageDrivenEndpoint.java
index 6ea29a077b..d5cf747332 100644
--- a/spring-integration-xmpp/src/main/java/org/springframework/integration/xmpp/presence/XmppRosterEventMessageDrivenEndpoint.java
+++ b/spring-integration-xmpp/src/main/java/org/springframework/integration/xmpp/presence/XmppRosterEventMessageDrivenEndpoint.java
@@ -25,7 +25,6 @@ import org.jivesoftware.smack.Roster;
import org.jivesoftware.smack.RosterListener;
import org.jivesoftware.smack.XMPPConnection;
import org.jivesoftware.smack.packet.Presence;
-import org.springframework.beans.factory.BeanFactory;
import org.springframework.integration.Message;
import org.springframework.integration.MessageChannel;
import org.springframework.integration.MessageHandlingException;
@@ -33,7 +32,6 @@ import org.springframework.integration.MessagingException;
import org.springframework.integration.core.MessagingTemplate;
import org.springframework.integration.support.MessageBuilder;
import org.springframework.integration.xmpp.AbstractXmppConnectionAwareEndpoint;
-import org.springframework.integration.xmpp.XmppContextUtils;
import org.springframework.util.Assert;
/**
diff --git a/spring-integration-xmpp/src/test/java/org/springframework/integration/xmpp/XmppConnectionFactoryBeanTests.java b/spring-integration-xmpp/src/test/java/org/springframework/integration/xmpp/XmppConnectionFactoryBeanTests.java
index 555a3b791e..689086e636 100644
--- a/spring-integration-xmpp/src/test/java/org/springframework/integration/xmpp/XmppConnectionFactoryBeanTests.java
+++ b/spring-integration-xmpp/src/test/java/org/springframework/integration/xmpp/XmppConnectionFactoryBeanTests.java
@@ -21,7 +21,6 @@ import static org.mockito.Mockito.mock;
import org.jivesoftware.smack.ConnectionConfiguration;
import org.jivesoftware.smack.XMPPConnection;
import org.junit.Test;
-import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
/**
@@ -38,7 +37,7 @@ public class XmppConnectionFactoryBeanTests {
}
@Test
public void testXmppConnectionFactoryBeanViaConfig() throws Exception{
- ApplicationContext ac = new ClassPathXmlApplicationContext("XmppConnectionFactoryBeanTests-context.xml", this.getClass());
+ new ClassPathXmlApplicationContext("XmppConnectionFactoryBeanTests-context.xml", this.getClass());
// the fact that no exception was thrown satisfies this test
}
}
diff --git a/spring-integration-xmpp/src/test/java/org/springframework/integration/xmpp/ignore/XmppRosterEventConsumer.java b/spring-integration-xmpp/src/test/java/org/springframework/integration/xmpp/ignore/XmppRosterEventConsumer.java
deleted file mode 100644
index 720fe4f6ac..0000000000
--- a/spring-integration-xmpp/src/test/java/org/springframework/integration/xmpp/ignore/XmppRosterEventConsumer.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright 2002-2010 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.springframework.integration.xmpp.ignore;
-
-import org.apache.commons.lang.StringUtils;
-import org.springframework.integration.Message;
-import org.springframework.integration.MessageHeaders;
-import org.springframework.integration.annotation.ServiceActivator;
-import org.springframework.integration.xmpp.XmppHeaders;
-
-/**
- * This class reacts to changes in
- * {@link org.jivesoftware.smack.packet.Presence} objects for a given account.
- *
- * @author Josh Long
- * @since 2.0
- */
-public class XmppRosterEventConsumer {
-
- @ServiceActivator
- public void presenceChanged(Message> presenceEventMsg) throws Exception {
-// System.out.println(StringUtils.repeat("-", 100));
-// String whosePresence = (String) presenceEventMsg.getHeaders().get(XmppHeaders.PRESENCE_FROM);
-// System.out.println("entries affected: " + whosePresence);
-// MessageHeaders messageHeaders = presenceEventMsg.getHeaders();
-// for (String h : messageHeaders.keySet()) {
-// System.out.println(String.format("%s = %s", h, messageHeaders.get(h)));
-// }
- }
-
-}
diff --git a/spring-integration-xmpp/src/test/java/org/springframework/integration/xmpp/ignore/XmppRosterEventProducer.java b/spring-integration-xmpp/src/test/java/org/springframework/integration/xmpp/ignore/XmppRosterEventProducer.java
deleted file mode 100644
index d4536cf838..0000000000
--- a/spring-integration-xmpp/src/test/java/org/springframework/integration/xmpp/ignore/XmppRosterEventProducer.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright 2002-2010 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.springframework.integration.xmpp.ignore;
-
-import org.apache.commons.lang.StringUtils;
-import org.jivesoftware.smack.packet.Presence;
-import org.jivesoftware.smack.packet.Presence.Type;
-import org.springframework.integration.Message;
-import org.springframework.integration.core.MessageSource;
-import org.springframework.integration.support.MessageBuilder;
-import org.springframework.integration.xmpp.XmppHeaders;
-
-/**
- * This is used in
- * {@link org.springframework.integration.xmpp.ignore.OutboundXmppRosterEventsEndpointTests}
- * to produce fake status / presence updates.
- *
- * @author Josh Long
- * @since 2.0
- */
-public class XmppRosterEventProducer implements MessageSource {
-
- public Message receive() {
-// try {
-// Thread.sleep(1000 * 10);
-// }
-// catch (InterruptedException e) {
-// // eat it
-// }
-// return (Math.random() > .5) ? MessageBuilder.withPayload("available").setHeader(
-// XmppHeaders.PRESENCE_MODE, Presence.Mode.chat)
-// .setHeader(XmppHeaders.PRESENCE_STATUS, "She Loves me").build()
-// : MessageBuilder.withPayload(StringUtils.EMPTY).setHeader(XmppHeaders.PRESENCE_MODE, Presence.Mode.dnd)
-// .setHeader(XmppHeaders.PRESENCE_STATUS, "She Loves me not").build();
- return null;
- }
-
-}
diff --git a/spring-integration-xmpp/src/test/java/org/springframework/integration/xmpp/messages/XmppRosterEventMessageSendingHandlerTests.java b/spring-integration-xmpp/src/test/java/org/springframework/integration/xmpp/messages/XmppRosterEventMessageSendingHandlerTests.java
index 6f1a047cbc..71a8b48d9e 100644
--- a/spring-integration-xmpp/src/test/java/org/springframework/integration/xmpp/messages/XmppRosterEventMessageSendingHandlerTests.java
+++ b/spring-integration-xmpp/src/test/java/org/springframework/integration/xmpp/messages/XmppRosterEventMessageSendingHandlerTests.java
@@ -34,6 +34,7 @@ import org.springframework.integration.xmpp.presence.XmppRosterEventMessageSendi
*/
public class XmppRosterEventMessageSendingHandlerTests {
+ @SuppressWarnings({ "unchecked", "rawtypes" })
@Test
public void testPresencePayload(){
XmppRosterEventMessageSendingHandler handler = new XmppRosterEventMessageSendingHandler(mock(XMPPConnection.class));
@@ -41,6 +42,7 @@ public class XmppRosterEventMessageSendingHandlerTests {
handler.handleMessage(new GenericMessage(mock(Presence.class)));
}
+ @SuppressWarnings({ "unchecked", "rawtypes" })
@Test(expected=MessageHandlingException.class)
public void testWrongPayload(){
XmppRosterEventMessageSendingHandler handler = new XmppRosterEventMessageSendingHandler(mock(XMPPConnection.class));
diff --git a/spring-integration-xmpp/src/test/java/org/springframework/integration/xmpp/presence/XmppPresenceMessageMapperTests.java b/spring-integration-xmpp/src/test/java/org/springframework/integration/xmpp/presence/XmppPresenceMessageMapperTests.java
deleted file mode 100644
index 3abd323e5f..0000000000
--- a/spring-integration-xmpp/src/test/java/org/springframework/integration/xmpp/presence/XmppPresenceMessageMapperTests.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * Copyright 2002-2010 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.springframework.integration.xmpp.presence;
-
-import static junit.framework.Assert.assertEquals;
-
-import org.jivesoftware.smack.packet.Presence;
-import org.jivesoftware.smack.packet.Presence.Mode;
-import org.jivesoftware.smack.packet.Presence.Type;
-import org.junit.Test;
-import org.springframework.integration.Message;
-import org.springframework.integration.mapping.MessageMappingException;
-import org.springframework.integration.support.MessageBuilder;
-
-/**
- * @author Oleg Zhurakousky
- *
- */
-public class XmppPresenceMessageMapperTests {
-
- @Test
- public void testFromMessageWithPayloadPresence() throws Exception{
-// Presence presence = new Presence(Type.available, "Hello", 1, Mode.chat);
-// Message> message = MessageBuilder.withPayload(presence).build();
-// XmppPresenceMessageMapper mapper = new XmppPresenceMessageMapper();
-// Presence mappedPresence = mapper.fromMessage(message);
-// assertEquals(Mode.chat, mappedPresence.getMode());
-// assertEquals(Type.available, mappedPresence.getType());
-// assertEquals("Hello", mappedPresence.getStatus());
-// assertEquals(1, mappedPresence.getPriority());
- }
-
-// @Test
-// public void testFromMessageWithPayloadPresenceType() throws Exception{
-// Message> message = MessageBuilder.withPayload(Type.available)
-// .setHeader(XmppHeaders.PRESENCE_FROM, "oleg")
-// .setHeader(XmppHeaders.PRESENCE_MODE, Mode.chat)
-// .setHeader(XmppHeaders.PRESENCE_STATUS, "hello")
-// .setHeader(XmppHeaders.PRESENCE_PRIORITY, 1)
-// .build();
-// XmppPresenceMessageMapper mapper = new XmppPresenceMessageMapper();
-// Presence mappedPresence = mapper.fromMessage(message);
-// assertEquals(Mode.chat, mappedPresence.getMode());
-// assertEquals(Type.available, mappedPresence.getType());
-// assertEquals("hello", mappedPresence.getStatus());
-// assertEquals(1, mappedPresence.getPriority());
-// }
-// @Test
-// public void testFromMessageWithPayloadPresenceTypeAndStringModeType() throws Exception{
-// Message> message = MessageBuilder.withPayload(Type.available)
-// .setHeader(XmppHeaders.PRESENCE_FROM, "oleg")
-// .setHeader(XmppHeaders.PRESENCE_MODE, "chat")
-// .setHeader(XmppHeaders.PRESENCE_STATUS, "hello")
-// .setHeader(XmppHeaders.PRESENCE_PRIORITY, 1)
-// .build();
-// XmppPresenceMessageMapper mapper = new XmppPresenceMessageMapper();
-// Presence mappedPresence = mapper.fromMessage(message);
-// assertEquals(Mode.chat, mappedPresence.getMode());
-// assertEquals(Type.available, mappedPresence.getType());
-// assertEquals("hello", mappedPresence.getStatus());
-// assertEquals(1, mappedPresence.getPriority());
-// }
-
-// @Test(expected=MessageMappingException.class)
-// public void testFromMessageWithPayloadPresenceTypeUnsupportedMode() throws Exception{
-//
-// Message> message = MessageBuilder.withPayload(Type.available)
-// .setHeader(XmppHeaders.PRESENCE_MODE, 1)
-// .build();
-// XmppPresenceMessageMapper mapper = new XmppPresenceMessageMapper();
-// mapper.fromMessage(message);
-// }
-
-// @Test(expected=MessageMappingException.class)
-// public void testFromMessageWithUnsupportedPayload() throws Exception{
-// Message> message = MessageBuilder.withPayload("hello").build();
-// XmppPresenceMessageMapper mapper = new XmppPresenceMessageMapper();
-// mapper.fromMessage(message);
-// }
-}