jackson-module-kotlin icon indicating copy to clipboard operation
jackson-module-kotlin copied to clipboard

Regression: is-getter detection error

Open guai opened this issue 4 years ago • 2 comments

following kotlin class (stripped for simplicity) have been converting to json ok in com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.11.4 and causes error Conflicting getter definitions for property "iscsi": Volume#getIscsi() vs Volume#getCsi() in later versions

import io.k8s.api.core.v1.*

open class Volume(
    val csi : CSIVolumeSource?,
    val iscsi : ISCSIVolumeSource?,
)

in java it looks like this

public class Volume {
   public final CSIVolumeSource getCsi() { return this.csi; }
   public final ISCSIVolumeSource getIscsi() { return this.iscsi; }
}

as you can see there is no booleans here. so no is-getters detection logic should be applied, but it seems it does.

guai avatar Apr 11 '22 14:04 guai

Btw, is there a workaround via mixins?

guai avatar Apr 11 '22 14:04 guai

Wrong repo, will transfer to Kotlin module.

cowtowncoder avatar Apr 11 '22 21:04 cowtowncoder

This issue will be fixed by #630 and therefore closed as a duplicate.

k163377 avatar Mar 04 '23 01:03 k163377