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

SPEC BUG: javax.sql.rowset.BaseRowSet: getParams ambiguity

XMLWordPrintable

    • beta
    • sparc
    • solaris_2.6



      Name: sdR10048 Date: 10/22/2003


      Filed By : SPB JCK team (###@###.###)
      JDK : java full version "1.5.0-beta-b23"

      Problem description
      ===================
      public java.lang.Object[] getParams() throws java.sql.SQLException

          "Each element in the array that is returned is an Object instance
          that contains the values of the parameters supplied to a setter
          method. The order of the elements is determined by the value
          supplied for parameterIndex. If the setter method takes only the
          parameter index and the value to be set, the array element will
          contain the value to be set (which must be expressed as an <--
          Object). If there are additional parameters, the array element <--
          will itself be an array containing the value to be set plus any <--
          additional parameter values supplied to the setter method. These
          additional parameters are for the use of the driver or the DBMS
          and may or may not be used."

          And there are some methods with javadoc which says different
          information about the expected getParams() array.
          For example:

          public void setNull(int?parameterIndex, int?sqlType, java.lang.String?typeName) throws java.sql.SQLException

              "Calls made to the method getParams after either version of <--
              setNull has been called will return an array with the value <--
              null for the specified parameter." <--

          public void setInt(int?parameterIndex, int?x) throws java.sql.SQLException

              "Primitives and object instances values to be used as JDBC
              RowSet command parameters are stored internally as object
              instances in an internal Vector object instance. Subsequent <--
              calls to getParams ouput an object array of the current <--
              command parameters that is a direct representation of the <--
              current internal command parameters."

              (The last clause is not true since objects and object+param(s)
               are treated dirrerently)

          And that sort of ambiguity all over the BaseRowSet class javadoc.
          For example, the last quote exists in almost all setXXX(int,) methods.



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

            jbrucesunw Jonathan Bruce (Inactive)
            dsvsunw Dsv Dsv (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: