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

Change Java.toJavaArray() and Java.toJavaScriptArray() to Java.to() and Java.from()

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Fixed
    • Icon: P4 P4
    • 8
    • None
    • core-libs
    • None

      By popular demand, Java interop APIs Java.toJavaArray() and Java.toJavaScriptArray() will be renamed to Java.to() and Java.from(), respectively. Additionally, Java.toJavaArray() took an array component type, but since Java.to() is not necessarily restricted to arrays, we now need to pass the array type, so what was earlier

      Java.toJavaArray([1,2,3], "int")

      must now be

      Java.to([1,2,3], "int[]")

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

              Created:
              Updated:
              Resolved: