src/java.sql.rowset/share/classes/com/sun/rowset/CachedRowSetImpl.java
changeset 52902 e3398b2e1ab0
parent 47216 71c04702a3d5
equal deleted inserted replaced
52901:3ba9ff4d4aaf 52902:e3398b2e1ab0
   591      */
   591      */
   592     public void setCommand(String cmd) throws SQLException {
   592     public void setCommand(String cmd) throws SQLException {
   593 
   593 
   594         super.setCommand(cmd);
   594         super.setCommand(cmd);
   595 
   595 
   596         if(!buildTableName(cmd).equals("")) {
   596         if(!buildTableName(cmd).isEmpty()) {
   597             this.setTableName(buildTableName(cmd));
   597             this.setTableName(buildTableName(cmd));
   598         }
   598         }
   599     }
   599     }
   600 
   600 
   601 
   601 
  7067      *  parameter index is out of bounds
  7067      *  parameter index is out of bounds
  7068      */
  7068      */
  7069     public void setMatchColumn(String[] columnNames) throws SQLException {
  7069     public void setMatchColumn(String[] columnNames) throws SQLException {
  7070 
  7070 
  7071         for(int j = 0; j < columnNames.length; j++) {
  7071         for(int j = 0; j < columnNames.length; j++) {
  7072            if( columnNames[j] == null || columnNames[j].equals("")) {
  7072            if( columnNames[j] == null || columnNames[j].isEmpty()) {
  7073               throw new SQLException(resBundle.handleGetObject("cachedrowsetimpl.matchcols2").toString());
  7073               throw new SQLException(resBundle.handleGetObject("cachedrowsetimpl.matchcols2").toString());
  7074            }
  7074            }
  7075         }
  7075         }
  7076         for( int i = 0; i < columnNames.length; i++) {
  7076         for( int i = 0; i < columnNames.length; i++) {
  7077            strMatchColumns.add(i,columnNames[i]);
  7077            strMatchColumns.add(i,columnNames[i]);
  7122      * @throws SQLException if an error occurs or the
  7122      * @throws SQLException if an error occurs or the
  7123      *  parameter index is out of bounds
  7123      *  parameter index is out of bounds
  7124      */
  7124      */
  7125     public void setMatchColumn(String columnName) throws SQLException {
  7125     public void setMatchColumn(String columnName) throws SQLException {
  7126         // validate, if col is ok to be set
  7126         // validate, if col is ok to be set
  7127         if(columnName == null || (columnName= columnName.trim()).equals("") ) {
  7127         if(columnName == null || (columnName= columnName.trim()).isEmpty() ) {
  7128             throw new SQLException(resBundle.handleGetObject("cachedrowsetimpl.matchcols2").toString());
  7128             throw new SQLException(resBundle.handleGetObject("cachedrowsetimpl.matchcols2").toString());
  7129         } else {
  7129         } else {
  7130             // set strMatchColumn
  7130             // set strMatchColumn
  7131             strMatchColumns.set(0, columnName);
  7131             strMatchColumns.set(0, columnName);
  7132             //iMatchColumn = -1;
  7132             //iMatchColumn = -1;