commit | 9b89e3d64356072b135217d8f180a474d281bf26 | [log] [tgz] |
---|---|---|
author | Cole Faust <colefaust@google.com> | Fri Sep 06 13:33:14 2024 -0700 |
committer | Cole Faust <colefaust@google.com> | Fri Sep 06 13:34:50 2024 -0700 |
tree | 74f0cd1dc56f8d7a32639b4388e7655164f2dc80 | |
parent | 7c9f1454dab170a3dcb654c0f41afc03fe5233e2 [diff] |
Fix errorprone issues IgnoredPureGetter, LenientFormatStringValidation, ProtocolBufferOrdinal, and ReturnValueIgnored. https://errorprone.info/bugpatterns Bug: 253827323 Test: RUN_ERROR_PRONE=true m javac-check Change-Id: Ib0a0335aa04b36924adcbfecc830b7392c0e5bec
diff --git a/src/com/android/settings/bluetooth/Utils.java b/src/com/android/settings/bluetooth/Utils.java index f6288b2..ea293b1 100644 --- a/src/com/android/settings/bluetooth/Utils.java +++ b/src/com/android/settings/bluetooth/Utils.java
@@ -289,7 +289,7 @@ } ThreadUtils.postOnBackgroundThread(() -> { for (Supplier<?> supplier : suppliers) { - supplier.get(); + Object unused = supplier.get(); } ThreadUtils.postOnMainThread(runnable); });
diff --git a/tests/robotests/src/com/android/settings/wifi/NetworkRequestErrorDialogFragmentTest.java b/tests/robotests/src/com/android/settings/wifi/NetworkRequestErrorDialogFragmentTest.java index ada47d0..099095c 100644 --- a/tests/robotests/src/com/android/settings/wifi/NetworkRequestErrorDialogFragmentTest.java +++ b/tests/robotests/src/com/android/settings/wifi/NetworkRequestErrorDialogFragmentTest.java
@@ -74,7 +74,7 @@ @Test public void getConstructor_shouldNotThrowNoSuchMethodException() { try { - NetworkRequestErrorDialogFragment.class.getConstructor(); + Object unused = NetworkRequestErrorDialogFragment.class.getConstructor(); } catch (NoSuchMethodException e) { fail("No default constructor for configuration change!"); }