zserio icon indicating copy to clipboard operation
zserio copied to clipboard

Consider to use Nullable and NonNull annotations in Java

Open mikir opened this issue 4 years ago • 0 comments

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.

mikir avatar Apr 30 '20 08:04 mikir