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

Duplicated statements in BaseRowSet.setNull method specification

    Details

    • Subcomponent:
    • Resolved In Build:
      beta2
    • CPU:
      sparc
    • OS:
      solaris_2.6

      Description



      Name: vsR10316 Date: 04/30/2004


      Filed By : SPB JCK team (###@###.###)
      JDK :
      JCK : 1.5
      Platform[s] : Solaris
      switch/Mode :
      JCK test owner : http://javaweb.eng/jct/sqe/JCK-tck/usr/owners.jto
      Failing Test [s] : N/A


      Specification excerpt:
      ======================
      --------- J2SE API spec v.1.5 ---------
      ...
      setNull

      public void setNull(int parameterIndex,
                          int sqlType)
                   throws SQLException

          Sets the designated parameter to SQL NULL. Note that the parameter's SQL type must be specified using one of the type codes defined in java.sql.Types. This SQL type is specified in the second parameter.

          The placeholder parameter value set by this method is stored internally and will be supplied as the appropriate parameter in this RowSet object's command when the method execute is called.

          Note that the second parameter, one of the type codes from the class java.sql.Types, tells the DBMS the data type of the value being set to NULL. Some DBMSs require this information, so it is required in order to make code more portable.

          Note that this version of the method setNull is used when the value to be set to SQL NULL is a user-defined type (UDT). The additional parameter specifies the fully-qualified name of the UDT.

          The parameter value set by this method is stored internally and will be supplied as the appropriate parameter in this RowSet object's command when the method execute is called. Methods such as execute and populate must be provided in any class that extends this class and implements one or more of the standard JSR-114 RowSet interfaces.

          NOTE: JdbcRowSet does not require the populate method as it is undefined in this class.

          Calls made to the method getParams after this version of setNull has been called will return an Object array containing the parameter values that have been set. In that array, the element that represents the values set with this method will itself be an array. The first element of that array is null. The second element is the value set for sqlType. The parameter number is indicated by an element's position in the array returned by the method getParams, with the first element being the value for the first placeholder parameter, the second element being the value for the second placeholder parameter, and so on. In other words, if the second placeholder parameter is being set to null, the array containing it will be the second element in the array returned by getParams.

          Note that because the numbering of elements in an array starts at zero, the array element that corresponds to placeholder parameter number parameterIndex is parameterIndex -1.

          Parameters:
              parameterIndex - the ordinal number of the placeholder parameter in this RowSet object's command that is to be set. The first parameter is 1, the second is 2, and so on; must be 1 or greater
              sqlType - an int that is one of the SQL type codes defined in the class Types. If a non-standard sqlType is supplied, this method will not throw a SQLException. This allows implicit support for non-standard SQL types.
          Throws:
              SQLException - if a database access error occurs or the given parameter index is out of bounds
          See Also:
              getParams()


      ...
      ---------- end-of-excerpt ---------------

      Problem description
      ===================
      The statement from second paragraph:

          "The placeholder parameter value set by this method is stored internally and will be supplied as the appropriate parameter in this RowSet object's command when the method execute is called."

      is duplicated over 2 paragraphs below after first occurence.

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

        Attachments

          Activity

            People

            • Assignee:
              mfishersunw Maydene Fisher (Inactive)
              Reporter:
              duke J. Duke (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: