activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cshan...@apache.org
Subject activemq git commit: https://issues.apache.org/jira/browse/AMQ-6337
Date Thu, 23 Jun 2016 20:35:55 GMT
Repository: activemq
Updated Branches:
  refs/heads/master 3dfda807f -> 6be36305f


https://issues.apache.org/jira/browse/AMQ-6337

Checking for the correct number of arguments before reflectively
invoking a method in DefaultAuthorizationMap


Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/6be36305
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/6be36305
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/6be36305

Branch: refs/heads/master
Commit: 6be36305f6669ded47bcd33016583a86bdda04dd
Parents: 3dfda80
Author: Christopher L. Shannon (cshannon) <christopher.l.shannon@gmail.com>
Authored: Thu Jun 23 20:34:50 2016 +0000
Committer: Christopher L. Shannon (cshannon) <christopher.l.shannon@gmail.com>
Committed: Thu Jun 23 20:34:50 2016 +0000

----------------------------------------------------------------------
 .../org/apache/activemq/security/DefaultAuthorizationMap.java    | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/6be36305/activemq-broker/src/main/java/org/apache/activemq/security/DefaultAuthorizationMap.java
----------------------------------------------------------------------
diff --git a/activemq-broker/src/main/java/org/apache/activemq/security/DefaultAuthorizationMap.java
b/activemq-broker/src/main/java/org/apache/activemq/security/DefaultAuthorizationMap.java
index 4de96f9..b249119 100644
--- a/activemq-broker/src/main/java/org/apache/activemq/security/DefaultAuthorizationMap.java
+++ b/activemq-broker/src/main/java/org/apache/activemq/security/DefaultAuthorizationMap.java
@@ -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;
                 }
             }


Mime
View raw message