-
Bug
-
Resolution: Unresolved
-
P4
-
24
-
None
java.desktop/share/classes/com/sun/beans/finder/MethodFinder.java
Looking at
public static Method findMethod(Class<?> type, String name, Class<?>...args) throws NoSuchMethodException {
I see this
<pre>
Method method = CACHE.get(signature);
return (method == null) || isPackageAccessible(method.getDeclaringClass()) ? method : CACHE.create(signature);
</pre>
Let's simplify that 2nd line to make it easier to read
return (method == null) ? method : CACHE.create(signature);
So if method is not found in the cache, return null ? If it is found then re-cache it ?
Surely something is badly broken here and I'm surprised it isn't causing problems unless this whole method is pretty unimportant .. or the CACHE is generally populated by some other path for most cases.
Looking at
public static Method findMethod(Class<?> type, String name, Class<?>...args) throws NoSuchMethodException {
I see this
<pre>
Method method = CACHE.get(signature);
return (method == null) || isPackageAccessible(method.getDeclaringClass()) ? method : CACHE.create(signature);
</pre>
Let's simplify that 2nd line to make it easier to read
return (method == null) ? method : CACHE.create(signature);
So if method is not found in the cache, return null ? If it is found then re-cache it ?
Surely something is badly broken here and I'm surprised it isn't causing problems unless this whole method is pretty unimportant .. or the CACHE is generally populated by some other path for most cases.