mirror of
https://github.com/apache/activemq.git
synced 2025-02-09 19:45:55 +00:00
Checking for the correct number of arguments before reflectively invoking a method in DefaultAuthorizationMap (cherry picked from commit 6be36305f6669ded47bcd33016583a86bdda04dd)
This commit is contained in:
parent
33e70292d4
commit
6271a7e353
@ -241,7 +241,7 @@ public class DefaultAuthorizationMap extends DestinationMap implements Authoriza
|
||||
Object instance;
|
||||
for (i = 0; i < constructors.length; i++) {
|
||||
Class<?>[] paramTypes = constructors[i].getParameterTypes();
|
||||
if (paramTypes.length != 0 && paramTypes[0].equals(String.class)) {
|
||||
if (paramTypes.length == 1 && paramTypes[0].equals(String.class)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -253,7 +253,7 @@ public class DefaultAuthorizationMap extends DestinationMap implements Authoriza
|
||||
i = 0;
|
||||
for (i = 0; i < methods.length; i++) {
|
||||
Class<?>[] paramTypes = methods[i].getParameterTypes();
|
||||
if (paramTypes.length != 0 && methods[i].getName().equals("setName") && paramTypes[0].equals(String.class)) {
|
||||
if (paramTypes.length == 1 && methods[i].getName().equals("setName") && paramTypes[0].equals(String.class)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user