diff options
author | Roman Kalukiewicz <romkal@google.com> | 2020-10-14 15:59:06 -0700 |
---|---|---|
committer | Roman Kalukiewicz <romkal@google.com> | 2020-10-15 10:48:01 -0700 |
commit | 2883f7ab9e740b5da3c872b9fe675691ddfc322d (patch) | |
tree | a535b4697a4f732d4d7c15c2f01568a43735e5dc /framework/java/android/bluetooth/le/ScanResult.java | |
parent | fd0264438326c6570e689274b056e5d25987c78d (diff) |
Add @Nullable annotation to the parameter of Object.equals() methods.
Those annotations could be inferred by some tools (like Kotlin), but the
https://checkerframework.org/ doesn't check inherited annotations
complaining about all equals() invocations that get nullable argument.
The change was generated by running
find . -name \*.java | xargs sed -i 's/public boolean equals(Object /public boolean equals(@Nullable Object /'
in the frameworks/base directory and by automatically adding and
formatting required imports if needed. No manual edits.
Bug: 170883422
Test: Annotation change only. Should have not impact.
Exempt-From-Owner-Approval: Mechanical change not specific to any component.
Change-Id: I5eedb571c9d78862115dfdc5dae1cf2a35343580
Diffstat (limited to 'framework/java/android/bluetooth/le/ScanResult.java')
-rw-r--r-- | framework/java/android/bluetooth/le/ScanResult.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/framework/java/android/bluetooth/le/ScanResult.java b/framework/java/android/bluetooth/le/ScanResult.java index 855d345417..57dad1a025 100644 --- a/framework/java/android/bluetooth/le/ScanResult.java +++ b/framework/java/android/bluetooth/le/ScanResult.java @@ -309,7 +309,7 @@ public final class ScanResult implements Parcelable { } @Override - public boolean equals(Object obj) { + public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } |