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

Reduce use of deprecated APIs #4334

Merged
merged 1 commit into from
Mar 29, 2023
Merged

Reduce use of deprecated APIs #4334

merged 1 commit into from
Mar 29, 2023

Conversation

hpoettker
Copy link
Contributor

The following APIs are currently deprecated:

  • org.springframework.util.Base64Utils
  • org.springframework.util.SerializationUtils#deserialize
  • java.lang.reflect.AccessibleObject#isAccessible

This PR replaces their use in the code base:

  • Base64Utils is replaced by using java.util.Base64 directly.
  • SerializationUtils#deserialize is replaced by using ObjectInputStream directly.
  • Invocations of isAccessible are removed as they are not necessary when the respective objects are not cached.

I've also replaced SerializationUtils#serialize in DefaultExecutionContextSerializer by using ObjectOutputStream directly. This way, less objects are created during execution and the code for serialization and deserialization matches more closely.

There are also some straight-forward deprecations within the code base that have been addressed.

@fmbenhassine fmbenhassine added this to the 5.0.2 milestone Mar 29, 2023
@fmbenhassine fmbenhassine merged commit e61065a into spring-projects:main Mar 29, 2023
@hpoettker hpoettker deleted the use-less-deprecated-apis branch March 29, 2023 14:31
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.

2 participants