Affects Version/s: 1.10.1
Fix Version/s: None
Current Java generator modifies the source schema to add a property to describe the way a reader decodes a string. (see AVRO-2918)
I think this is a design problem. The way a reader deserializes a string shouldn't modify the schema (the schema describes the structure of avro message, not the way a reader converts to a usable form).
On the other hand, a reader might require the strings as a CharSequence because it knows how to handle them and other as a String.
The only way to do this now is modifying the schema itself in each reader. If you use Avro with other technologies like Kafka (or confluent) It migth be non-viable.
I think that the way a reader decodes messages should be specified by the reader and It'll be desirable to specify this using a configuration.
Maybe if a System property (like useCustomCoders feature) or something similar could be added to modify the default value for String decoding.
Maybe adding a "forced" configuration may help: if reader configures string representation, use it, if not do it the current way.
And do something similar in SpecificDatumReader