Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid XStream causing illegal access issues for internal JDK collections #24872

Merged
merged 3 commits into from
Apr 11, 2022

Conversation

geoand
Copy link
Contributor

@geoand geoand commented Apr 11, 2022

Fixes #24492

@geoand
Copy link
Contributor Author

geoand commented Apr 11, 2022

@snazy do you mind if I borrow your commit and only keep the tests?

@snazy
Copy link
Contributor

snazy commented Apr 11, 2022

@snazy do you mind if I borrow your commit and only keep the tests?

Sure! Take that one :)

I suspect, this change also needs a custom converter for Map?

@geoand geoand marked this pull request as ready for review April 11, 2022 13:10
@geoand
Copy link
Contributor Author

geoand commented Apr 11, 2022

Done, PR updated

@geoand geoand requested a review from gsmet April 11, 2022 13:10
Copy link
Member

@gsmet gsmet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Woot!
We might have to add more in the future but with the infrastructure in place, that will be easy!

@gsmet gsmet added triage/backport? triage/waiting-for-ci Ready to merge when CI successfully finishes labels Apr 11, 2022
@geoand
Copy link
Contributor Author

geoand commented Apr 11, 2022

Thanks again for the idea! It was marvelously simple and effective

@famod
Copy link
Member

famod commented Apr 11, 2022

I suppose we are ok with loosing the immutable semantics?

@geoand
Copy link
Contributor Author

geoand commented Apr 11, 2022

That would only be a problem if folks where actually adding information into the parameters in the test methods.
I don't think it's something we have to worry about in this case

@famod
Copy link
Member

famod commented Apr 11, 2022

I also do think making it work in general is more important than retaining immutability.

@snazy
Copy link
Contributor

snazy commented Apr 11, 2022

It's for the test method(s) parameters, so I doubt that immutability matters (a lot).

@gsmet
Copy link
Member

gsmet commented Apr 11, 2022

Yeah, I think we are fine losing immutability for that. That's why I suggested this approach.
Worst case, you can wrap these in a Collections.toUnmodifiable... if these are supported by XStream.

@geoand geoand merged commit aa1f7ef into quarkusio:main Apr 11, 2022
@quarkus-bot quarkus-bot bot added this to the 2.9 - main milestone Apr 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Quarkus testing with @ParameterizedTest broken with Java 17 + 18 (xstream)
4 participants