aboutsummaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authoremcmanus <emcmanus@google.com>2020-01-10 09:09:05 -0800
committerColin Decker <cgdecker@gmail.com>2020-01-13 12:41:20 -0500
commitbd7bed2e4df1b4012f4c97f7d09bfc54eca1c12d (patch)
tree34ad368c635a131b57efe3d9b66fb62c7ebfb280 /util
parent65087f1953253e1b0d00b4e29b21722b9640a102 (diff)
downloadauto-bd7bed2e4df1b4012f4c97f7d09bfc54eca1c12d.tar.gz
Make it an error if a setter has a @Nullable parameter when the property being set is not @Nullable. We will generate code that rejects a null parameter whether or not @Nullable is present, so allowing it is just misleading users of the API.
The mirror situation, where the property is @Nullable but the setter is not, is arguably also incorrect. In that case the generated code does *not* reject a null parameter, even though we might expect it to in the absence of @Nullable on the parameter. However, changing that would surely break a lot of existing code. Fixes https://github.com/google/auto/issues/777. RELNOTES=It is now a compilation error if a setter method in a builder has a parameter marked @Nullable when the corresponding property is not in fact @Nullable. This already generated a NullPointerException at runtime. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=289103954
Diffstat (limited to 'util')
0 files changed, 0 insertions, 0 deletions