Alessandro Tagliapietra
01/31/2020, 1:51 AM{
"name": "parameters",
"type": [
"null",
{
"type": "array",
"items": "Parameter"
}
],
"default": null
so it can have a null value but the avro generator generates a java getter like this
public java.util.List<Parameter> getParameters() {
return parameters;
}
my problem is that when calling getParameters that returns null I get
java.lang.IllegalStateException: order.getParameters() must not be null
Barco
01/31/2020, 2:03 AM@Nullable
annotation. Is there a way for Avro to apply that?Alessandro Tagliapietra
01/31/2020, 3:10 AMAlessandro Tagliapietra
01/31/2020, 3:11 AMorder.getParameters() as List<Type>?
and it's working fine but I have to repeat that every time I call the functionBarco
01/31/2020, 3:12 AMBarco
01/31/2020, 3:13 AMAlessandro Tagliapietra
01/31/2020, 3:16 AMAlessandro Tagliapietra
01/31/2020, 3:16 AMAlessandro Tagliapietra
01/31/2020, 3:19 AMCauses an Avro union with null to be usedwhich is the same exact thing so probably it wouldn't work anyway
itnoles
01/31/2020, 9:30 PM