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

Java.from has a bug, when element is ScriptObject

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b25
    • CPU:
      generic
    • OS:
      generic

      Description

      FULL PRODUCT VERSION :
      java version "1.8.0_144"
      Java(TM) SE Runtime Environment (build 1.8.0_144-b01)
      Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode)

      ADDITIONAL OS VERSION INFORMATION :
      Darwin xx 16.7.0 Darwin Kernel Version 16.7.0: Thu Jun 15 17:36:27 PDT 2017; root:xnu-3789.70.16~2/RELEASE_X86_64 x86_64

      A DESCRIPTION OF THE PROBLEM :
      jrunscript

      a=new java.util.ArrayList();
      a.add({x:1});

      b=a.toArray();

      c=Java.from(b);
      c[0] instanceof Object; // false, it is ScriptObjectMirror

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      jrunscript

      a=new java.util.ArrayList();
      a.add({x:1});

      b=a.toArray();

      c=Java.from(b);
      c[0] instanceof Object;


      REPRODUCIBILITY :
      This bug can be reproduced always.

        Attachments

          Activity

            People

            Assignee:
            hannesw Hannes Wallnoefer
            Reporter:
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: