mirror of
https://github.com/androidx/media.git
synced 2025-05-07 23:50:44 +08:00
Use TestUtil.getPublicMethods instead of getDeclaredMethods
JaCoCo introduces private synthetic methods (even on interfaces) which have to be skipped when checking that a 'forwarding' implementation does forward everything. Instead we can use the existing `getPublicMethods()` method which implicitly skips these (since they're private). PiperOrigin-RevId: 533130932 (cherry picked from commit 620b9e15403b5138e7b3f44194b10e5ae7f72a8c)
This commit is contained in:
parent
400218c018
commit
9c1a80082f
@ -65,7 +65,7 @@ public class SimpleBasePlayerTest {
|
||||
|
||||
@Test
|
||||
public void allPlayerInterfaceMethods_declaredFinal() throws Exception {
|
||||
for (Method method : Player.class.getDeclaredMethods()) {
|
||||
for (Method method : TestUtil.getPublicMethods(Player.class)) {
|
||||
assertThat(
|
||||
SimpleBasePlayer.class
|
||||
.getMethod(method.getName(), method.getParameterTypes())
|
||||
|
Loading…
x
Reference in New Issue
Block a user