<div dir="ltr"><div dir="ltr">On Mon, Mar 6, 2023 at 4:01 PM Jonathan Gibbons <<a href="mailto:jonathan.gibbons@oracle.com">jonathan.gibbons@oracle.com</a>> wrote:</div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

  
  <div>
    <p>More on changing PoolReader ... ideally, this should be tied back
      to details in JVMS, and/or the spec updated to define the expected
      behavior of the VM and javac for similar but different equivalent
      names.</p></div></blockquote><div>Funny you should mention it :) See the PR I just filed (<a href="https://github.com/openjdk/jdk/pull/12893">link</a>), quoting:</div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><p dir="auto">JVMS ยง4.4.7 describes "Modified UTF-8" for encoded 
strings, and it does not allow for non-standard encodings. Instead, 
you'll get something like this:</p><div class="gmail-snippet-clipboard-content gmail-notranslate gmail-position-relative gmail-overflow-auto"><pre class="gmail-notranslate"><code class="gmail-notranslate">$ java Test
Error: LinkageError occurred while loading main class Test
        java.lang.ClassFormatError: Illegal UTF8 string in constant pool in class file Test
</code></pre></div><p dir="auto">So the compiler should also reject any invalid classfiles containing them.</p></blockquote>

<p>-Archie<br></p></div></div>-- <br><div dir="ltr" class="gmail_signature">Archie L. Cobbs<br></div></div>