-
Bug
-
Resolution: Fixed
-
P4
-
24
-
b13
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8354699 | 24.0.2 | Christoph Langer | P4 | Resolved | Fixed | b04 |
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.
- backported by
-
JDK-8354699 beans/finder/MethodFinder.findMethod incorrectly returns null
-
- Resolved
-
- 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/jdk24u/94afa91a
-
Commit(master) openjdk/jdk/216f113f
-
Review(master) openjdk/jdk24u/189
-
Review(master) openjdk/jdk/23845