summaryrefslogtreecommitdiff
path: root/annotations/generate_annotated_java_files.py
diff options
context:
space:
mode:
authorPete Gillin <peteg@google.com>2018-10-25 19:06:35 +0100
committerPete Gillin <peteg@google.com>2018-11-01 18:47:18 +0000
commit09e9a64a18b80cfb8178a765d98b2bcdedfbcd7f (patch)
tree5c3e7d257d87f86ab7a4588ae5a11186b75219b4 /annotations/generate_annotated_java_files.py
parent54a2da7f5009992e4658240389f0665a197b4fc6 (diff)
Add nullability annotations to some j.u.Locale and Calendar.
Notes: - The Calendar constructor does actually accept a null Locale argument. But there's a TODO saying that it's for backwards compatibility only and should be changed to check and throw in future. This change annotates it as @NonNull because otherwise that future change would be impossible. - It may not be entirely guaranteed that the keys and values of the Map returned by Calendar.getDisplayNames are not null, but it seems to be the intention, based on the javadoc and all the known code paths. - Locale.Builder.setLanguageTag's javadoc claims that it accepts a null argument, but the implementation does not. (There is an open bug about this.) This change annotates it as @NonNull to reflect the real behaviour. - Locale.parse and Locale.mapEquivalents don't actually throw if their Map arguements contain nulls in all cases, but it seems to be the intention that they shouldn't, based on javadoc, so this change annotates them all as @NonNull. Bug: 64930165 Test: treehugger Change-Id: I61bd750f0df57774e68ce124e739136119a76a86
Diffstat (limited to 'annotations/generate_annotated_java_files.py')
0 files changed, 0 insertions, 0 deletions