Hammered out some compiler warnings
This commit is contained in:
@@ -76,7 +76,7 @@ import org.springframework.util.Assert;
|
||||
* @author Mark Fisher
|
||||
* @author Marius Bogoevici
|
||||
*/
|
||||
public abstract class AbstractMessageBarrierHandler<T extends Collection<? extends Message>>
|
||||
public abstract class AbstractMessageBarrierHandler<T extends Collection<? extends Message<?>>>
|
||||
extends AbstractMessageHandler implements BeanFactoryAware, InitializingBean {
|
||||
|
||||
public final static long DEFAULT_SEND_TIMEOUT = 1000;
|
||||
@@ -261,6 +261,7 @@ public abstract class AbstractMessageBarrierHandler<T extends Collection<? exten
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private void processMessage(Message<?> message, Object correlationKey) {
|
||||
MessageBarrier<T> barrier = barriers.putIfAbsent(correlationKey, createMessageBarrier(correlationKey));
|
||||
if (barrier == null) {
|
||||
@@ -366,8 +367,9 @@ public abstract class AbstractMessageBarrierHandler<T extends Collection<? exten
|
||||
* @param entry
|
||||
* @param barrier
|
||||
*/
|
||||
|
||||
protected void discardBarrier(MessageBarrier<T> barrier) {
|
||||
for (Message message : barrier.getMessages()) {
|
||||
for (Message<?> message : barrier.getMessages()) {
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Handling of Message group with correlation key '" + barrier.getCorrelationKey()+ "' has timed out.");
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ import org.springframework.integration.core.Message;
|
||||
*
|
||||
* @author Marius Bogoevici
|
||||
*/
|
||||
public class MessageBarrier<T extends Collection<? extends Message>> {
|
||||
public class MessageBarrier<T extends Collection<? extends Message<?>>> {
|
||||
|
||||
protected final T messages;
|
||||
|
||||
|
||||
@@ -75,6 +75,7 @@ public class MethodInvokingMessageSource implements MessageSource<Object>, Initi
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public Message<Object> receive() {
|
||||
if (this.invoker == null) {
|
||||
this.afterPropertiesSet();
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
package org.springframework.integration.router;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.integration.core.Message;
|
||||
|
||||
@@ -18,7 +18,6 @@ package org.springframework.integration.router;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.integration.annotation.Router;
|
||||
|
||||
@@ -19,7 +19,6 @@ package org.springframework.integration.aggregator;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import org.springframework.integration.core.Message;
|
||||
import org.springframework.integration.core.MessageHeaders;
|
||||
import org.springframework.integration.message.MessageBuilder;
|
||||
|
||||
import org.junit.Test;
|
||||
@@ -33,7 +32,7 @@ public class HeaderAttributeCorrelationStrategyTests {
|
||||
public void testHeaderAttributeCorrelationStrategy() {
|
||||
String testedHeaderValue = "@!arbitraryTestValue!@";
|
||||
String testHeaderName = "header.for.test";
|
||||
Message message = MessageBuilder.withPayload("irrelevantData").setHeader(testHeaderName, testedHeaderValue).build();
|
||||
Message<?> message = MessageBuilder.withPayload("irrelevantData").setHeader(testHeaderName, testedHeaderValue).build();
|
||||
HeaderAttributeCorrelationStrategy correlationStrategy = new HeaderAttributeCorrelationStrategy(testHeaderName);
|
||||
assertEquals(testedHeaderValue, correlationStrategy.getCorrelationKey(message));
|
||||
}
|
||||
|
||||
@@ -16,21 +16,18 @@
|
||||
|
||||
package org.springframework.integration.aggregator;
|
||||
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.LinkedHashSet;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.springframework.integration.message.StringMessage;
|
||||
import org.springframework.integration.core.Message;
|
||||
|
||||
/**
|
||||
* @author Mark Fisher
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public class MessageBarrierTests {
|
||||
|
||||
|
||||
|
||||
@@ -26,10 +26,8 @@ import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import org.springframework.beans.DirectFieldAccessor;
|
||||
import org.springframework.beans.factory.BeanNameAware;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||
import org.springframework.integration.core.Message;
|
||||
import org.springframework.integration.message.StringMessage;
|
||||
import org.springframework.integration.selector.MessageSelector;
|
||||
@@ -49,7 +47,7 @@ public class SelectorChainParserTests {
|
||||
@Autowired
|
||||
ApplicationContext context;
|
||||
|
||||
@Test @Ignore
|
||||
@Test @Ignore
|
||||
public void topLevelSelector() throws Exception {
|
||||
MessageSelector topLevelSelector = (MessageSelector) context.getBean("topLevelSelector");
|
||||
}
|
||||
|
||||
@@ -38,7 +38,6 @@ import org.springframework.integration.aggregator.CorrelationStrategyAdapter;
|
||||
import org.springframework.integration.channel.BeanFactoryChannelResolver;
|
||||
import org.springframework.integration.channel.ChannelResolver;
|
||||
import org.springframework.integration.endpoint.EventDrivenConsumer;
|
||||
import org.springframework.integration.annotation.CorrelationStrategy;
|
||||
import org.springframework.integration.handler.HandlerMethodResolver;
|
||||
import org.springframework.integration.handler.StaticHandlerMethodResolver;
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@ public class MethodInvokingSelectorParserTests {
|
||||
@Autowired
|
||||
MessageSelectorChain chain;
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Test
|
||||
public void configOK() throws Exception {
|
||||
DirectFieldAccessor accessor = new DirectFieldAccessor(chain);
|
||||
|
||||
Reference in New Issue
Block a user