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

The class javax.sql.rowset.serial.SerialArray is too buggy

XMLWordPrintable

    • beta
    • sparc
    • solaris_2.6



      Name: ssR10000 Date: 09/16/2003


      Filed By : SPB JCK team (###@###.###)
      JDK : java full version "1.5.0-beta-b18"
      JCK : 1.5
      Platform[s] : Solaris
      switch/Mode :
      JCK test owner : http://javaweb.eng/jct/sqe/JCK-tck/usr/owners.jto


      Problem description
      ===================
      There is a lot of problems with SerialArray class:

      1. Useless constructor:

           public SerialArray(Array array, Map map) throws SerialException, SQLException {

      elements = (Object[])array.getArray(map);
              baseType = getBaseType();
      //SSW : it is looks like correct way is baseType = array.getBaseType();
              baseTypeName = getBaseTypeName();
      //SSW : it is looks like correct way is baseType = array.getBaseTypeName();
              len = elements.length;

      //SSW : following switch does not work correctly due to wrong init.
              switch (baseType) {
              case java.sql.Types.STRUCT:
      ....

      2. The same with next one:
           public SerialArray(Array array) throws SerialException, SQLException {

      elements = (Object[])array.getArray();
              baseType = getBaseType();
              baseTypeName = getBaseTypeName();
              len = elements.length;

              switch (baseType) {

      3. Due to bugs in constructors following methods work incorrectly:
          public int getBaseType() throws SerialException
      result undefined

          public String getBaseTypeName() throws SerialException
      always return null

      A lot of JCK tests failed due to these problems:
      api/javax_sql/rowset/serial/SerialArray/index.html#Main[SerialArray2002]
      api/javax_sql/rowset/serial/SerialArray/index.html#Main[SerialArray2003]
      api/javax_sql/rowset/serial/SerialArray/index.html#Main[SerialArray2004]
      api/javax_sql/rowset/serial/SerialArray/index.html#Main[SerialArray2005]
      api/javax_sql/rowset/serial/SerialArray/index.html#Main[SerialArray2008]
      api/javax_sql/rowset/serial/SerialArray/index.html#Main[SerialArray2009]

      Priority is P2 because this class is completely useless without correct constructors.


      JCK test source location:
      ==========================
      /java/re/jck/1.5/promoted/latest/JCK-runtime-15/tests

      ======================================================================

            ahandasunw Amit Handa (Inactive)
            sswsunw Ssw Ssw (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: