-
Notifications
You must be signed in to change notification settings - Fork 38.4k
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
LinkedMultiValueMap downstream issue with MultiValueMapAdapter package private base class #25960
Comments
We could make I'll see what we can do for 5.2.10 and 5.1.19 there, and also for 5.0.20 (since they all received the same original fix for #25140). |
That would be great, thanks for the fast reply. |
I went with making |
Perfect! thanks for the quick resolution, will test it out once 5.2.10 is available. |
…class) Closes spring-projectsgh-25960 (cherry picked from commit 82835b9)
Affects: > 5.2.9.RELEASE
Hi spring team,
i've run into an issue that is caused by a recent change in the MultiValueMap class hierarchy.
The changes introduced in the commits bec89db added a new private class MultiValueMapAdapter and LinkedMultiValueMap now inherits form this class.
Background on how LinkedMultiValueMap is implicitly used:
We cache specific spring mvc controller responses, some controller methods declare the following
Internally spring creates LinkedMultiValueMap instances for those filters.
The new class hierarchy change caused the following downstream issue:
We are using a distributed hazelcast cache cluster, this cluster holds objects that contain LinkedMultiValueMap objects.
The hazelcast nodes do not have the spring jar on the classpath, we use the User code deployment feature that deploys specific java classes to the cluster to support storing those Map instances.
Our config looked like this:
With the change i've added the new class:
Now we are getting the following exception:
The exception is thrown in the code deployment execution, reason being that the new parent class MultiValueMapAdapter has package private access.
Temporary fix:
I was able to solve the issue by re declaring the MultiValueMapAdapter class in my project code with public access.
This probably only works because of the class loader execution order.
Request:
The simplest solution would be to make the MultiValueMapAdapter class public.
I totally understand that the class is not public for a reason, but to respect backwards compatibility i would only suggest that this should be considered. I just want to mention the problem in case someone else runs into the same issue.
Another solution on our side would be adding the spring-core.jar to the hazelcast cluster classpath, but this would force us to make a custom build/config for the hazelcast nodes.
If there is another solution i would appreciate to get any input on this.
The text was updated successfully, but these errors were encountered: