JinyuChen97 commented on code in PR #22033:
URL: https://github.com/apache/camel/pull/22033#discussion_r2941180603
##########
components/camel-mina/src/test/java/org/apache/camel/component/mina/MinaInOutWithForcedNoResponseTest.java:
##########
@@ -60,12 +60,12 @@ public void configure() {
.when(body().isEqualTo("Woodbine"))
.transform(constant("Hello Chad"))
.otherwise()
- .transform(constant(null));
+ .transform(constant((Object) null));
Review Comment:
I tested replacing constant(null) with constant() and it actually causes
testNoResponseDisconnectOnNoReplyFalse to fail. The reason is that constant()
produces an empty array new Object[0] as the body, which Mina treats as a valid
response to send back. As a result, the client receives a response instead of
time out, and the assertThrows(ExchangeTimedOutException) assertion failed. So
probably constant((Object) null) is the correct way for the test intension and
solving varargs warning?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]