Skip to content

Commit

Permalink
Comment about empty catch statements
Browse files Browse the repository at this point in the history
  • Loading branch information
mernst authored Oct 5, 2024
1 parent 94f22f6 commit 5036387
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ repositories {
}

ext {
errorproneVersion = '2.32.0'
errorproneVersion = '2.33.0'
isJava17orHigher = JavaVersion.current() >= JavaVersion.VERSION_17
isJava21orHigher = JavaVersion.current() >= JavaVersion.VERSION_21
}
Expand Down
2 changes: 2 additions & 0 deletions src/test/java/org/plumelib/util/ArraysPlumeTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,13 @@ public void testMinAndMax() {
ArraysPlume.minAndMax(new int[] {});
throw new Error("Didn't throw ArrayIndexOutOfBoundsException");
} catch (ArrayIndexOutOfBoundsException e) {
// This is the expected behavior, so do nothing.
}
try {
ArraysPlume.minAndMax(new long[] {});
throw new Error("Didn't throw ArrayIndexOutOfBoundsException");
} catch (ArrayIndexOutOfBoundsException e) {
// This is the expected behavior, so do nothing.
}

// public static int elementRange(int[] a)
Expand Down
1 change: 1 addition & 0 deletions src/test/java/org/plumelib/util/MathPlumeTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ public void test_pow() {
MathPlume.pow(3, -3);
throw new Error("Didn't throw ArithmeticException");
} catch (ArithmeticException e) {
// This is the expected behavior, so do nothing.
}
}

Expand Down

0 comments on commit 5036387

Please sign in to comment.