CAMEL-22114 - Adapt Atmosphere to JDK 25#21234
Conversation
|
🌟 Thank you for your contribution to the Apache Camel project! 🌟 🤖 CI automation will test this PR automatically. 🐫 Apache Camel Committers, please review the following items:
|
adafb62 to
978165c
Compare
the body is provided in streaming mode with JDK 25 by default. Adapted the test in this sense. Signed-off-by: Aurélien Pupier <apupier@ibm.com>
978165c to
6d2d231
Compare
|
(use "git restore ..." to discard changes in working directory) |
|
so seems that it is real bug in atomsphere impacting us and we should not just adjust the test. The difference is coming from org.atmosphere.cpr.AtmosphereFramework.loadWebSocketFromPath(ClassLoader, String) With Java 17, both returns because of this difference, with Java 25, the subdirectories are searched for .class ad potential sublcasses of WebSocketProtocol. it founds 2 of them, and it initialize the AtmosphereFramework with the last one, in our case, always the WebsocketStreamHandler. And then when initializing the websocket with org.atmosphere.cpr.AtmosphereFramework.initWebSocket(), the configuration provided as init parameter is ignored as the webSocketProtocol was already set. Several points to note:
EDIT: sounds this TODO is right: https://github.com/Atmosphere/atmosphere/blob/5d048cd8b95c62333613d5a53aab100cad57b297/modules/cpr/src/main/java/org/atmosphere/cpr/AtmosphereFramework.java#L2491 lol |
|
closing as I think this should be better handled on atmosphere side. one proposition Atmosphere/atmosphere#2535 |
the body is provided in streaming mode with JDK 25 by default. Adapted the test in this sense.
Description
I do not understand why with JDK 25, a streaming mode is used. The streaming mode seems to be something that could potentially be used as there was already the code in test where the streaming is specified. Maybe worth finding the exact explanation to be sure that adapting the test is enough and maybe provide a note in release note or if it is a bug in the component and need to fix it.
Feedback very welcome if someone already worked on this component and remember what is the expected behavior
Another note, a lot of unused code and duplicated code between test classes that would be nice to clean in another iteration.
Target
mainbranch)Tracking
Apache Camel coding standards and style
mvn clean install -DskipTestslocally from root folder and I have committed all auto-generated changes.