Croway commented on code in PR #21401:
URL: https://github.com/apache/camel/pull/21401#discussion_r2792466266
##########
components/camel-atmosphere-websocket/src/test/java/org/apache/camel/component/atmosphere/websocket/WebsocketRoute1Test.java:
##########
@@ -73,27 +72,24 @@ public void configure() {
// route for a single line
from("atmosphere-websocket:///hola").to("log:info").process(new Processor() {
public void process(final Exchange exchange) {
- createResponse(exchange, false);
+ createResponse(exchange);
}
}).to("atmosphere-websocket:///hola");
}
};
}
- private static void createResponse(Exchange exchange, boolean streaming) {
+ private static void createResponse(Exchange exchange) {
Object msg = exchange.getIn().getBody();
- if (streaming) {
- assertTrue(msg instanceof Reader || msg instanceof InputStream,
"Expects Reader or InputStream");
- } else {
- assertTrue(msg instanceof String || msg instanceof byte[],
"Expects String or byte[]");
- }
+ assertTrue(msg instanceof String || msg instanceof byte[] || msg
instanceof Reader || msg instanceof InputStream,
+ "Expects String, byte[], Reader or InputStream");
Review Comment:
good point, the real issue is that on jdk25 the body is always of type
ReaderCache, even without useStreaming.
Therefore, the if/else is ok for jdk17 and 22. but failing for 25, this is
why I removed it.
I am investigating why jdk25 is behaving like this
--
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]