<!DOCTYPE html><html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body>
    <p>Hello,</p>
    <p><br>
    </p>
    <p>I had a look here, and can reproduce the error.</p>
    <p><br>
    </p>
    <p>jnativescan does have handling for Multi-Release jars. By default
      it uses the current JDK version, which in your case would be 24.
      An exact version can be specified using --release. The issue in
      this case is that the error originates from the class file <font face="monospace">reactor.core.publisher.CallSiteSupplierFactory$SharedSecretsCallSiteSupplierFactory$TracingException</font>,
      which does not have a class file entry in the META-INF/versions
      directory. There is one for the enclosing class <font face="monospace">reactor.core.publisher.CallSiteSupplierFactory</font>,
      but not for this nested class. jnativescan doesn't try to
      determine whether a class file is used, it just scans all the
      class files in the jar file that belong to a particular runtime
      version, so in this case, it doesn't see that the <font face="monospace">TracingException</font> class is not actually
      being used.</p>
    <p><br>
    </p>
    <p>I think your idea of emitting a warning instead of an error is
      probably the right one. We won't be able to determine whether a
      method being referenced is restricted or not, since you need the
      class file to be able to look at the annotations, but if the class
      can not be loaded on the particular runtime version, then even if
      the method was restricted, it could never be called any way.</p>
    <p><br>
    </p>
    <p>Thank you for submitting this useful piece of feedback! I've
      filed: <a class="moz-txt-link-freetext" href="https://bugs.openjdk.org/browse/JDK-8353840">https://bugs.openjdk.org/browse/JDK-8353840</a><br>
    </p>
    <p><br>
    </p>
    <p>Jorn<br>
    </p>
    <p><br>
    </p>
    <div class="moz-cite-prefix">On 4-4-2025 18:58, Danish Nawab wrote:<br>
    </div>
    <blockquote type="cite" cite="mid:PH7PR12MB68845FBEEC1217AA3B436F45C3A92@PH7PR12MB6884.namprd12.prod.outlook.com">
      
      <style type="text/css" style="display:none;">P {margin-top:0;margin-bottom:0;}</style>
      <div class="elementToProof" style="text-align: left; text-indent: 0px; background-color: rgb(255, 255, 255); margin: 0px; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
        <code>jnativescan</code> terminates when ran on a JAR with a
        missing class.</div>
      <div class="elementToProof" style="text-align: left; text-indent: 0px; background-color: rgb(255, 255, 255); margin: 0px; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
        Example:<br>
        <br>
      </div>
      <div class="elementToProof" style="text-align: left; text-indent: 0px; background-color: rgb(255, 255, 255); margin: 0px; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
        ```</div>
      <div class="elementToProof" style="text-align: left; text-indent: 0px; line-height: normal; background-color: rgb(255, 255, 255); margin: 0px; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
        jnativescan --class-path reactor-core-3.7.4.jar</div>
      <div class="elementToProof" style="text-align: left; text-indent: 0px; line-height: normal; background-color: rgb(255, 255, 255); margin: 0px; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
        <br>
      </div>
      <div class="elementToProof" style="text-align: left; text-indent: 0px; line-height: normal; background-color: rgb(255, 255, 255); margin: 0px; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
        ERROR: Error while processing method:
reactor.core.publisher.CallSiteSupplierFactory$SharedSecretsCallSiteSupplierFactory$TracingException::get()String</div>
      <div class="elementToProof" style="text-align: left; text-indent: 0px; line-height: normal; background-color: rgb(255, 255, 255); margin: 0px; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
        CAUSED BY: System class can not be found:
        sun.misc.JavaLangAccess</div>
      <div class="elementToProof" style="text-align: left; text-indent: 0px; line-height: normal; background-color: rgb(255, 255, 255); margin: 0px; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
        ``` </div>
      <div class="elementToProof" style="text-align: left; text-indent: 0px; line-height: normal; background-color: rgb(255, 255, 255); margin: 0px; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
        <br>
      </div>
      <div class="elementToProof" style="text-align: left; text-indent: 0px; line-height: normal; background-color: rgb(255, 255, 255); margin: 0px; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
        (above jar downloaded from [1]) </div>
      <div class="elementToProof" style="text-align: left; text-indent: 0px; line-height: normal; background-color: rgb(255, 255, 255); margin: 0px; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
        <br>
      </div>
      <div class="elementToProof" style="text-align: left; text-indent: 0px; line-height: normal; background-color: rgb(255, 255, 255); margin: 0px; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
        The offending class seems to refer to a now unavailable <code>sun.misc.JavaLangAccess</code> but
        still handles this error scenario silently [2]</div>
      <div class="elementToProof" style="text-align: left; text-indent: 0px; line-height: normal; background-color: rgb(255, 255, 255); margin: 0px; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
        <br>
      </div>
      <div class="elementToProof" style="text-align: left; text-indent: 0px; line-height: normal; background-color: rgb(255, 255, 255); margin: 0px; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
        Because <code>jnativescan</code> terminates early, I can't say
        whether or not this library uses native/restricted features.
        Perhaps it would be better if instead of terminating,
        <code>jnativescan</code> continued the analysis after warning
        about the missing class.</div>
      <div class="elementToProof" style="text-align: left; text-indent: 0px; line-height: normal; background-color: rgb(255, 255, 255); margin: 0px; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
        <br>
      </div>
      <div class="elementToProof" style="text-align: left; text-indent: 0px; line-height: normal; background-color: rgb(255, 255, 255); margin: 0px; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
        Also, the above JAR seems to be a Multi-Release Jar, where the
        Java 11+ version of the code does not even refer
        sun.misc.JavaLangAccess [3].</div>
      <div class="elementToProof" style="text-align: left; text-indent: 0px; line-height: normal; background-color: rgb(255, 255, 255); margin: 0px; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
        Should <code>jnativescan</code> have special handling for
        Multi-Release JARs by analysing the version that would be
        applicable for the current JDK?</div>
      <div class="elementToProof" style="text-align: left; text-indent: 0px; line-height: normal; background-color: rgb(255, 255, 255); margin: 0px; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
        <br>
      </div>
      <div class="elementToProof" style="text-align: left; text-indent: 0px; line-height: normal; background-color: rgb(255, 255, 255); margin: 0px; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
        Versions:</div>
      <div class="elementToProof" style="text-align: left; text-indent: 0px; line-height: normal; background-color: rgb(255, 255, 255); margin: 0px; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
        ```</div>
      <div class="elementToProof" style="text-align: left; text-indent: 0px; line-height: normal; background-color: rgb(255, 255, 255); margin: 0px; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
        java --version</div>
      <div class="elementToProof" style="text-align: left; text-indent: 0px; line-height: normal; background-color: rgb(255, 255, 255); margin: 0px; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
        openjdk 24 2025-03-18</div>
      <div class="elementToProof" style="text-align: left; text-indent: 0px; line-height: normal; background-color: rgb(255, 255, 255); margin: 0px; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
        OpenJDK Runtime Environment (build 24+36-3646)</div>
      <div class="elementToProof" style="text-align: left; text-indent: 0px; line-height: normal; background-color: rgb(255, 255, 255); margin: 0px; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
        OpenJDK 64-Bit Server VM (build 24+36-3646, mixed mode, sharing)</div>
      <div class="elementToProof" style="text-align: left; text-indent: 0px; line-height: normal; background-color: rgb(255, 255, 255); margin: 0px; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
        <br>
      </div>
      <div class="elementToProof" style="text-align: left; text-indent: 0px; line-height: normal; background-color: rgb(255, 255, 255); margin: 0px; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
        jnativescan --version</div>
      <div class="elementToProof" style="text-align: left; text-indent: 0px; line-height: normal; background-color: rgb(255, 255, 255); margin: 0px; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
        24</div>
      <div class="elementToProof" style="text-align: left; text-indent: 0px; line-height: normal; background-color: rgb(255, 255, 255); margin: 0px; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
        ```</div>
      <div class="elementToProof" style="text-align: left; text-indent: 0px; line-height: normal; background-color: rgb(255, 255, 255); margin: 0px; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
        <br>
      </div>
      <div class="elementToProof" style="text-align: left; text-indent: 0px; line-height: normal; background-color: rgb(255, 255, 255); margin: 0px; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
        Overall, <code>jnativescan</code> is extremely helpful in
        finding the dependencies using native/restricted features.  </div>
      <div class="elementToProof" style="text-align: left; text-indent: 0px; line-height: normal; background-color: rgb(255, 255, 255); margin: 0px; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
        <br>
      </div>
      <div class="elementToProof" style="text-align: left; text-indent: 0px; line-height: normal; background-color: rgb(255, 255, 255); margin: 0px; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
        [1] <a href="https://repo1.maven.org/maven2/io/projectreactor/reactor-core/3.7.4/reactor-core-3.7.4.jar" target="_blank" id="OWAec8539e4-a795-1906-25ed-5e3fa4b4787b" class="x_OWAAutoLink x_elementToProof moz-txt-link-freetext" title="https://repo1.maven.org/maven2/io/projectreactor/reactor-core/3.7.4/reactor-core-3.7.4.jar" rel="noopener noreferrer" data-linkindex="0" data-auth="NotApplicable" style="margin: 0px; text-align: left;" moz-do-not-send="true">
