Description
When creating a java.net.URI Object,there is no handling of a URISyntaxException.
Given a specific record generated from the following avsc:
{"namespace": "example.avro", "type": "record", "name": "User", "fields": [ {"name": "name", "type": "string"}, {"name": "favorite_number", "type": ["int", "null"]}, {"name": "favorite_color", "type": ["string", "null"]}, { "name": "ownerAddress", "type": [ "null", { "type": "string", "java-class": "java.net.URI" } ], "default": null } ] }
and class
@org.apache.avro.specific.AvroGenerated
public class User extends org.apache.avro.specific.....
{
......
private java.net.URI ownerAddress;
......
this.ownerAddress = new java.net.URI(in.readString());
//There is Unhandled exception type URISyntaxException
}{
If you want to use the customDecode method, there will be an error.
Attachments
Issue Links
- links to