INT-651 Suppress Deprecation Warnings
This commit is contained in:
@@ -24,7 +24,6 @@ import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
import org.springframework.integration.handler.AbstractReplyProducingMessageHandler;
|
||||
import org.springframework.integration.support.AbstractIntegrationMessageBuilder;
|
||||
import org.springframework.integration.util.Function;
|
||||
import org.springframework.integration.util.FunctionIterator;
|
||||
import org.springframework.messaging.Message;
|
||||
import org.springframework.messaging.MessageHeaders;
|
||||
@@ -36,6 +35,7 @@ import org.springframework.messaging.MessageHeaders;
|
||||
* @author Dave Syer
|
||||
* @author Artem Bilan
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public abstract class AbstractMessageSplitter extends AbstractReplyProducingMessageHandler {
|
||||
|
||||
private boolean applySequence = true;
|
||||
@@ -49,7 +49,7 @@ public abstract class AbstractMessageSplitter extends AbstractReplyProducingMess
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings({ "unchecked", "deprecation" })
|
||||
@SuppressWarnings("unchecked")
|
||||
protected final Object handleRequestMessage(Message<?> message) {
|
||||
Object result = this.splitMessage(message);
|
||||
// return null if 'null'
|
||||
@@ -91,7 +91,7 @@ public abstract class AbstractMessageSplitter extends AbstractReplyProducingMess
|
||||
final AtomicInteger sequenceNumber = new AtomicInteger(1);
|
||||
|
||||
return new FunctionIterator<Object, AbstractIntegrationMessageBuilder<?>>(iterator,
|
||||
new Function<Object, AbstractIntegrationMessageBuilder<?>>() {
|
||||
new org.springframework.integration.util.Function<Object, AbstractIntegrationMessageBuilder<?>>() {
|
||||
@Override
|
||||
public AbstractIntegrationMessageBuilder<?> apply(Object object) {
|
||||
return createBuilder(object, headers, correlationId, sequenceNumber.getAndIncrement(),
|
||||
|
||||
@@ -30,13 +30,14 @@ public final class FunctionIterator<T, V> implements Iterator<V> {
|
||||
|
||||
private final Iterator<T> iterator;
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
private final Function<? super T, ? extends V> function;
|
||||
|
||||
public FunctionIterator(Iterable<T> iterable, Function<? super T, ? extends V> function) {
|
||||
public FunctionIterator(Iterable<T> iterable, @SuppressWarnings("deprecation") Function<? super T, ? extends V> function) {
|
||||
this(iterable.iterator(), function);
|
||||
}
|
||||
|
||||
public FunctionIterator(Iterator<T> newIterator, Function<? super T, ? extends V> function) {
|
||||
public FunctionIterator(Iterator<T> newIterator, @SuppressWarnings("deprecation") Function<? super T, ? extends V> function) {
|
||||
this.iterator = newIterator;
|
||||
this.function = function;
|
||||
}
|
||||
@@ -51,6 +52,7 @@ public final class FunctionIterator<T, V> implements Iterator<V> {
|
||||
return this.iterator.hasNext();
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public V next() {
|
||||
if (this.hasNext()) {
|
||||
|
||||
Reference in New Issue
Block a user