Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8146556

jdk.dynalink.beans.ClassLinker can avoid using specific lookup and can use publicLookup instead

XMLWordPrintable

    • b101
    • generic
    • generic

      ClassLinker class uses "own" Lookup

       private static final MethodHandle FOR_CLASS = new Lookup(MethodHandles.lookup()).findStatic(StaticClass.class,
                  "forClass", MethodType.methodType(StaticClass.class, Class.class));

      to lookup public static method of public class StaticClass. This need not use specific lookup (MethodHandles.lookup()). Instead MethodHandles.publicLookup can be used.

            sundar Sundararajan Athijegannathan
            sundar Sundararajan Athijegannathan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: