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

Plug-In converts java.lang.Double to double

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.3.0
    • deploy
    • x86
    • windows_98



      Name: boT120536 Date: 02/08/2001


      java version "1.3.0"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
      Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)

      This bug was formerly issued unter No. 115987

      The problem is that ActiveX-Bridge always converts java.lang.Double class to
      double data type. This is very bad because we have many beans that essentially
      need to get/set Double: The beans rely on the NULL information for "there is no
      value". For ActiveX-Bridge converts java.lang.*-Wrappers into data types, we
      cannot read or set NULL for this methods!

      See this source code:

      public class theBean implements java.io.Serializable {
        private Double _value = new Double(10.0581);
        public theBean() {
        }
        public Double getDouble() {
          return this._value;
        }
        public void setDouble(Double newValue) {
          this._value = newValue;
        }
      }

      When I try to access this bean from ActiveX (either C++, VisualBasic or
      something else), getDouble delivers double not Double, and setDouble accepts
      double but not Double. So I cannot do setDouble(NULL) from inside C++ and I
      cannot check if(myInstance.getDouble()==NULL)! This is only with java.lang.*-
      Wrappers! Other datatypes work.
      (Review ID: 116113)
      ======================================================================

            jmelvin James Melvin (Inactive)
            bonealsunw Bret O'neal (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: