From 3a2c5355924656c1923b5543aa5883af14390faa Mon Sep 17 00:00:00 2001 From: Mike Mansell Date: Thu, 10 May 2018 09:27:23 -0700 Subject: [PATCH] Remove @Nullable (Java) for required fields (fixes #4724) (#4726) @Nullable is only a compiler informational attribute. Removing for required fields improves compiler warnings but doesn't impact any running code. --- src/idl_gen_general.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/idl_gen_general.cpp b/src/idl_gen_general.cpp index 788da83d7..f9fe6cfcc 100644 --- a/src/idl_gen_general.cpp +++ b/src/idl_gen_general.cpp @@ -861,7 +861,7 @@ class GeneralGenerator : public BaseGenerator { std::string dest_cast = DestinationCast(field.value.type); std::string src_cast = SourceCast(field.value.type); std::string method_start = " public " + - GenNullableAnnotation(field.value.type) + + (field.required ? "" : GenNullableAnnotation(field.value.type)) + type_name_dest + optional + " " + MakeCamel(field.name, lang_.first_camel_upper); std::string obj = lang_.language == IDLOptions::kCSharp