-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Cannot use Kotlin property syntax on ContainerProperties.idleEventInterval since release 2.7.3 #1900
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
Comments
psychobaatezu
added a commit
to psychobaatezu/spring-kafka
that referenced
this issue
Aug 5, 2021
Possible fix : #1901 |
psychobaatezu
added a commit
to psychobaatezu/spring-kafka
that referenced
this issue
Aug 10, 2021
…g nullable getters.
garyrussell
pushed a commit
to garyrussell/spring-kafka
that referenced
this issue
Aug 10, 2021
…g nullable getters.
garyrussell
pushed a commit
that referenced
this issue
Aug 10, 2021
garyrussell
pushed a commit
that referenced
this issue
Aug 10, 2021
Add @nullable to setters for the corresponding nullable getters.
Thanks; merged and cherry-picked to 2.7.x. |
garyrussell
added a commit
that referenced
this issue
Aug 11, 2021
garyrussell
added a commit
that referenced
this issue
Aug 11, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Since release 2.7.3, it's not possible anymore to use the Kotlin property syntax on ContainerProperties.idleEventInterval field.
This is caused by this commit : 0ee2d49
Granted, the field is actually nullable. But by adding the annotation on the getter instead of the actual field, it tells the Kotlin interpreter that the getter will return a nullable Long type (Long?) and the setter will apply the given value to a non-nullable Long Type (Long). This discrepancy blocks Kotlin property syntax because the underneath getter/setter are not for the same type.
So to use 2.7.3, existing code need to change to this to continue to work :
The solution to solve that is to put
@Nullable
annotation on the field instead, which by the way is more accurate.The text was updated successfully, but these errors were encountered: