mirror of https://github.com/apache/cassandra
Merge 4c606d4368 into 10557d7ffe
This commit is contained in:
commit
34506ddccc
|
|
@ -27,6 +27,7 @@ import java.net.InetAddress;
|
||||||
import java.net.UnknownHostException;
|
import java.net.UnknownHostException;
|
||||||
import java.nio.ByteBuffer;
|
import java.nio.ByteBuffer;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
@ -118,6 +119,11 @@ public class JMXStandardsTest
|
||||||
.add(Exception.class)
|
.add(Exception.class)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* These are the method names that shouldn't be included in this test
|
||||||
|
*/
|
||||||
|
private static final Set<String> IGNORE_METHODS = ImmutableSet.of("$jacocoInit");
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void interfaces() throws ClassNotFoundException
|
public void interfaces() throws ClassNotFoundException
|
||||||
{
|
{
|
||||||
|
|
@ -134,7 +140,9 @@ public class JMXStandardsTest
|
||||||
for (Class<?> klass = Class.forName(className); klass != null && !Object.class.equals(klass); klass = klass.getSuperclass())
|
for (Class<?> klass = Class.forName(className); klass != null && !Object.class.equals(klass); klass = klass.getSuperclass())
|
||||||
{
|
{
|
||||||
Assertions.assertThat(klass).isInterface();
|
Assertions.assertThat(klass).isInterface();
|
||||||
Method[] methods = klass.getDeclaredMethods();
|
Method[] methods = Arrays.stream(klass.getDeclaredMethods())
|
||||||
|
.filter(m -> !IGNORE_METHODS.contains(m.getName()))
|
||||||
|
.toArray(Method[]::new);
|
||||||
for (int i = 0; i < methods.length; i++)
|
for (int i = 0; i < methods.length; i++)
|
||||||
{
|
{
|
||||||
Method method = methods[i];
|
Method method = methods[i];
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue