GH-1896Stream Fixed conversion of collection of messages

This commit is contained in:
Oleg Zhurakousky
2020-01-27 17:25:21 +01:00
parent 20206a5342
commit 35d3c45959
2 changed files with 39 additions and 28 deletions

View File

@@ -365,12 +365,14 @@ public class BeanFactoryAwareFunctionRegistryMultiInOutTests {
return Integer.class.isAssignableFrom(clazz);
}
@Override
protected Object convertFromInternal(
Message<?> message, Class<?> targetClass, @Nullable Object conversionHint) {
ByteBuffer wrappedPayload = ByteBuffer.wrap((byte[]) message.getPayload());
return wrappedPayload.getInt();
}
@Override
protected Object convertToInternal(
Object payload, @Nullable MessageHeaders headers, @Nullable Object conversionHint) {
@@ -473,6 +475,7 @@ public class BeanFactoryAwareFunctionRegistryMultiInOutTests {
public void setId(int id) {
this.id = id;
}
@Override
public String toString() {
return "Person: " + name + "/" + id;
}