<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body>
    Hi Dawid,<br>
    <br>
    Thanks for the additional information, but from your findings it
    seems like the issue has been fixed in recent releases. Fixing it in
    previous releases seems to me like a sustaining / support job,<br>
    <br>
    Thanks,<br>
    Vicente<br>
    <br>
    <div class="moz-cite-prefix">On 6/10/22 08:48, Dawid Weiss wrote:<br>
    </div>
    <blockquote type="cite" cite="mid:CAM21Rt8PfOAr=ZtViLJ8koaxq3vWiTHfL4hPaQrSwUz8JKVvEw@mail.gmail.com">
      
      <div dir="ltr"><br>
        <div>Just FYI - I did a little bisecting archeology and it's
          this issue:</div>
        <div><a href="https://bugs.openjdk.org/browse/JDK-8215470" moz-do-not-send="true" class="moz-txt-link-freetext">https://bugs.openjdk.org/browse/JDK-8215470</a><br>
        </div>
        <div><br>
        </div>
        <div>The signatures from the nested class are fine after that
          commit and erased/ missing before. So the bug is present in
          anything up to jdk-13-ga.</div>
        <div><br>
        </div>
        <div>Dawid</div>
      </div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr" class="gmail_attr">On Wed, Jun 8, 2022 at 10:08
          PM Dawid Weiss <<a href="mailto:dawid.weiss@gmail.com" moz-do-not-send="true" class="moz-txt-link-freetext">dawid.weiss@gmail.com</a>>
          wrote:<br>
        </div>
        <blockquote class="gmail_quote" style="margin:0px 0px 0px
          0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
          <div dir="ltr"><br>
            <div>Good evening,</div>
            <div><br>
            </div>
            <div>I've spent an interesting day debugging a very awkward
              error in Google Guice: a binding would work in JDK17 but
              would result in an odd (and misleading) error information
              under JDK11. This turns out to be a problem with generic
              signatures emitted by the corresponding compilers. </div>
            <div><br>
            </div>
            <div>I narrowed it down to essentially something like this
              [full source at 1]:</div>
            <div><br>
            </div>
            <div>Callable<Void> r =<br>
                      () -> {<br>
                        class Foo1 {<br>
                          public Map<String, Integer> field;<br>
                        }<br>
              <br>
                        System.out.println("Foo1.field type: " +
              Foo1.class.getField("field").getGenericType());<br>
                        return null;<br>
                      };<br>
                  r.call();</div>
            <div><br>
            </div>
            <div>When I compile and run this snippet under java 11.0.15,
              I get only the following signatures for generic types:<br>
            </div>
            <div><br>
            </div>
            <div>Foo1.field type: interface java.util.Map</div>
            <div><br>
            </div>
            <div>if you move the inner class declaration outside of the
              closure, proper generic info is stored and then loaded/
              printed:</div>
            <div><br>
              Foo2.field type: java.util.Map<java.lang.String,
              java.lang.Integer></div>
            <div><br>
            </div>
            <div>In Java 17.0.3, this compiles and works fine and I
              can't find any issue where this was fixed. Is this a class
              bytecode constraint somewhere? My reading of the JLS [2]
              would suggest the signature is mandatory, even if emitted
              from within that nested class Foo1?</div>
            <div><br>
            </div>
            <div>Any pointers would be appreciated!</div>
            <div>Dawid</div>
            <div><br>
            </div>
            <div>[1] <a href="https://gist.github.com/dweiss/d77452c52daa178e041adce145c2e86a" target="_blank" moz-do-not-send="true" class="moz-txt-link-freetext">https://gist.github.com/dweiss/d77452c52daa178e041adce145c2e86a</a></div>
            <div>[2] <a href="https://docs.oracle.com/javase/specs/jvms/se11/html/jvms-4.html#jvms-4.7.9.1" target="_blank" moz-do-not-send="true" class="moz-txt-link-freetext">https://docs.oracle.com/javase/specs/jvms/se11/html/jvms-4.html#jvms-4.7.9.1</a></div>
            <div><br>
            </div>
            <div><br>
            </div>
          </div>
        </blockquote>
      </div>
    </blockquote>
    <br>
  </body>
</html>