Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ARTEMIS-3963 Fix setting security roles via properties on OpenJ9 JDK 11 #4195

Merged
merged 1 commit into from Aug 30, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -31,6 +31,7 @@
import java.lang.reflect.Array;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.net.URI;
import java.net.URL;
import java.security.AccessController;
Expand Down Expand Up @@ -2967,9 +2968,9 @@ private Object newNamedInstanceForCollection(String collectionPropertyName, Obje
}

// we don't know the type, infer from add method add(X x) or add(String key, X x)
final Method[] methods = hostingBean.getClass().getMethods();
final Method[] methods = hostingBean.getClass().getDeclaredMethods();
for (Method candidate : methods) {
if (candidate.getName().equals(addPropertyName) &&
if (Modifier.isPublic(candidate.getModifiers()) && candidate.getName().equals(addPropertyName) &&
(candidate.getParameterCount() == 1 ||
(candidate.getParameterCount() == 2
// has a String key
Expand Down