diff --git a/src/idl_gen_general.cpp b/src/idl_gen_general.cpp index 47e035b8b..30564bf84 100644 --- a/src/idl_gen_general.cpp +++ b/src/idl_gen_general.cpp @@ -252,7 +252,8 @@ class GeneralGenerator : public BaseGenerator { std::string GenNullableAnnotation(const Type &t) const { return lang_.language == IDLOptions::kJava && parser_.opts.gen_nullable && - !IsScalar(DestinationType(t, true).base_type) + !IsScalar(DestinationType(t, true).base_type) && + t.base_type != BASE_TYPE_VECTOR ? " @Nullable " : ""; }