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

[ScriptTool] [GraalVM] Management of JS arrays

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.3.0
    • Fix Version/s: 4.3.0
    • Component/s: None
    • Labels:
      None
    • Sprint:
      4.3 M5

      Description

      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)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                sprieul Simon Prieul
                Reporter:
                sprieul Simon Prieul
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: