Skip to content

Conversation

Kiminni
Copy link
Contributor

@Kiminni Kiminni commented Aug 8, 2025

This PR removes the deprecated Utf8StringCodec class as discussed in #3328.

Important Note

Existing code that uses Utf8StringCodec should migrate to StringCodec.UTF8 for identical functionality:

  • StringCodec.UTF8 provides the same UTF-8 encoding behavior
  • All existing functionality remains available through the standard StringCodec implementation
  • Performance characteristics are identical

This approach removes the deprecated class while providing a clear migration path. All existing tests continue to pass without modification.

This PR is a follow-up to #1137 and addresses part of #3328.

Changes Made

  • Removed src/main/java/io/lettuce/core/codec/Utf8StringCodec.java
  • Removed src/test/java/io/lettuce/core/Utf8StringCodecIntegrationTests.java
  • Removed src/test/jmh/io/lettuce/core/codec/Utf8StringCodecBenchmark.java
  • Updated CommandBenchmark.java to use StringCodec.UTF8 instead of new Utf8StringCodec()
  • Cleaned up unused imports in test files

Copy link
Collaborator

@tishun tishun left a comment

Choose a reason for hiding this comment

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

LGTM

Thanks for the contribution!

@tishun tishun added this to the 7.0.0.RELEASE milestone Aug 8, 2025
@tishun tishun added the type: breaking Breaking change label Aug 8, 2025
@tishun tishun merged commit 9c03e5d into redis:main Aug 8, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: breaking Breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants