Description
I have the following types:
trait ShipmentRelated { @NotBlank String shipmentId } class ShipmentLocationRequest extends Base implements ShipmentRelated {}
In Groovy 3, this compiles correctly:
private java.lang.String com_example_logistics_ShipmentRelated__shipmentId; descriptor: Ljava/lang/String; flags: (0x0002) ACC_PRIVATE RuntimeVisibleAnnotations: 0: #17() javax.validation.constraints.NotBlank
In Groovy 4 with identical source, I get duplicate annotations (annotation sections?):
private java.lang.String com_example_logistics_ShipmentRelated__shipmentId; descriptor: Ljava/lang/String; flags: (0x0002) ACC_PRIVATE RuntimeVisibleAnnotations: 0: #17() javax.validation.constraints.NotBlank RuntimeVisibleTypeAnnotations: 0: #17(): FIELD javax.validation.constraints.NotBlank
This causes an AnnotationFormatError at runtime.