https://repo1.maven.org/maven2/io/projectreactor/reactor-core/3.7.4/reactor-core-3.7.4.jar</a></div>
      <div class="elementToProof" style="text-align: left; text-indent: 0px; line-height: normal; background-color: rgb(255, 255, 255); margin: 0px; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
        [2] <a href="https://github.com/reactor/reactor-core/blob/7dee739/reactor-core/src/main/java/reactor/core/publisher/CallSiteSupplierFactory.java#L56-L64" target="_blank" id="OWA38d05e4a-6376-f197-cd90-9e781b3f6a08" class="x_OWAAutoLink moz-txt-link-freetext" title="https://github.com/reactor/reactor-core/blob/7dee739/reactor-core/src/main/java/reactor/core/publisher/CallSiteSupplierFactory.java#L56-L64" rel="noopener noreferrer" data-linkindex="1" data-auth="NotApplicable" style="margin: 0px;" moz-do-not-send="true">
https://github.com/reactor/reactor-core/blob/7dee739/reactor-core/src/main/java/reactor/core/publisher/CallSiteSupplierFactory.java#L56-L64</a></div>
      <div class="elementToProof" style="text-align: left; text-indent: 0px; line-height: normal; background-color: rgb(255, 255, 255); margin: 0px; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
        [3] <a href="https://github.com/reactor/reactor-core/blob/0b93178/reactor-core/src/main/java11/reactor/core/publisher/CallSiteSupplierFactory.java" target="_blank" id="OWA86a65431-511c-8e53-6eee-9e94dbd4cd7e" class="x_OWAAutoLink moz-txt-link-freetext" title="https://github.com/reactor/reactor-core/blob/0b93178/reactor-core/src/main/java11/reactor/core/publisher/CallSiteSupplierFactory.java" rel="noopener noreferrer" data-linkindex="2" data-auth="NotApplicable" style="margin: 0px;" moz-do-not-send="true">
https://github.com/reactor/reactor-core/blob/0b93178/reactor-core/src/main/java11/reactor/core/publisher/CallSiteSupplierFactory.java</a></div>
      <div class="elementToProof" style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
        <br>
      </div>
    </blockquote>
  </body>
</html>