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

The Number data type returned from Javascript to Java is primitive

XMLWordPrintable

    • b50
    • x86
    • windows_2000

      Currently the returned value type is not correct when Java side returns Integer, Short, Long, Float, Double, Byte, Character & String. They have to be wrapped inside a DispatchImpl object, otherwise, the successive invocation of Java method may fail.

      Testcase:
      http://javaweb.sfbay/~xl116366/LCTest/JavaObject/JavaObjectTest.html

      Click "Int Test", this will call into getInt method of the applet, it will return a Integer object, since plugin just returns the int data, the data type has been lost.

      ###@###.### 2004-04-22
      ###@###.### 2004-04-22

            xlu Xiaobin Lu (Inactive)
            xlu Xiaobin Lu (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: