Skip to content

Commit eb37e0e

Browse files
brettchabotcopybara-androidxtest
authored andcommitted
Change ReflectionException superclass to RuntimeException.
For tests scenarios, making ReflectionException a checked exception is cumbersome and provides limited value. Most users of the axt.internal.platform.reflect APIs just catch and rethrow ReflectionException in a RuntimeException. PiperOrigin-RevId: 707236659
1 parent 2174b69 commit eb37e0e

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

runner/monitor/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
**API Changes**
1414

1515
* Update to minSdkVersion 21
16+
* Make ReflectionException a RuntimeException
1617

1718
**Breaking API Changes**
1819

runner/monitor/java/androidx/test/api/current_internal.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ package androidx.test.internal.platform.os {
6363

6464
package androidx.test.internal.platform.reflect {
6565

66-
@RestrictTo(androidx.annotation.RestrictTo.Scope.LIBRARY_GROUP) public class ReflectionException extends java.lang.Exception {
66+
@RestrictTo(androidx.annotation.RestrictTo.Scope.LIBRARY_GROUP) public class ReflectionException extends java.lang.RuntimeException {
6767
}
6868

6969
@RestrictTo(androidx.annotation.RestrictTo.Scope.LIBRARY_GROUP) public class ReflectiveField<T> {

runner/monitor/java/androidx/test/internal/platform/reflect/ReflectionException.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
* @hide
2525
*/
2626
@RestrictTo(Scope.LIBRARY_GROUP)
27-
public class ReflectionException extends Exception {
27+
public class ReflectionException extends RuntimeException {
2828

2929
ReflectionException(Exception cause) {
3030
super("Reflection access failed", cause);

0 commit comments

Comments
 (0)