RFR: 8037325: Class.getConstructor() performance regression

Mandy Chung mandy.chung at oracle.com
Mon Jan 16 21:39:57 UTC 2017

> On Jan 12, 2017, at 6:48 AM, Claes Redestad <claes.redestad at oracle.com> wrote:
> Hi,
> please review this fix to various performance regressions observed
> as the security model has evolved over the years.
> Bug: https://bugs.openjdk.java.net/browse/JDK-8037325
> Webrev: http://cr.openjdk.java.net/~redestad/8037325/webrev.01

Looks good.

Nit: methodName method returns the string representation of the method signature and so more than the method name.  Maybe it should call “methodToString”?  The argumentTypesToString method is only used to print the method signature.  You could merge these two methods if you like.

 262     public static boolean isNonPublicProxyClass(Class<?> cls) {
 263         String pkg;
 264         return Proxy.isProxyClass(cls) &&
 265                 ((pkg = cls.getPackageName()) == null || !pkg.startsWith(PROXY_PACKAGE));
 266     }

Nit: just a personal preference: move Proxy.isProxyClass(cls) check in a separate if-statement and the declaration pkg can be moved with the assignment.


More information about the security-dev mailing list