-
Notifications
You must be signed in to change notification settings - Fork 18
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
Bug: empty string serde and Kotlin in 2.8.2 #794
base: 2.9.x
Are you sure you want to change the base?
Conversation
There is an issue in 2.8.2 when serializing an empty string to a non-null field in Kotlin. This works in 2.8.1, and was exposed by the eclipsestore guide https://github.com/micronaut-projects/micronaut-guides/pull/1443\#commits-pushed-0276ab1
Actually, I'm not sure if this reproducer is correct... Going back to earlier commits, the Kotlin tests in this PR still seem to fail, and I'm not sure why... However in the EclipseStore guide (check out micronaut-guides, and run
To the build of the kotlin guide does make it pass... |
* Disable Kotlin Microstream/EclipseStore guide due to micronaut-projects/micronaut-serialization#794
It looks correct to me; the default inclusion setting is NON_EMPTY. So, an empty string is omitted. |
@dstepanov did something change to make the old way invalid? As far as I can see, this used to work |
Not sure, maybe the configuration of the inclusion wasn't properly delegated? |
I think there was additional String Serde that didn't had implemented isEmpty method 6489c8e#diff-56e4febbd38eabfee4eb5f5829aa0e2a3b0a9af1d7be8dcb75bb6dd8673b9ae4L183 |
* Disable Kotlin Microstream/EclipseStore guide due to micronaut-projects/micronaut-serialization#794
I believe there is an issue in 2.8.2 when serializing an empty string to a non-null field in Kotlin, which is reproduced by this PR.
Instead of the expected validation error
fruitCommand.name: must not be empty
, with Kotlin we get:This works in 2.8.1, and was exposed by the eclipsestore guide https://github.com/micronaut-projects/micronaut-guides/pull/1443\#commits-pushed-0276ab1