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

faulty guard logic in setMatchColumn(String columnName)

    Details

    • Subcomponent:
    • Resolved In Build:
      b01
    • CPU:
      x86
    • OS:
      windows_xp

      Description

      FULL PRODUCT VERSION :
      mustang early release (java.net)

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows XP [Version 5.1.2600]

      EXTRA RELEVANT SYSTEM CONFIGURATION :
      not needed

      A DESCRIPTION OF THE PROBLEM :
      In com.sun.rowset.CacheRowsetImpl and com.sun.rowset.JdbcRowsetImpl

         public void setMatchColumn(String columnName) throws SQLException {
              // validate, if col is ok to be set
              columnName = columnName.trim();
              if( columnName == "" || columnName.equals(null)) {
                  throw new SQLException(resBundle.handleGetObject("cachedrowsetimpl.matchcols2").toString());

      this guard

      if( columnName == "" || columnName.equals(null)) {


      is complelely bogus, if columnName is null both sides would cause a NullPointerException.



      REPRODUCIBILITY :
      This bug can be reproduced always.

        Attachments

          Activity

            People

            • Assignee:
              ssharmasunw Sushmita Sharma (Inactive)
              Reporter:
              rmandalasunw Ranjith Mandala (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: