reta commented on PR #2148: URL: https://github.com/apache/cxf/pull/2148#issuecomment-2476559111
> The CXF tests are run with "--add-opens java.base/java.lang=ALL-UNNAMED" by default. The test ClientServerExceptionTest.exceptionCustomExceptionMessageIsPreserved fails without it. The test is bit misleading, as the CXF-9076 is about using jdk17+ without add-opens. That is right, although I've tested it manually, the tests have to be run without `--add-opens`, I will try to isolate those since it is not only related to this specific test case > As I understand, using this PR with JDK17+ without add-opens: java.lang.*Exceptions will have detailMessages, if it has a constructor(String, Throwable). Any other (Sub)Exception will not have it, so that we can have member variables in subclasses. Right > All in all, this and the previous PR are small step to right direction, but are not a complete solution to the general problem. Right, this is a best effort. > Unfortunately I do not have a suggestion for a correct way of doing this. Dynamic Proxy works only with interfaces(?), so a way to create instance with getMessage returning correct value would propably need bytecode manipulation stuff. I think it all runs down to the edge cases (and how often they appear in the wild), if we cover 80%+ with this fix, it is already a win I believe. Thanks @huhmare -- 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: dev-unsubscr...@cxf.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org