-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
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
Fixing NotSerializableException: org.acegisecurity.context.SecurityContext$1
#8918
Conversation
} | ||
|
||
@Override | ||
public Authentication getAuthentication() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ignore ws
/label ready-for-merge This PR is now ready for merge, after ~24 hours, we will merge it if there's no negative feedback. Thanks! |
|
||
/** | ||
* @deprecated Use {@link ACL#as(User)} or {@link org.springframework.security.core.context.SecurityContext} | ||
*/ | ||
@Deprecated | ||
public interface SecurityContext { | ||
public interface SecurityContext extends Serializable { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that just this line suffices to make the tests pass. I refactored the inner classes to member classes since it is not a good practice to use inner classes for anything that might be serialized.
While testing some CloudBees CI code in a non-production context involving serialized web sessions, I noticed an error
Looking into #4848 I noticed that I had forgotten
implements Serializable
in a spot:Testing done
Test without patch:
Proposed changelog entries
Before the changes are marked as
ready-for-merge
:Maintainer checklist
upgrade-guide-needed
label is set and there is a Proposed upgrade guidelines section in the pull request title (see example).lts-candidate
to be considered (see query).