From 123ae0bda7c687b63c5677b42c36f92968ba0cdd Mon Sep 17 00:00:00 2001 From: cpovirk Date: Fri, 12 Jul 2024 14:21:39 -0700 Subject: [PATCH] Fix a bad name for an exception parameter. _Some_ kind of exception is _required_ here, not merely _tolerated_. (The test _behavior_ is at least already correct: There's a `fail()` call at the end of the `try` block.) I was ready to blame this on my multicatch cl/165645769 (which I figured may have merged 2 `catch` blocks with different parameter names), but in fact the name has been wrong since the file was written back in 2008 :) RELNOTES=n/a PiperOrigin-RevId: 651885774 --- .../google/common/collect/testing/testers/ListSetTester.java | 2 +- .../google/common/collect/testing/testers/ListSetTester.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/android/guava-testlib/src/com/google/common/collect/testing/testers/ListSetTester.java b/android/guava-testlib/src/com/google/common/collect/testing/testers/ListSetTester.java index 49ee7892d45b..f2a6415200b2 100644 --- a/android/guava-testlib/src/com/google/common/collect/testing/testers/ListSetTester.java +++ b/android/guava-testlib/src/com/google/common/collect/testing/testers/ListSetTester.java @@ -113,7 +113,7 @@ public void testSet_unsupportedByEmptyList() { try { getList().set(0, e3()); fail("set() should throw UnsupportedOperationException or IndexOutOfBoundsException"); - } catch (UnsupportedOperationException | IndexOutOfBoundsException tolerated) { + } catch (UnsupportedOperationException | IndexOutOfBoundsException expected) { } expectUnchanged(); } diff --git a/guava-testlib/src/com/google/common/collect/testing/testers/ListSetTester.java b/guava-testlib/src/com/google/common/collect/testing/testers/ListSetTester.java index 49ee7892d45b..f2a6415200b2 100644 --- a/guava-testlib/src/com/google/common/collect/testing/testers/ListSetTester.java +++ b/guava-testlib/src/com/google/common/collect/testing/testers/ListSetTester.java @@ -113,7 +113,7 @@ public void testSet_unsupportedByEmptyList() { try { getList().set(0, e3()); fail("set() should throw UnsupportedOperationException or IndexOutOfBoundsException"); - } catch (UnsupportedOperationException | IndexOutOfBoundsException tolerated) { + } catch (UnsupportedOperationException | IndexOutOfBoundsException expected) { } expectUnchanged(); }