for example I have a field like ``` { ...
# announcements
for example I have a field like
Copy code
        "name": "parameters",
        "type": [
            "type": "array",
            "items": "Parameter"
        "default": null
so it can have a null value but the avro generator generates a java getter like this
Copy code
public java.util.List<Parameter> getParameters() {
    return parameters;
my problem is that when calling getParameters that returns null I get
Copy code
java.lang.IllegalStateException: order.getParameters() must not be null
The nullability interop with Kotlin is acheived using the
annotation. Is there a way for Avro to apply that?
@Barco I haven't found any reference to that
for now I'm using
order.getParameters() as List<Type>?
and it's working fine but I have to repeat that every time I call the function
We're using avsc files unfortunately not java 😕 I'll check however if there's a way to do so in the avsc file, seems setting default as null and type as nullable with the union syntax is enough
thank you very much 🙂
👍 1
also in that description:
Causes an Avro union with null to be used
which is the same exact thing so probably it wouldn't work anyway
I found something like