INT-1227 removed the protected, overridable shouldSplitIterableReply method in favor of a private, internal method in AbstractReplyProducingMessageHandler that simply checks if at least one item in the Iterable result is a Message or MessageBuilder instance.
This commit is contained in:
@@ -114,7 +114,7 @@ public abstract class AbstractReplyProducingMessageHandler extends AbstractMessa
|
||||
}
|
||||
|
||||
private void handleResult(Object result, MessageHeaders requestHeaders) {
|
||||
if (result instanceof Iterable && this.shouldSplitIterableReply()) {
|
||||
if (result instanceof Iterable && this.shouldSplitReply((Iterable<?>) result)) {
|
||||
for (Object o : (Iterable<?>) result) {
|
||||
this.produceReply(o, requestHeaders);
|
||||
}
|
||||
@@ -188,10 +188,12 @@ public abstract class AbstractReplyProducingMessageHandler extends AbstractMessa
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Subclasses may override this. False by default.
|
||||
*/
|
||||
protected boolean shouldSplitIterableReply() {
|
||||
private boolean shouldSplitReply(Iterable<?> reply) {
|
||||
for (Object next : reply) {
|
||||
if (next instanceof Message<?> || next instanceof MessageBuilder<?>) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -97,11 +97,6 @@ public abstract class AbstractMessageSplitter extends AbstractReplyProducingMess
|
||||
return builder;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean shouldSplitIterableReply() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getComponentType() {
|
||||
return "splitter";
|
||||
|
||||
Reference in New Issue
Block a user