Uploaded image for project: 'Runtime'
  1. Runtime
  2. RUNTIME-3302

[ScriptTool] [GraalVM] Management of JS arrays

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 4.3.0
    • 4.3.0
    • None
    • None
    • 4.3 M5

      Since we replaced Nashorn by GraalVM, if a Java class has the following methods:

      public String test(String[] strArray)
      public String test(SomeOtherObject[] boxArray)
       

      then when we pass a JS array, the VM is not able to infer the type of the array, and thus is not able to choose the good method signature to use (an exception is thrown).
      We must provide a helper to easily transform a JS array into a Java array to be able to generate the good type argument (array) and pass it to the VM without any ambiguity in order to call the good method signature.

      + ConsoleHelper do not work anymore (it gets from the VM a List<String> instead of an array, thus it goes to the final case of the if statements)

            sprieul Simon Prieul (Inactive)
            sprieul Simon Prieul (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: