-
Bug
-
Resolution: Fixed
-
P4
-
24
-
b13
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.
- causes
-
JDK-8350573 java/beans/XMLDecoder/8028054/TestMethodFinder.java got slow after JDK-8344891
-
- Closed
-
- duplicates
-
JDK-8350573 java/beans/XMLDecoder/8028054/TestMethodFinder.java got slow after JDK-8344891
-
- Closed
-
- relates to
-
JDK-8351043 Revisit com.sun.beans.util.Cache#get()/#create()
-
- Open
-
-
JDK-8350573 java/beans/XMLDecoder/8028054/TestMethodFinder.java got slow after JDK-8344891
-
- Closed
-
- links to
-
Commit(master) openjdk/jdk/216f113f
-
Review(master) openjdk/jdk/23845
(1 links to)