Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8325145

Nashorn doesn't resolve overloaded method on aarch64

XMLWordPrintable

      We have the following code invoking `CompletableFuture.thenApplyAsync`:
      ```
          return new Promise(this.future.thenApplyAsync(function(data) {
              if(typeof data === 'string' || data instanceof String) {
                  try {
                      data = JSON.parse(data);
                  } catch (zerror) { }
              }
              
              return callback(data);
          })
      ```
      This code runs as expected on x86, but we see the following failure on aarch64:
      ```
      ECMAException: TypeError: Can not invoke method [jdk.dynalink.beans.OverloadedDynamicMethod\n CompletableFuture java.util.concurrent.CompletableFuture.thenApplyAsync(Function,Executor)\n CompletableFuture java.util.concurrent.CompletableFuture.thenApplyAsync(Function)\n] with the passed arguments; they do not match any of its method signatures.
      ```

      JDK version is 17, Nashorn version is 15.4.

            attila Attila Szegedi
            wkemper William Kemper
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: