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.

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

              Created:
              Updated:
              Resolved: