<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <br>
    Thanks Andrey.<br>
    <br>
    I'll take a look in the coming week and let you know of any
    feedback.<br>
    <br>
    Srikanth<br>
    <br>
    <div class="moz-cite-prefix">On Monday 31 July 2017 08:00 PM, Andrey
      Petushkov wrote:<br>
    </div>
    <blockquote
      cite="mid:B713E33A-9515-42CD-9029-5EF0A927F33C@gmail.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      Dear Compiler Team,
      <div class=""><br class="">
      </div>
      <div class="">We’ve occasionally found out that there is a problem
        in javac related to lambda support, in part related to
        referencing the outer’s entity which otherwise would be captured
        by using inner this, but cannot be since it’s not yet fully
        initialized. More specifically this seem to be omission in the
        fix for <span style="color: rgb(59, 115, 175); font-family:
          Arial, sans-serif; orphans: 2; widows: 2; background-color:
          rgb(255, 255, 255);" class=""><a moz-do-not-send="true"
            href="https://bugs.openjdk.java.net/browse/JDK-8129740"
            title="Incorrect class file created when passing lambda in
            inner class constructor" class="issue-link"
            data-issue-key="JDK-8129740" style="color: rgb(59, 115,
            175); text-decoration: none;">JDK-8129740</a>:</span></div>
      <div class="">it's fix works fine if it deals with the entity from
        the outer class(es), but fails if the entity is inherited from
        outer’s parent. Consider the following source code:</div>
      <div class=""><br class="">
      </div>
      <div class=""><span style="color: rgb(51, 51, 51); font-family:
          Arial, sans-serif; orphans: 2; widows: 2; background-color:
          rgb(255, 255, 255);" class="">A.java </span><br style="color:
          rgb(51, 51, 51); font-family: Arial, sans-serif; orphans: 2;
          widows: 2; background-color: rgb(255, 255, 255);" class="">
        <span style="color: rgb(51, 51, 51); font-family: Arial,
          sans-serif; orphans: 2; widows: 2; background-color: rgb(255,
          255, 255);" class="">public class A { </span><br style="color:
          rgb(51, 51, 51); font-family: Arial, sans-serif; orphans: 2;
          widows: 2; background-color: rgb(255, 255, 255);" class="">
        <span style="color: rgb(51, 51, 51); font-family: Arial,
          sans-serif; orphans: 2; widows: 2; background-color: rgb(255,
          255, 255);" class="">    public boolean test(){ </span><br
          style="color: rgb(51, 51, 51); font-family: Arial, sans-serif;
          orphans: 2; widows: 2; background-color: rgb(255, 255, 255);"
          class="">
        <span style="color: rgb(51, 51, 51); font-family: Arial,
          sans-serif; orphans: 2; widows: 2; background-color: rgb(255,
          255, 255);" class="">        return true; </span><br
          style="color: rgb(51, 51, 51); font-family: Arial, sans-serif;
          orphans: 2; widows: 2; background-color: rgb(255, 255, 255);"
          class="">
        <span style="color: rgb(51, 51, 51); font-family: Arial,
          sans-serif; orphans: 2; widows: 2; background-color: rgb(255,
          255, 255);" class="">    } </span><br style="color: rgb(51,
          51, 51); font-family: Arial, sans-serif; orphans: 2; widows:
          2; background-color: rgb(255, 255, 255);" class="">
        <span style="color: rgb(51, 51, 51); font-family: Arial,
          sans-serif; orphans: 2; widows: 2; background-color: rgb(255,
          255, 255);" class="">    class AA{ </span><br style="color:
          rgb(51, 51, 51); font-family: Arial, sans-serif; orphans: 2;
          widows: 2; background-color: rgb(255, 255, 255);" class="">
        <span style="color: rgb(51, 51, 51); font-family: Arial,
          sans-serif; orphans: 2; widows: 2; background-color: rgb(255,
          255, 255);" class="">        public AA(Condition condition) { </span><br
          style="color: rgb(51, 51, 51); font-family: Arial, sans-serif;
          orphans: 2; widows: 2; background-color: rgb(255, 255, 255);"
          class="">
        <span style="color: rgb(51, 51, 51); font-family: Arial,
          sans-serif; orphans: 2; widows: 2; background-color: rgb(255,
          255, 255);" class="">        } </span><br style="color:
          rgb(51, 51, 51); font-family: Arial, sans-serif; orphans: 2;
          widows: 2; background-color: rgb(255, 255, 255);" class="">
        <span style="color: rgb(51, 51, 51); font-family: Arial,
          sans-serif; orphans: 2; widows: 2; background-color: rgb(255,
          255, 255);" class="">    } </span><br style="color: rgb(51,
          51, 51); font-family: Arial, sans-serif; orphans: 2; widows:
          2; background-color: rgb(255, 255, 255);" class="">
        <span style="color: rgb(51, 51, 51); font-family: Arial,
          sans-serif; orphans: 2; widows: 2; background-color: rgb(255,
          255, 255);" class="">} </span><br style="color: rgb(51, 51,
          51); font-family: Arial, sans-serif; orphans: 2; widows: 2;
          background-color: rgb(255, 255, 255);" class="">
        <span style="color: rgb(51, 51, 51); font-family: Arial,
          sans-serif; orphans: 2; widows: 2; background-color: rgb(255,
          255, 255);" class=""><br class="">
        </span></div>
      <div class=""><span style="color: rgb(51, 51, 51); font-family:
          Arial, sans-serif; orphans: 2; widows: 2; background-color:
          rgb(255, 255, 255);" class="">Condition.java </span><br
          style="color: rgb(51, 51, 51); font-family: Arial, sans-serif;
          orphans: 2; widows: 2; background-color: rgb(255, 255, 255);"
          class="">
        <span style="color: rgb(51, 51, 51); font-family: Arial,
          sans-serif; orphans: 2; widows: 2; background-color: rgb(255,
          255, 255);" class="">public interface Condition<T> { </span><br
          style="color: rgb(51, 51, 51); font-family: Arial, sans-serif;
          orphans: 2; widows: 2; background-color: rgb(255, 255, 255);"
          class="">
        <span style="color: rgb(51, 51, 51); font-family: Arial,
          sans-serif; orphans: 2; widows: 2; background-color: rgb(255,
          255, 255);" class="">    boolean check(T t); </span><br
          style="color: rgb(51, 51, 51); font-family: Arial, sans-serif;
          orphans: 2; widows: 2; background-color: rgb(255, 255, 255);"
          class="">
        <span style="color: rgb(51, 51, 51); font-family: Arial,
          sans-serif; orphans: 2; widows: 2; background-color: rgb(255,
          255, 255);" class="">} </span><br style="color: rgb(51, 51,
          51); font-family: Arial, sans-serif; orphans: 2; widows: 2;
          background-color: rgb(255, 255, 255);" class="">
        <span style="color: rgb(51, 51, 51); font-family: Arial,
          sans-serif; orphans: 2; widows: 2; background-color: rgb(255,
          255, 255);" class=""><br class="">
        </span></div>
      <div class=""><span style="color: rgb(51, 51, 51); font-family:
          Arial, sans-serif; orphans: 2; widows: 2; background-color:
          rgb(255, 255, 255);" class="">B.java </span><br style="color:
          rgb(51, 51, 51); font-family: Arial, sans-serif; orphans: 2;
          widows: 2; background-color: rgb(255, 255, 255);" class="">
        <span style="color: rgb(51, 51, 51); font-family: Arial,
          sans-serif; orphans: 2; widows: 2; background-color: rgb(255,
          255, 255);" class="">public class B extends A { </span><br
          style="color: rgb(51, 51, 51); font-family: Arial, sans-serif;
          orphans: 2; widows: 2; background-color: rgb(255, 255, 255);"
          class="">
        <span style="color: rgb(51, 51, 51); font-family: Arial,
          sans-serif; orphans: 2; widows: 2; background-color: rgb(255,
          255, 255);" class="">    private final BA myBA; </span><br
          style="color: rgb(51, 51, 51); font-family: Arial, sans-serif;
          orphans: 2; widows: 2; background-color: rgb(255, 255, 255);"
          class="">
        <span style="color: rgb(51, 51, 51); font-family: Arial,
          sans-serif; orphans: 2; widows: 2; background-color: rgb(255,
          255, 255);" class="">    public B() { </span><br style="color:
          rgb(51, 51, 51); font-family: Arial, sans-serif; orphans: 2;
          widows: 2; background-color: rgb(255, 255, 255);" class="">
        <span style="color: rgb(51, 51, 51); font-family: Arial,
          sans-serif; orphans: 2; widows: 2; background-color: rgb(255,
          255, 255);" class="">        myBA = new BA(); </span><br
          style="color: rgb(51, 51, 51); font-family: Arial, sans-serif;
          orphans: 2; widows: 2; background-color: rgb(255, 255, 255);"
          class="">
        <span style="color: rgb(51, 51, 51); font-family: Arial,
          sans-serif; orphans: 2; widows: 2; background-color: rgb(255,
          255, 255);" class="">    } </span><br style="color: rgb(51,
          51, 51); font-family: Arial, sans-serif; orphans: 2; widows:
          2; background-color: rgb(255, 255, 255);" class="">
        <span style="color: rgb(51, 51, 51); font-family: Arial,
          sans-serif; orphans: 2; widows: 2; background-color: rgb(255,
          255, 255);" class="">    public class BA extends AA{ </span><br
          style="color: rgb(51, 51, 51); font-family: Arial, sans-serif;
          orphans: 2; widows: 2; background-color: rgb(255, 255, 255);"
          class="">
        <span style="color: rgb(51, 51, 51); font-family: Arial,
          sans-serif; orphans: 2; widows: 2; background-color: rgb(255,
          255, 255);" class="">        public BA() { </span><br
          style="color: rgb(51, 51, 51); font-family: Arial, sans-serif;
          orphans: 2; widows: 2; background-color: rgb(255, 255, 255);"
          class="">
        <span style="color: rgb(51, 51, 51); font-family: Arial,
          sans-serif; orphans: 2; widows: 2; background-color: rgb(255,
          255, 255);" class="">            super(o -> test()); </span><br
          style="color: rgb(51, 51, 51); font-family: Arial, sans-serif;
          orphans: 2; widows: 2; background-color: rgb(255, 255, 255);"
          class="">
        <span style="color: rgb(51, 51, 51); font-family: Arial,
          sans-serif; orphans: 2; widows: 2; background-color: rgb(255,
          255, 255);" class="">        } </span><br style="color:
          rgb(51, 51, 51); font-family: Arial, sans-serif; orphans: 2;
          widows: 2; background-color: rgb(255, 255, 255);" class="">
        <span style="color: rgb(51, 51, 51); font-family: Arial,
          sans-serif; orphans: 2; widows: 2; background-color: rgb(255,
          255, 255);" class="">    } </span><br style="color: rgb(51,
          51, 51); font-family: Arial, sans-serif; orphans: 2; widows:
          2; background-color: rgb(255, 255, 255);" class="">
        <span style="color: rgb(51, 51, 51); font-family: Arial,
          sans-serif; orphans: 2; widows: 2; background-color: rgb(255,
          255, 255);" class="">    public static void main(String[]
          args) { </span><br style="color: rgb(51, 51, 51); font-family:
          Arial, sans-serif; orphans: 2; widows: 2; background-color:
          rgb(255, 255, 255);" class="">
        <span style="color: rgb(51, 51, 51); font-family: Arial,
          sans-serif; orphans: 2; widows: 2; background-color: rgb(255,
          255, 255);" class="">        B b = new B(); </span><br
          style="color: rgb(51, 51, 51); font-family: Arial, sans-serif;
          orphans: 2; widows: 2; background-color: rgb(255, 255, 255);"
          class="">
        <span style="color: rgb(51, 51, 51); font-family: Arial,
          sans-serif; orphans: 2; widows: 2; background-color: rgb(255,
          255, 255);" class="">        System.out.println(b); </span><br
          style="color: rgb(51, 51, 51); font-family: Arial, sans-serif;
          orphans: 2; widows: 2; background-color: rgb(255, 255, 255);"
          class="">
        <span style="color: rgb(51, 51, 51); font-family: Arial,
          sans-serif; orphans: 2; widows: 2; background-color: rgb(255,
          255, 255);" class="">    } </span><br style="color: rgb(51,
          51, 51); font-family: Arial, sans-serif; orphans: 2; widows:
          2; background-color: rgb(255, 255, 255);" class="">
        <span style="color: rgb(51, 51, 51); font-family: Arial,
          sans-serif; orphans: 2; widows: 2; background-color: rgb(255,
          255, 255);" class="">}</span></div>
      <div class=""><span style="color: rgb(51, 51, 51); font-family:
          Arial, sans-serif; orphans: 2; widows: 2; background-color:
          rgb(255, 255, 255);" class=""> </span><br style="color:
          rgb(51, 51, 51); font-family: Arial, sans-serif; orphans: 2;
          widows: 2; background-color: rgb(255, 255, 255);" class="">
        <br style="color: rgb(51, 51, 51); font-family: Arial,
          sans-serif; orphans: 2; widows: 2; background-color: rgb(255,
          255, 255);" class="">
        <span style="color: rgb(51, 51, 51); font-family: Arial,
          sans-serif; orphans: 2; widows: 2; background-color: rgb(255,
          255, 255);" class="">source compiles but execution of B fails
          with: </span><br style="color: rgb(51, 51, 51); font-family:
          Arial, sans-serif; orphans: 2; widows: 2; background-color:
          rgb(255, 255, 255);" class="">
        <span style="color: rgb(51, 51, 51); font-family: Arial,
          sans-serif; orphans: 2; widows: 2; background-color: rgb(255,
          255, 255);" class="">Exception in thread "main"
          java.lang.VerifyError: Bad type on operand stack </span><br
          style="color: rgb(51, 51, 51); font-family: Arial, sans-serif;
          orphans: 2; widows: 2; background-color: rgb(255, 255, 255);"
          class="">
        <span style="color: rgb(51, 51, 51); font-family: Arial,
          sans-serif; orphans: 2; widows: 2; background-color: rgb(255,
          255, 255);" class="">Exception Details: </span><br
          style="color: rgb(51, 51, 51); font-family: Arial, sans-serif;
          orphans: 2; widows: 2; background-color: rgb(255, 255, 255);"
          class="">
        <span style="color: rgb(51, 51, 51); font-family: Arial,
          sans-serif; orphans: 2; widows: 2; background-color: rgb(255,
          255, 255);" class="">  Location: </span><br style="color:
          rgb(51, 51, 51); font-family: Arial, sans-serif; orphans: 2;
          widows: 2; background-color: rgb(255, 255, 255);" class="">
        <span style="color: rgb(51, 51, 51); font-family: Arial,
          sans-serif; orphans: 2; widows: 2; background-color: rgb(255,
          255, 255);" class="">    B$BA.lambda$new$0(LB;Ljava/lang/Object;)Z
          @1: getfield </span><br style="color: rgb(51, 51, 51);
          font-family: Arial, sans-serif; orphans: 2; widows: 2;
          background-color: rgb(255, 255, 255);" class="">
        <span style="color: rgb(51, 51, 51); font-family: Arial,
          sans-serif; orphans: 2; widows: 2; background-color: rgb(255,
          255, 255);" class="">  Reason: </span><br style="color:
          rgb(51, 51, 51); font-family: Arial, sans-serif; orphans: 2;
          widows: 2; background-color: rgb(255, 255, 255);" class="">
        <span style="color: rgb(51, 51, 51); font-family: Arial,
          sans-serif; orphans: 2; widows: 2; background-color: rgb(255,
          255, 255);" class="">    Type 'B' (current frame, stack[0]) is
          not assignable to 'B$BA' </span><br style="color: rgb(51, 51,
          51); font-family: Arial, sans-serif; orphans: 2; widows: 2;
          background-color: rgb(255, 255, 255);" class="">
        <span style="color: rgb(51, 51, 51); font-family: Arial,
          sans-serif; orphans: 2; widows: 2; background-color: rgb(255,
          255, 255);" class="">  Current Frame: </span><br style="color:
          rgb(51, 51, 51); font-family: Arial, sans-serif; orphans: 2;
          widows: 2; background-color: rgb(255, 255, 255);" class="">
        <span style="color: rgb(51, 51, 51); font-family: Arial,
          sans-serif; orphans: 2; widows: 2; background-color: rgb(255,
          255, 255);" class="">    bci: @1 </span><br style="color:
          rgb(51, 51, 51); font-family: Arial, sans-serif; orphans: 2;
          widows: 2; background-color: rgb(255, 255, 255);" class="">
        <span style="color: rgb(51, 51, 51); font-family: Arial,
          sans-serif; orphans: 2; widows: 2; background-color: rgb(255,
          255, 255);" class="">    flags: { } </span><br style="color:
          rgb(51, 51, 51); font-family: Arial, sans-serif; orphans: 2;
          widows: 2; background-color: rgb(255, 255, 255);" class="">
        <span style="color: rgb(51, 51, 51); font-family: Arial,
          sans-serif; orphans: 2; widows: 2; background-color: rgb(255,
          255, 255);" class="">    locals: { 'B', 'java/lang/Object' } </span><br
          style="color: rgb(51, 51, 51); font-family: Arial, sans-serif;
          orphans: 2; widows: 2; background-color: rgb(255, 255, 255);"
          class="">
        <span style="color: rgb(51, 51, 51); font-family: Arial,
          sans-serif; orphans: 2; widows: 2; background-color: rgb(255,
          255, 255);" class="">    stack: { 'B' } </span><br
          style="color: rgb(51, 51, 51); font-family: Arial, sans-serif;
          orphans: 2; widows: 2; background-color: rgb(255, 255, 255);"
          class="">
        <span style="color: rgb(51, 51, 51); font-family: Arial,
          sans-serif; orphans: 2; widows: 2; background-color: rgb(255,
          255, 255);" class="">  Bytecode: </span><br style="color:
          rgb(51, 51, 51); font-family: Arial, sans-serif; orphans: 2;
          widows: 2; background-color: rgb(255, 255, 255);" class="">
        <span style="color: rgb(51, 51, 51); font-family: Arial,
          sans-serif; orphans: 2; widows: 2; background-color: rgb(255,
          255, 255);" class="">    0x0000000: 2ab4 0001 b600 04ac </span><br
          style="color: rgb(51, 51, 51); font-family: Arial, sans-serif;
          orphans: 2; widows: 2; background-color: rgb(255, 255, 255);"
          class="">
        <br style="color: rgb(51, 51, 51); font-family: Arial,
          sans-serif; orphans: 2; widows: 2; background-color: rgb(255,
          255, 255);" class="">
        <span style="color: rgb(51, 51, 51); font-family: Arial,
          sans-serif; orphans: 2; widows: 2; background-color: rgb(255,
          255, 255);" class="">at B.<init>(B.java:6) </span><br
          style="color: rgb(51, 51, 51); font-family: Arial, sans-serif;
          orphans: 2; widows: 2; background-color: rgb(255, 255, 255);"
          class="">
        <span style="color: rgb(51, 51, 51); font-family: Arial,
          sans-serif; orphans: 2; widows: 2; background-color: rgb(255,
          255, 255);" class="">at B.main(B.java:17) </span></div>
      <div class=""><span style="color: rgb(51, 51, 51); font-family:
          Arial, sans-serif; orphans: 2; widows: 2; background-color:
          rgb(255, 255, 255);" class=""><br class="">
        </span></div>
      <div class=""><span style="color: rgb(51, 51, 51); font-family:
          Arial, sans-serif; orphans: 2; widows: 2; background-color:
          rgb(255, 255, 255);" class="">The problem is reproduced on
          both latest 8u and 9 (by the time of the bug submission)</span></div>
      <div class=""><span style="color: rgb(51, 51, 51); font-family:
          Arial, sans-serif; orphans: 2; widows: 2; background-color:
          rgb(255, 255, 255);" class=""><br class="">
        </span></div>
      <div class=""><span style="color: rgb(51, 51, 51); font-family:
          Arial, sans-serif; orphans: 2; widows: 2; background-color:
          rgb(255, 255, 255);" class="">My naive attempt to fix could be
          seen here </span><font class="" color="#333333" face="Arial,
          sans-serif"><a moz-do-not-send="true"
            href="http://cr.openjdk.java.net/%7Eapetushkov/8184989/webrev/"
            class="">http://cr.openjdk.java.net/~apetushkov/8184989/webrev/</a> (based
          on latest 8u)</font></div>
      <div class=""><span style="color: rgb(51, 51, 51); font-family:
          Arial, sans-serif; orphans: 2; widows: 2; background-color:
          rgb(255, 255, 255);" class="">Please could you consider
          reviewing/improving it or suggesting improvement direction as
          appropriate</span></div>
      <div class=""><span style="color: rgb(51, 51, 51); font-family:
          Arial, sans-serif; orphans: 2; widows: 2; background-color:
          rgb(255, 255, 255);" class=""><br class="">
        </span></div>
      <div class=""><span style="color: rgb(51, 51, 51); font-family:
          Arial, sans-serif; orphans: 2; widows: 2; background-color:
          rgb(255, 255, 255);" class="">Thanks,</span></div>
      <div class=""><span style="color: rgb(51, 51, 51); font-family:
          Arial, sans-serif; orphans: 2; widows: 2; background-color:
          rgb(255, 255, 255);" class="">Andrey</span></div>
    </blockquote>
    <br>
  </body>
</html>