< prev index next >

src/java.sql.rowset/share/classes/com/sun/rowset/CachedRowSetImpl.java

Print this page
rev 52881 : 8214971: Replace use of string.equals("") with isEmpty()
Reviewed-by: jlaskey, prappo, lancea, dfuchs, redestad

*** 591,601 **** */ public void setCommand(String cmd) throws SQLException { super.setCommand(cmd); ! if(!buildTableName(cmd).equals("")) { this.setTableName(buildTableName(cmd)); } } --- 591,601 ---- */ public void setCommand(String cmd) throws SQLException { super.setCommand(cmd); ! if(!buildTableName(cmd).isEmpty()) { this.setTableName(buildTableName(cmd)); } }
*** 7067,7077 **** * parameter index is out of bounds */ public void setMatchColumn(String[] columnNames) throws SQLException { for(int j = 0; j < columnNames.length; j++) { ! if( columnNames[j] == null || columnNames[j].equals("")) { throw new SQLException(resBundle.handleGetObject("cachedrowsetimpl.matchcols2").toString()); } } for( int i = 0; i < columnNames.length; i++) { strMatchColumns.add(i,columnNames[i]); --- 7067,7077 ---- * parameter index is out of bounds */ public void setMatchColumn(String[] columnNames) throws SQLException { for(int j = 0; j < columnNames.length; j++) { ! if( columnNames[j] == null || columnNames[j].isEmpty()) { throw new SQLException(resBundle.handleGetObject("cachedrowsetimpl.matchcols2").toString()); } } for( int i = 0; i < columnNames.length; i++) { strMatchColumns.add(i,columnNames[i]);
*** 7122,7132 **** * @throws SQLException if an error occurs or the * parameter index is out of bounds */ public void setMatchColumn(String columnName) throws SQLException { // validate, if col is ok to be set ! if(columnName == null || (columnName= columnName.trim()).equals("") ) { throw new SQLException(resBundle.handleGetObject("cachedrowsetimpl.matchcols2").toString()); } else { // set strMatchColumn strMatchColumns.set(0, columnName); //iMatchColumn = -1; --- 7122,7132 ---- * @throws SQLException if an error occurs or the * parameter index is out of bounds */ public void setMatchColumn(String columnName) throws SQLException { // validate, if col is ok to be set ! if(columnName == null || (columnName= columnName.trim()).isEmpty() ) { throw new SQLException(resBundle.handleGetObject("cachedrowsetimpl.matchcols2").toString()); } else { // set strMatchColumn strMatchColumns.set(0, columnName); //iMatchColumn = -1;
< prev index next >