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
This commit is contained in:
Cole Faust
2024-09-06 13:33:14 -07:00
parent 7c9f1454da
commit 9b89e3d643
2 changed files with 2 additions and 2 deletions

View File

@@ -289,7 +289,7 @@ public final class Utils {
} }
ThreadUtils.postOnBackgroundThread(() -> { ThreadUtils.postOnBackgroundThread(() -> {
for (Supplier<?> supplier : suppliers) { for (Supplier<?> supplier : suppliers) {
supplier.get(); Object unused = supplier.get();
} }
ThreadUtils.postOnMainThread(runnable); ThreadUtils.postOnMainThread(runnable);
}); });

View File

@@ -74,7 +74,7 @@ public class NetworkRequestErrorDialogFragmentTest {
@Test @Test
public void getConstructor_shouldNotThrowNoSuchMethodException() { public void getConstructor_shouldNotThrowNoSuchMethodException() {
try { try {
NetworkRequestErrorDialogFragment.class.getConstructor(); Object unused = NetworkRequestErrorDialogFragment.class.getConstructor();
} catch (NoSuchMethodException e) { } catch (NoSuchMethodException e) {
fail("No default constructor for configuration change!"); fail("No default constructor for configuration change!");
} }