From 51886971683227177ab3ce307cd28c6c98f1303e Mon Sep 17 00:00:00 2001 From: Craig Perkins Date: Wed, 27 Sep 2023 21:14:27 -0400 Subject: [PATCH] Use getMethods Signed-off-by: Craig Perkins --- .../java/org/opensearch/rest/DelegatingRestHandlerTests.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/test/java/org/opensearch/rest/DelegatingRestHandlerTests.java b/server/src/test/java/org/opensearch/rest/DelegatingRestHandlerTests.java index 2db6cdac0dd4c..ca802a7784ca0 100644 --- a/server/src/test/java/org/opensearch/rest/DelegatingRestHandlerTests.java +++ b/server/src/test/java/org/opensearch/rest/DelegatingRestHandlerTests.java @@ -35,7 +35,7 @@ public void handleRequest(RestRequest request, RestChannel channel, NodeClient c RestHandler handlerSpy = spy(rh); DelegatingRestHandler drh = new DelegatingRestHandler(handlerSpy); - List overridableMethods = Arrays.stream(RestHandler.class.getDeclaredMethods()) + List overridableMethods = Arrays.stream(RestHandler.class.getMethods()) .filter( m -> !(Modifier.isPrivate(m.getModifiers()) || Modifier.isStatic(m.getModifiers()) || Modifier.isFinal(m.getModifiers())) )