-
-
Notifications
You must be signed in to change notification settings - Fork 144
Closed
Labels
2.19avrohas-failing-testIndicates that there exists a test case (under `failing/`) to reproduce the issueIndicates that there exists a test case (under `failing/`) to reproduce the issue
Description
Enums with '-' characters in values, fails
public enum EnumTypeContrat {
CARD_S("CARD-S"),
CARD_ELD("CARD-ELD"),
GRD_F("GRD-F"),
CSD("CSD"),
GRD_RE("GRD-RE"),
PROTOC_501("PROTOC-501"),
CRAE("CRAE"),
CARD_I("CARD-I"),
CSD_I("CSD-I");
private final String value;
EnumTypeContrat(String value) {
this.value = value;
}
}
The error is :
org.apache.avro.SchemaParseException: Illegal character in: CARD-S
at org.apache.avro.Schema.validateName(Schema.java:1566)
at org.apache.avro.Schema.access$400(Schema.java:91)
at org.apache.avro.Schema$Field.<init>(Schema.java:546)
at org.apache.avro.Schema$Field.<init>(Schema.java:585)
at com.fasterxml.jackson.dataformat.avro.schema.RecordVisitor.schemaFieldForWriter(RecordVisitor.java:189)
at com.fasterxml.jackson.dataformat.avro.schema.RecordVisitor.optionalProperty(RecordVisitor.java:117)
at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.depositSchemaProperty(BeanPropertyWriter.java:843)
at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.acceptJsonFormatVisitor(BeanSerializerBase.java:914)
at com.fasterxml.jackson.databind.ser.DefaultSerializerProvider.acceptJsonFormatVisitor(DefaultSerializerProvider.java:565)
at com.fasterxml.jackson.databind.ObjectMapper.acceptJsonFormatVisitor(ObjectMapper.java:4670)
at com.fasterxml.jackson.databind.ObjectMapper.acceptJsonFormatVisitor(ObjectMapper.java:4649)
are there any reason for checking the enum value ? as it is generated as an avro string ?
Metadata
Metadata
Assignees
Labels
2.19avrohas-failing-testIndicates that there exists a test case (under `failing/`) to reproduce the issueIndicates that there exists a test case (under `failing/`) to reproduce the issue