# HG changeset patch # User lancea # Date 1285958161 14400 # Node ID aef4e294026fab86e89ef6de7b6e8f07ca8d238a # Parent 7e7d18be1370dd575e571d01c4b59f9cf8c6c055 6988993: Address Findbugs warnings for the use of String Constructor Reviewed-by: ohair diff -r 7e7d18be1370 -r aef4e294026f jdk/src/share/classes/com/sun/rowset/CachedRowSetImpl.java --- a/jdk/src/share/classes/com/sun/rowset/CachedRowSetImpl.java Thu Sep 30 14:49:14 2010 +0100 +++ b/jdk/src/share/classes/com/sun/rowset/CachedRowSetImpl.java Fri Oct 01 14:36:01 2010 -0400 @@ -4042,7 +4042,7 @@ case java.sql.Types.CHAR: case java.sql.Types.VARCHAR: case java.sql.Types.LONGVARCHAR: - return new String(srcObj.toString()); + return srcObj.toString(); default: throw new SQLException(resBundle.handleGetObject("cachedrowsetimpl.dtypemismt").toString()+ trgType); } @@ -4139,7 +4139,7 @@ case java.sql.Types.CHAR: case java.sql.Types.VARCHAR: case java.sql.Types.LONGVARCHAR: - return new String(srcObj.toString()); + return srcObj.toString(); default: throw new SQLException(resBundle.handleGetObject("cachedrowsetimpl.dtypemismt").toString()); } @@ -6434,7 +6434,7 @@ if (tabName == null) throw new SQLException(resBundle.handleGetObject("cachedrowsetimpl.tablename").toString()); else - tableName = new String(tabName); + tableName = tabName; } /** diff -r 7e7d18be1370 -r aef4e294026f jdk/src/share/classes/com/sun/rowset/FilteredRowSetImpl.java --- a/jdk/src/share/classes/com/sun/rowset/FilteredRowSetImpl.java Thu Sep 30 14:49:14 2010 +0100 +++ b/jdk/src/share/classes/com/sun/rowset/FilteredRowSetImpl.java Fri Oct 01 14:36:01 2010 -0400 @@ -1106,7 +1106,7 @@ public void updateBytes(int columnIndex , byte []x) throws SQLException { boolean bool; - String val = new String(); + String val = ""; Byte [] obj_arr = new Byte[x.length]; diff -r 7e7d18be1370 -r aef4e294026f jdk/src/share/classes/com/sun/rowset/JoinRowSetImpl.java --- a/jdk/src/share/classes/com/sun/rowset/JoinRowSetImpl.java Thu Sep 30 14:49:14 2010 +0100 +++ b/jdk/src/share/classes/com/sun/rowset/JoinRowSetImpl.java Fri Oct 01 14:36:01 2010 -0400 @@ -876,8 +876,8 @@ String strWhereClause = "Select "; String whereClause; - String tabName= null; - String strTabName = null; + String tabName= ""; + String strTabName = ""; int sz,cols; int j; CachedRowSetImpl crs; @@ -891,8 +891,6 @@ // tableNameX.(rowsetX.getMatchColumnName()) == // tableNameZ.(rowsetZ.getMatchColumnName())); - tabName = new String(); - strTabName = new String(); sz = vecRowSetsInJOIN.size(); for(int i=0;iSerialStruct object. */ static final long serialVersionUID = -8322445504027483372L;