You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by he...@apache.org on 2018/01/21 10:24:49 UTC

svn commit: r1821777 - /commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl3/internal/introspection/ClassMap.java

Author: henrib
Date: Sun Jan 21 10:24:49 2018
New Revision: 1821777

URL: http://svn.apache.org/viewvc?rev=1821777&view=rev
Log:
JEXL:
Log signature collision in debug 

Modified:
    commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl3/internal/introspection/ClassMap.java

Modified: commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl3/internal/introspection/ClassMap.java
URL: http://svn.apache.org/viewvc/commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl3/internal/introspection/ClassMap.java?rev=1821777&r1=1821776&r2=1821777&view=diff
==============================================================================
--- commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl3/internal/introspection/ClassMap.java (original)
+++ commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl3/internal/introspection/ClassMap.java Sun Jan 21 10:24:49 2018
@@ -283,7 +283,12 @@ final class ClassMap {
                 Method mi = methods[i];
                 if (permissions.allow(mi)) {
                     // add method to byKey cache; do not override
-                    cache.byKey.putIfAbsent(new MethodKey(mi), mi);
+                    MethodKey key = new MethodKey(mi);
+                    Method pmi = cache.byKey.putIfAbsent(key, mi);
+                    if (pmi != null && log.isDebugEnabled()) {
+                        // foo(int) and foo(Integer) have the same signature for JEXL
+                        log.debug("Method "+ pmi + " is already registered, key: " + key);
+                    }
                 }
             }
         } catch (SecurityException se) {