ghillert/spring-integration — comment on commit 1fef979adb119d7b1b67aa0e0348bd1457a83475
File: spring-integration-core/src/main/java/org/springframework/integration/transformer/ContentEnricher.java line 160
By olegz:

I may be missing something, but could this code be written a bit simpler?
For example
if (this.replyChannel != null) {
Assert.notNull(this.requestChannel, "If the replyChannel is set, then the requestChannel must not be null");
this.gateway = new Gateway();
this.gateway.setRequestChannel(requestChannel);
this.gateway.setReplyChannel(replyChannel);
this.gateway.afterPropertiesSet();
}