Annotate getters with @Pure when --java-checkerframework is specified. (#5510)
authorjaceksur <39417826+jaceksur@users.noreply.github.com>
Tue, 10 Sep 2019 17:01:27 +0000 (10:01 -0700)
committerWouter van Oortmerssen <aardappel@gmail.com>
Tue, 10 Sep 2019 17:01:27 +0000 (10:01 -0700)
commit782b865c5533ad020a61ae79ec8a658acfa96861
tree6b55f80fad5904b550fbac3abaa9981d002cc8d8
parent3bfc86eaff10b26cb6507c904ad74ecd9e72f80b
Annotate getters with @Pure when --java-checkerframework is specified. (#5510)

Together with @Nullable, this allows users to use static analysis tools
like CheckerFramework to catch NPEs caused by unset fields.
include/flatbuffers/idl.h
src/flatc.cpp
src/idl_gen_general.cpp