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

Hyphen keys are converted to camelCase with Caffeine Cache #810

Open
dcalap opened this issue Oct 4, 2024 · 0 comments
Open

Hyphen keys are converted to camelCase with Caffeine Cache #810

dcalap opened this issue Oct 4, 2024 · 0 comments

Comments

@dcalap
Copy link

dcalap commented Oct 4, 2024

Expected Behavior

When a Map with a String key that contains hyphen is cached (for instance "an-example"), when accessing through the cache, the key should be the same ("an-example").

Actual Behaviour

When a Map with a String key that contains hyphen is cached (for instance "an-example"), when accessing through the cache, the key is converted to camelCase ("anExample").

Steps To Reproduce

Download and run https://github.com/dcalap/micronaut-cache-bug

Perform a GET http://localhost:8080/cacheBug

The first time you will see an-id-with-hypen

Perform again a GET http://localhost:8080/cacheBug

The second time you will see anIdWithHypen

Environment Information

macOS, OpenJDK Runtime Environment Temurin-17.0.8.1+1 (build 17.0.8.1+1)
Micronaut 4.6.2 with Java 17, Gradle, and Micronaut Caffeine Cache

Example Application

https://github.com/dcalap/micronaut-cache-bug

Version

4.6.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

1 participant