--- a/jdk/src/share/classes/com/sun/beans/finder/MethodFinder.java Mon Oct 15 07:42:18 2012 -0700
+++ b/jdk/src/share/classes/com/sun/beans/finder/MethodFinder.java Mon Oct 15 19:00:13 2012 +0400
@@ -66,11 +66,14 @@
Signature signature = new Signature(type, name, args);
Method method = CACHE.get(signature);
- if (method != null) {
+ boolean cached = method != null;
+ if (cached && isPackageAccessible(method.getDeclaringClass())) {
return method;
}
method = findAccessibleMethod(new MethodFinder(name, args).find(type.getMethods()));
- CACHE.put(signature, method);
+ if (!cached) {
+ CACHE.put(signature, method);
+ }
return method;
}