zserio
zserio copied to clipboard
Consider to use Nullable and NonNull annotations in Java
The Java 8 has introduced new annotations @Nullable
and @NonNull
. It can be very useful to use these annotation in Java generated code.
For example, Zserio knows which object fields are optional and which are mandatory. Hence, Zserio can generate the corresponding annotations in the constructor. That way the IDE would already complain if null object is passed to a @Nonnull
annotated argument.