summaryrefslogtreecommitdiff
path: root/include/ScopedJavaUnicodeString.h
diff options
context:
space:
mode:
authorPete Gillin <peteg@google.com>2018-06-07 17:08:44 +0100
committerPete Gillin <peteg@google.com>2018-06-07 17:30:32 +0100
commitdf047a2dcf17fc2841d0f8aaed3094cf6e13940c (patch)
tree746c33229fc5014fdec37699db445b1a9f9b32e5 /include/ScopedJavaUnicodeString.h
parent5bf48cb062885f1ecc6c1699e0b57aaabed8df66 (diff)
Annotate java.io.PrintWriter.
You can see the source files with the annotations in https://android-review.googlesource.com/c/platform/libcore/+/701254 (which obviously is not intended for submission). The .jaif changes here were copy-and-pasted from the results of running the extract-annotations tool on those sources. Most of this is straightforward. The constructors mostly don't actually throw NPE if you pass a null to them, but you do get a useless PrintWriter back, so it seems sensible to annotate those as @NonNull. You can pass a null array to the printf-style methods with something like this: printf("message", (Object[]) null). The javadoc doesn't specify what happens if you try. The implementation seems to accept it. However, without a guarantee, it seems safer to mark that argument as @NonNull. It's a very odd thing to write, anyway. The contents of the array/varargs are @Nullable since it is legal to write e.g. printf("this is %s", null) which passes a non-null array containing a null object. Test: make docs Bug: 64930165 Change-Id: I2d2788714a2df24b253490c83dd0f8b4316feef9
Diffstat (limited to 'include/ScopedJavaUnicodeString.h')
0 files changed, 0 insertions, 0 deletions