Commit 763ef2b9 by aquilescanta Committed by Oliver Woodman

Avoid type-ambiguous overloads in ExoPlaybackExceptionTest

PiperOrigin-RevId: 372942778
parent 5167ca65
......@@ -31,7 +31,7 @@ public class ExoPlaybackExceptionTest {
public void roundTripViaBundle_ofExoPlaybackExceptionTypeRemote_yieldsEqualInstance() {
ExoPlaybackException before = ExoPlaybackException.createForRemote(/* message= */ "test");
ExoPlaybackException after = ExoPlaybackException.CREATOR.fromBundle(before.toBundle());
assertThat(areEqual(before, after)).isTrue();
assertThat(areExoPlaybackExceptionsEqual(before, after)).isTrue();
}
@Test
......@@ -46,7 +46,7 @@ public class ExoPlaybackExceptionTest {
/* isRecoverable= */ true);
ExoPlaybackException after = ExoPlaybackException.CREATOR.fromBundle(before.toBundle());
assertThat(areEqual(before, after)).isTrue();
assertThat(areExoPlaybackExceptionsEqual(before, after)).isTrue();
}
@Test
......@@ -61,7 +61,8 @@ public class ExoPlaybackExceptionTest {
assertThat(after.getCause()).hasMessageThat().isEqualTo(before.getCause().getMessage());
}
private static boolean areEqual(ExoPlaybackException a, ExoPlaybackException b) {
private static boolean areExoPlaybackExceptionsEqual(
ExoPlaybackException a, ExoPlaybackException b) {
if (a == null || b == null) {
return a == b;
}
......@@ -73,10 +74,10 @@ public class ExoPlaybackExceptionTest {
&& a.rendererFormatSupport == b.rendererFormatSupport
&& a.timestampMs == b.timestampMs
&& a.isRecoverable == b.isRecoverable
&& areEqual(a.getCause(), b.getCause());
&& areThrowablesEqual(a.getCause(), b.getCause());
}
private static boolean areEqual(Throwable a, Throwable b) {
private static boolean areThrowablesEqual(Throwable a, Throwable b) {
if (a == null || b == null) {
return a == b;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment