提交 90152284 编写于 作者: L lancea

6989139: Address JDBC Findbugs where Number type Constructor are used

Reviewed-by: ohair
上级 efffd359
...@@ -525,7 +525,7 @@ public class CachedRowSetImpl extends BaseRowSet implements RowSet, RowSetIntern ...@@ -525,7 +525,7 @@ public class CachedRowSetImpl extends BaseRowSet implements RowSet, RowSetIntern
iMatchColumns = new Vector(10); iMatchColumns = new Vector(10);
for(int i = 0; i < 10 ; i++) { for(int i = 0; i < 10 ; i++) {
iMatchColumns.add(i,new Integer(-1)); iMatchColumns.add(i,Integer.valueOf(-1));
} }
strMatchColumns = new Vector(10); strMatchColumns = new Vector(10);
...@@ -1299,7 +1299,7 @@ public class CachedRowSetImpl extends BaseRowSet implements RowSet, RowSetIntern ...@@ -1299,7 +1299,7 @@ public class CachedRowSetImpl extends BaseRowSet implements RowSet, RowSetIntern
tMap = new TreeMap(); tMap = new TreeMap();
for (int i = 0; i<numRows; i++) { for (int i = 0; i<numRows; i++) {
tMap.put(new Integer(i), rvh.get(i)); tMap.put(Integer.valueOf(i), rvh.get(i));
} }
return (tMap.values()); return (tMap.values());
...@@ -1811,7 +1811,7 @@ public class CachedRowSetImpl extends BaseRowSet implements RowSet, RowSetIntern ...@@ -1811,7 +1811,7 @@ public class CachedRowSetImpl extends BaseRowSet implements RowSet, RowSetIntern
return (byte)0; return (byte)0;
} }
try { try {
return ((new Byte(value.toString())).byteValue()); return ((Byte.valueOf(value.toString())).byteValue());
} catch (NumberFormatException ex) { } catch (NumberFormatException ex) {
throw new SQLException(MessageFormat.format(resBundle.handleGetObject("cachedrowsetimpl.bytefail").toString(), throw new SQLException(MessageFormat.format(resBundle.handleGetObject("cachedrowsetimpl.bytefail").toString(),
new Object[] {value.toString().trim(), columnIndex})); new Object[] {value.toString().trim(), columnIndex}));
...@@ -1855,7 +1855,7 @@ public class CachedRowSetImpl extends BaseRowSet implements RowSet, RowSetIntern ...@@ -1855,7 +1855,7 @@ public class CachedRowSetImpl extends BaseRowSet implements RowSet, RowSetIntern
} }
try { try {
return ((new Short(value.toString().trim())).shortValue()); return ((Short.valueOf(value.toString().trim())).shortValue());
} catch (NumberFormatException ex) { } catch (NumberFormatException ex) {
throw new SQLException(MessageFormat.format(resBundle.handleGetObject("cachedrowsetimpl.shortfail").toString(), throw new SQLException(MessageFormat.format(resBundle.handleGetObject("cachedrowsetimpl.shortfail").toString(),
new Object[] {value.toString().trim(), columnIndex})); new Object[] {value.toString().trim(), columnIndex}));
...@@ -1898,7 +1898,7 @@ public class CachedRowSetImpl extends BaseRowSet implements RowSet, RowSetIntern ...@@ -1898,7 +1898,7 @@ public class CachedRowSetImpl extends BaseRowSet implements RowSet, RowSetIntern
} }
try { try {
return ((new Integer(value.toString().trim())).intValue()); return ((Integer.valueOf(value.toString().trim())).intValue());
} catch (NumberFormatException ex) { } catch (NumberFormatException ex) {
throw new SQLException(MessageFormat.format(resBundle.handleGetObject("cachedrowsetimpl.intfail").toString(), throw new SQLException(MessageFormat.format(resBundle.handleGetObject("cachedrowsetimpl.intfail").toString(),
new Object[] {value.toString().trim(), columnIndex})); new Object[] {value.toString().trim(), columnIndex}));
...@@ -1941,7 +1941,7 @@ public class CachedRowSetImpl extends BaseRowSet implements RowSet, RowSetIntern ...@@ -1941,7 +1941,7 @@ public class CachedRowSetImpl extends BaseRowSet implements RowSet, RowSetIntern
return (long)0; return (long)0;
} }
try { try {
return ((new Long(value.toString().trim())).longValue()); return ((Long.valueOf(value.toString().trim())).longValue());
} catch (NumberFormatException ex) { } catch (NumberFormatException ex) {
throw new SQLException(MessageFormat.format(resBundle.handleGetObject("cachedrowsetimpl.longfail").toString(), throw new SQLException(MessageFormat.format(resBundle.handleGetObject("cachedrowsetimpl.longfail").toString(),
new Object[] {value.toString().trim(), columnIndex})); new Object[] {value.toString().trim(), columnIndex}));
...@@ -4019,18 +4019,18 @@ public class CachedRowSetImpl extends BaseRowSet implements RowSet, RowSetIntern ...@@ -4019,18 +4019,18 @@ public class CachedRowSetImpl extends BaseRowSet implements RowSet, RowSetIntern
try { try {
switch (trgType) { switch (trgType) {
case java.sql.Types.BIT: case java.sql.Types.BIT:
Integer i = new Integer(srcObj.toString().trim()); Integer i = Integer.valueOf(srcObj.toString().trim());
return i.equals(new Integer((int)0)) ? return i.equals(Integer.valueOf((int)0)) ?
new Boolean(false) : Boolean.valueOf(false) :
new Boolean(true); Boolean.valueOf(true);
case java.sql.Types.TINYINT: case java.sql.Types.TINYINT:
return new Byte(srcObj.toString().trim()); return Byte.valueOf(srcObj.toString().trim());
case java.sql.Types.SMALLINT: case java.sql.Types.SMALLINT:
return new Short(srcObj.toString().trim()); return Short.valueOf(srcObj.toString().trim());
case java.sql.Types.INTEGER: case java.sql.Types.INTEGER:
return new Integer(srcObj.toString().trim()); return Integer.valueOf(srcObj.toString().trim());
case java.sql.Types.BIGINT: case java.sql.Types.BIGINT:
return new Long(srcObj.toString().trim()); return Long.valueOf(srcObj.toString().trim());
case java.sql.Types.NUMERIC: case java.sql.Types.NUMERIC:
case java.sql.Types.DECIMAL: case java.sql.Types.DECIMAL:
return new BigDecimal(srcObj.toString().trim()); return new BigDecimal(srcObj.toString().trim());
...@@ -4186,12 +4186,12 @@ public class CachedRowSetImpl extends BaseRowSet implements RowSet, RowSetIntern ...@@ -4186,12 +4186,12 @@ public class CachedRowSetImpl extends BaseRowSet implements RowSet, RowSetIntern
try { try {
switch (trgType) { switch (trgType) {
case java.sql.Types.BIT: case java.sql.Types.BIT:
Integer i = new Integer(srcObj.toString().trim()); Integer i = Integer.valueOf(srcObj.toString().trim());
return i.equals(new Integer((int)0)) ? return i.equals(Integer.valueOf((int)0)) ?
new Boolean(false) : Boolean.valueOf(false) :
new Boolean(true); Boolean.valueOf(true);
case java.sql.Types.BOOLEAN: case java.sql.Types.BOOLEAN:
return new Boolean(srcObj.toString().trim()); return Boolean.valueOf(srcObj.toString().trim());
default: default:
throw new SQLException(resBundle.handleGetObject("cachedrowsetimpl.dtypemismt").toString()+ trgType); throw new SQLException(resBundle.handleGetObject("cachedrowsetimpl.dtypemismt").toString()+ trgType);
} }
...@@ -4265,7 +4265,7 @@ public class CachedRowSetImpl extends BaseRowSet implements RowSet, RowSetIntern ...@@ -4265,7 +4265,7 @@ public class CachedRowSetImpl extends BaseRowSet implements RowSet, RowSetIntern
checkIndex(columnIndex); checkIndex(columnIndex);
// make sure the cursor is on a valid row // make sure the cursor is on a valid row
checkCursor(); checkCursor();
Object obj = convertBoolean(new Boolean(x), Object obj = convertBoolean(Boolean.valueOf(x),
java.sql.Types.BIT, java.sql.Types.BIT,
RowSetMD.getColumnType(columnIndex)); RowSetMD.getColumnType(columnIndex));
...@@ -4301,7 +4301,7 @@ public class CachedRowSetImpl extends BaseRowSet implements RowSet, RowSetIntern ...@@ -4301,7 +4301,7 @@ public class CachedRowSetImpl extends BaseRowSet implements RowSet, RowSetIntern
// make sure the cursor is on a valid row // make sure the cursor is on a valid row
checkCursor(); checkCursor();
Object obj = convertNumeric(new Byte(x), Object obj = convertNumeric(Byte.valueOf(x),
java.sql.Types.TINYINT, java.sql.Types.TINYINT,
RowSetMD.getColumnType(columnIndex)); RowSetMD.getColumnType(columnIndex));
...@@ -4337,7 +4337,7 @@ public class CachedRowSetImpl extends BaseRowSet implements RowSet, RowSetIntern ...@@ -4337,7 +4337,7 @@ public class CachedRowSetImpl extends BaseRowSet implements RowSet, RowSetIntern
// make sure the cursor is on a valid row // make sure the cursor is on a valid row
checkCursor(); checkCursor();
Object obj = convertNumeric(new Short(x), Object obj = convertNumeric(Short.valueOf(x),
java.sql.Types.SMALLINT, java.sql.Types.SMALLINT,
RowSetMD.getColumnType(columnIndex)); RowSetMD.getColumnType(columnIndex));
...@@ -4372,7 +4372,7 @@ public class CachedRowSetImpl extends BaseRowSet implements RowSet, RowSetIntern ...@@ -4372,7 +4372,7 @@ public class CachedRowSetImpl extends BaseRowSet implements RowSet, RowSetIntern
checkIndex(columnIndex); checkIndex(columnIndex);
// make sure the cursor is on a valid row // make sure the cursor is on a valid row
checkCursor(); checkCursor();
Object obj = convertNumeric(new Integer(x), Object obj = convertNumeric(Integer.valueOf(x),
java.sql.Types.INTEGER, java.sql.Types.INTEGER,
RowSetMD.getColumnType(columnIndex)); RowSetMD.getColumnType(columnIndex));
...@@ -4408,7 +4408,7 @@ public class CachedRowSetImpl extends BaseRowSet implements RowSet, RowSetIntern ...@@ -4408,7 +4408,7 @@ public class CachedRowSetImpl extends BaseRowSet implements RowSet, RowSetIntern
// make sure the cursor is on a valid row // make sure the cursor is on a valid row
checkCursor(); checkCursor();
Object obj = convertNumeric(new Long(x), Object obj = convertNumeric(Long.valueOf(x),
java.sql.Types.BIGINT, java.sql.Types.BIGINT,
RowSetMD.getColumnType(columnIndex)); RowSetMD.getColumnType(columnIndex));
...@@ -6945,7 +6945,7 @@ public class CachedRowSetImpl extends BaseRowSet implements RowSet, RowSetIntern ...@@ -6945,7 +6945,7 @@ public class CachedRowSetImpl extends BaseRowSet implements RowSet, RowSetIntern
} }
for( int i = 0;i < columnIdxes.length ;i++) { for( int i = 0;i < columnIdxes.length ;i++) {
iMatchColumns.set(i,new Integer(-1)); iMatchColumns.set(i,Integer.valueOf(-1));
} }
} }
...@@ -7054,7 +7054,7 @@ public class CachedRowSetImpl extends BaseRowSet implements RowSet, RowSetIntern ...@@ -7054,7 +7054,7 @@ public class CachedRowSetImpl extends BaseRowSet implements RowSet, RowSetIntern
} }
} }
for(int i = 0 ;i < columnIdxes.length; i++) { for(int i = 0 ;i < columnIdxes.length; i++) {
iMatchColumns.add(i,new Integer(columnIdxes[i])); iMatchColumns.add(i,Integer.valueOf(columnIdxes[i]));
} }
} }
...@@ -7109,7 +7109,7 @@ public class CachedRowSetImpl extends BaseRowSet implements RowSet, RowSetIntern ...@@ -7109,7 +7109,7 @@ public class CachedRowSetImpl extends BaseRowSet implements RowSet, RowSetIntern
throw new SQLException(resBundle.handleGetObject("cachedrowsetimpl.matchcols1").toString()); throw new SQLException(resBundle.handleGetObject("cachedrowsetimpl.matchcols1").toString());
} else { } else {
// set iMatchColumn // set iMatchColumn
iMatchColumns.set(0, new Integer(columnIdx)); iMatchColumns.set(0, Integer.valueOf(columnIdx));
//strMatchColumn = null; //strMatchColumn = null;
} }
} }
...@@ -7131,7 +7131,7 @@ public class CachedRowSetImpl extends BaseRowSet implements RowSet, RowSetIntern ...@@ -7131,7 +7131,7 @@ public class CachedRowSetImpl extends BaseRowSet implements RowSet, RowSetIntern
*/ */
public void setMatchColumn(String columnName) throws SQLException { public void setMatchColumn(String columnName) throws SQLException {
// validate, if col is ok to be set // validate, if col is ok to be set
if(columnName.equals(null) || ((columnName = columnName.trim()) == "" )) { if(columnName == null || (columnName= columnName.trim()).equals("") ) {
throw new SQLException(resBundle.handleGetObject("cachedrowsetimpl.matchcols2").toString()); throw new SQLException(resBundle.handleGetObject("cachedrowsetimpl.matchcols2").toString());
} else { } else {
// set strMatchColumn // set strMatchColumn
...@@ -7156,13 +7156,13 @@ public class CachedRowSetImpl extends BaseRowSet implements RowSet, RowSetIntern ...@@ -7156,13 +7156,13 @@ public class CachedRowSetImpl extends BaseRowSet implements RowSet, RowSetIntern
*/ */
public void unsetMatchColumn(int columnIdx) throws SQLException { public void unsetMatchColumn(int columnIdx) throws SQLException {
// check if we are unsetting the SAME column // check if we are unsetting the SAME column
if(! iMatchColumns.get(0).equals(new Integer(columnIdx) ) ) { if(! iMatchColumns.get(0).equals(Integer.valueOf(columnIdx) ) ) {
throw new SQLException(resBundle.handleGetObject("cachedrowsetimpl.unsetmatch").toString()); throw new SQLException(resBundle.handleGetObject("cachedrowsetimpl.unsetmatch").toString());
} else if(strMatchColumns.get(0) != null) { } else if(strMatchColumns.get(0) != null) {
throw new SQLException(resBundle.handleGetObject("cachedrowsetimpl.unsetmatch1").toString()); throw new SQLException(resBundle.handleGetObject("cachedrowsetimpl.unsetmatch1").toString());
} else { } else {
// that is, we are unsetting it. // that is, we are unsetting it.
iMatchColumns.set(0, new Integer(-1)); iMatchColumns.set(0, Integer.valueOf(-1));
} }
} }
......
...@@ -499,7 +499,7 @@ public class FilteredRowSetImpl extends WebRowSetImpl implements Serializable, C ...@@ -499,7 +499,7 @@ public class FilteredRowSetImpl extends WebRowSetImpl implements Serializable, C
if(onInsertRow) { if(onInsertRow) {
if(p != null) { if(p != null) {
bool = p.evaluate(new Integer(x),columnIndex); bool = p.evaluate(Integer.valueOf(x),columnIndex);
if(!bool) { if(!bool) {
throw new SQLException(resBundle.handleGetObject("filteredrowsetimpl.notallowed").toString()); throw new SQLException(resBundle.handleGetObject("filteredrowsetimpl.notallowed").toString());
...@@ -566,7 +566,7 @@ public class FilteredRowSetImpl extends WebRowSetImpl implements Serializable, C ...@@ -566,7 +566,7 @@ public class FilteredRowSetImpl extends WebRowSetImpl implements Serializable, C
if(onInsertRow) { if(onInsertRow) {
if(p != null) { if(p != null) {
bool = p.evaluate(new Boolean(x) , columnIndex); bool = p.evaluate(Boolean.valueOf(x) , columnIndex);
if(!bool) { if(!bool) {
throw new SQLException(resBundle.handleGetObject("filteredrowsetimpl.notallowed").toString()); throw new SQLException(resBundle.handleGetObject("filteredrowsetimpl.notallowed").toString());
...@@ -634,7 +634,7 @@ public class FilteredRowSetImpl extends WebRowSetImpl implements Serializable, C ...@@ -634,7 +634,7 @@ public class FilteredRowSetImpl extends WebRowSetImpl implements Serializable, C
if(onInsertRow) { if(onInsertRow) {
if(p != null) { if(p != null) {
bool = p.evaluate(new Byte(x),columnIndex); bool = p.evaluate(Byte.valueOf(x),columnIndex);
if(!bool) { if(!bool) {
throw new SQLException(resBundle.handleGetObject("filteredrowsetimpl.notallowed").toString()); throw new SQLException(resBundle.handleGetObject("filteredrowsetimpl.notallowed").toString());
...@@ -703,7 +703,7 @@ public class FilteredRowSetImpl extends WebRowSetImpl implements Serializable, C ...@@ -703,7 +703,7 @@ public class FilteredRowSetImpl extends WebRowSetImpl implements Serializable, C
if(onInsertRow) { if(onInsertRow) {
if(p != null) { if(p != null) {
bool = p.evaluate(new Short(x), columnIndex); bool = p.evaluate(Short.valueOf(x), columnIndex);
if(!bool) { if(!bool) {
throw new SQLException(resBundle.handleGetObject("filteredrowsetimpl.notallowed").toString()); throw new SQLException(resBundle.handleGetObject("filteredrowsetimpl.notallowed").toString());
...@@ -771,7 +771,7 @@ public class FilteredRowSetImpl extends WebRowSetImpl implements Serializable, C ...@@ -771,7 +771,7 @@ public class FilteredRowSetImpl extends WebRowSetImpl implements Serializable, C
if(onInsertRow) { if(onInsertRow) {
if(p != null) { if(p != null) {
bool = p.evaluate(new Long(x), columnIndex); bool = p.evaluate(Long.valueOf(x), columnIndex);
if(!bool) { if(!bool) {
throw new SQLException(resBundle.handleGetObject("filteredrowsetimpl.notallowed").toString()); throw new SQLException(resBundle.handleGetObject("filteredrowsetimpl.notallowed").toString());
...@@ -1111,7 +1111,7 @@ public class FilteredRowSetImpl extends WebRowSetImpl implements Serializable, C ...@@ -1111,7 +1111,7 @@ public class FilteredRowSetImpl extends WebRowSetImpl implements Serializable, C
Byte [] obj_arr = new Byte[x.length]; Byte [] obj_arr = new Byte[x.length];
for(int i = 0; i < x.length; i++) { for(int i = 0; i < x.length; i++) {
obj_arr[i] = new Byte(x[i]); obj_arr[i] = Byte.valueOf(x[i]);
val = val.concat(obj_arr[i].toString()); val = val.concat(obj_arr[i].toString());
} }
......
...@@ -215,7 +215,7 @@ public class JdbcRowSetImpl extends BaseRowSet implements JdbcRowSet, Joinable { ...@@ -215,7 +215,7 @@ public class JdbcRowSetImpl extends BaseRowSet implements JdbcRowSet, Joinable {
iMatchColumns = new Vector(10); iMatchColumns = new Vector(10);
for(int i = 0; i < 10 ; i++) { for(int i = 0; i < 10 ; i++) {
iMatchColumns.add(i,new Integer(-1)); iMatchColumns.add(i,Integer.valueOf(-1));
} }
strMatchColumns = new Vector(10); strMatchColumns = new Vector(10);
...@@ -288,7 +288,7 @@ public class JdbcRowSetImpl extends BaseRowSet implements JdbcRowSet, Joinable { ...@@ -288,7 +288,7 @@ public class JdbcRowSetImpl extends BaseRowSet implements JdbcRowSet, Joinable {
iMatchColumns = new Vector(10); iMatchColumns = new Vector(10);
for(int i = 0; i < 10 ; i++) { for(int i = 0; i < 10 ; i++) {
iMatchColumns.add(i,new Integer(-1)); iMatchColumns.add(i,Integer.valueOf(-1));
} }
strMatchColumns = new Vector(10); strMatchColumns = new Vector(10);
...@@ -375,7 +375,7 @@ public class JdbcRowSetImpl extends BaseRowSet implements JdbcRowSet, Joinable { ...@@ -375,7 +375,7 @@ public class JdbcRowSetImpl extends BaseRowSet implements JdbcRowSet, Joinable {
iMatchColumns = new Vector(10); iMatchColumns = new Vector(10);
for(int i = 0; i < 10 ; i++) { for(int i = 0; i < 10 ; i++) {
iMatchColumns.add(i,new Integer(-1)); iMatchColumns.add(i,Integer.valueOf(-1));
} }
strMatchColumns = new Vector(10); strMatchColumns = new Vector(10);
...@@ -465,7 +465,7 @@ public class JdbcRowSetImpl extends BaseRowSet implements JdbcRowSet, Joinable { ...@@ -465,7 +465,7 @@ public class JdbcRowSetImpl extends BaseRowSet implements JdbcRowSet, Joinable {
iMatchColumns = new Vector(10); iMatchColumns = new Vector(10);
for(int i = 0; i < 10 ; i++) { for(int i = 0; i < 10 ; i++) {
iMatchColumns.add(i,new Integer(-1)); iMatchColumns.add(i,Integer.valueOf(-1));
} }
strMatchColumns = new Vector(10); strMatchColumns = new Vector(10);
...@@ -3754,7 +3754,7 @@ public class JdbcRowSetImpl extends BaseRowSet implements JdbcRowSet, Joinable { ...@@ -3754,7 +3754,7 @@ public class JdbcRowSetImpl extends BaseRowSet implements JdbcRowSet, Joinable {
} }
for( int i = 0;i < columnIdxes.length ;i++) { for( int i = 0;i < columnIdxes.length ;i++) {
iMatchColumns.set(i,new Integer(-1)); iMatchColumns.set(i,Integer.valueOf(-1));
} }
} }
...@@ -3863,7 +3863,7 @@ public class JdbcRowSetImpl extends BaseRowSet implements JdbcRowSet, Joinable { ...@@ -3863,7 +3863,7 @@ public class JdbcRowSetImpl extends BaseRowSet implements JdbcRowSet, Joinable {
} }
} }
for(int i = 0 ;i < columnIdxes.length; i++) { for(int i = 0 ;i < columnIdxes.length; i++) {
iMatchColumns.add(i,new Integer(columnIdxes[i])); iMatchColumns.add(i,Integer.valueOf(columnIdxes[i]));
} }
} }
...@@ -3918,7 +3918,7 @@ public class JdbcRowSetImpl extends BaseRowSet implements JdbcRowSet, Joinable { ...@@ -3918,7 +3918,7 @@ public class JdbcRowSetImpl extends BaseRowSet implements JdbcRowSet, Joinable {
throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.matchcols1").toString()); throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.matchcols1").toString());
} else { } else {
// set iMatchColumn // set iMatchColumn
iMatchColumns.set(0, new Integer(columnIdx)); iMatchColumns.set(0, Integer.valueOf(columnIdx));
//strMatchColumn = null; //strMatchColumn = null;
} }
} }
...@@ -3940,7 +3940,7 @@ public class JdbcRowSetImpl extends BaseRowSet implements JdbcRowSet, Joinable { ...@@ -3940,7 +3940,7 @@ public class JdbcRowSetImpl extends BaseRowSet implements JdbcRowSet, Joinable {
*/ */
public void setMatchColumn(String columnName) throws SQLException { public void setMatchColumn(String columnName) throws SQLException {
// validate, if col is ok to be set // validate, if col is ok to be set
if(columnName.equals(null) || ((columnName = columnName.trim()) == "" )) { if(columnName == null || (columnName= columnName.trim()).equals("")) {
throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.matchcols2").toString()); throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.matchcols2").toString());
} else { } else {
// set strMatchColumn // set strMatchColumn
...@@ -3965,13 +3965,13 @@ public class JdbcRowSetImpl extends BaseRowSet implements JdbcRowSet, Joinable { ...@@ -3965,13 +3965,13 @@ public class JdbcRowSetImpl extends BaseRowSet implements JdbcRowSet, Joinable {
*/ */
public void unsetMatchColumn(int columnIdx) throws SQLException { public void unsetMatchColumn(int columnIdx) throws SQLException {
// check if we are unsetting the SAME column // check if we are unsetting the SAME column
if(! iMatchColumns.get(0).equals(new Integer(columnIdx) ) ) { if(! iMatchColumns.get(0).equals(Integer.valueOf(columnIdx) ) ) {
throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.unsetmatch").toString()); throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.unsetmatch").toString());
} else if(strMatchColumns.get(0) != null) { } else if(strMatchColumns.get(0) != null) {
throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.usecolname").toString()); throw new SQLException(resBundle.handleGetObject("jdbcrowsetimpl.usecolname").toString());
} else { } else {
// that is, we are unsetting it. // that is, we are unsetting it.
iMatchColumns.set(0, new Integer(-1)); iMatchColumns.set(0, Integer.valueOf(-1));
} }
} }
......
...@@ -552,7 +552,7 @@ public class JoinRowSetImpl extends WebRowSetImpl implements JoinRowSet { ...@@ -552,7 +552,7 @@ public class JoinRowSetImpl extends WebRowSetImpl implements JoinRowSet {
// This 'if' will be removed after all joins are implemented. // This 'if' will be removed after all joins are implemented.
throw new SQLException(resBundle.handleGetObject("joinrowsetimpl.notsupported").toString()); throw new SQLException(resBundle.handleGetObject("joinrowsetimpl.notsupported").toString());
} else { } else {
Integer Intgr = new Integer(JoinRowSet.INNER_JOIN); Integer Intgr = Integer.valueOf(JoinRowSet.INNER_JOIN);
vecJoinType.add(Intgr); vecJoinType.add(Intgr);
} }
} else { } else {
......
...@@ -338,11 +338,11 @@ public class CachedRowSetWriter implements TransactionalWriter, Serializable { ...@@ -338,11 +338,11 @@ public class CachedRowSetWriter implements TransactionalWriter, Serializable {
if (crs.rowDeleted()) { if (crs.rowDeleted()) {
// The row has been deleted. // The row has been deleted.
if (conflict = (deleteOriginalRow(crs, this.crsResolve)) == true) { if (conflict = (deleteOriginalRow(crs, this.crsResolve)) == true) {
status.add(rows, new Integer(SyncResolver.DELETE_ROW_CONFLICT)); status.add(rows, Integer.valueOf(SyncResolver.DELETE_ROW_CONFLICT));
} else { } else {
// delete happened without any occurrence of conflicts // delete happened without any occurrence of conflicts
// so update status accordingly // so update status accordingly
status.add(rows, new Integer(SyncResolver.NO_ROW_CONFLICT)); status.add(rows, Integer.valueOf(SyncResolver.NO_ROW_CONFLICT));
} }
} else if (crs.rowInserted()) { } else if (crs.rowInserted()) {
...@@ -350,20 +350,20 @@ public class CachedRowSetWriter implements TransactionalWriter, Serializable { ...@@ -350,20 +350,20 @@ public class CachedRowSetWriter implements TransactionalWriter, Serializable {
pstmtIns = con.prepareStatement(insertCmd); pstmtIns = con.prepareStatement(insertCmd);
if ( (conflict = insertNewRow(crs, pstmtIns, this.crsResolve)) == true) { if ( (conflict = insertNewRow(crs, pstmtIns, this.crsResolve)) == true) {
status.add(rows, new Integer(SyncResolver.INSERT_ROW_CONFLICT)); status.add(rows, Integer.valueOf(SyncResolver.INSERT_ROW_CONFLICT));
} else { } else {
// insert happened without any occurrence of conflicts // insert happened without any occurrence of conflicts
// so update status accordingly // so update status accordingly
status.add(rows, new Integer(SyncResolver.NO_ROW_CONFLICT)); status.add(rows, Integer.valueOf(SyncResolver.NO_ROW_CONFLICT));
} }
} else if (crs.rowUpdated()) { } else if (crs.rowUpdated()) {
// The row has been updated. // The row has been updated.
if ( conflict = (updateOriginalRow(crs)) == true) { if ( conflict = (updateOriginalRow(crs)) == true) {
status.add(rows, new Integer(SyncResolver.UPDATE_ROW_CONFLICT)); status.add(rows, Integer.valueOf(SyncResolver.UPDATE_ROW_CONFLICT));
} else { } else {
// update happened without any occurrence of conflicts // update happened without any occurrence of conflicts
// so update status accordingly // so update status accordingly
status.add(rows, new Integer(SyncResolver.NO_ROW_CONFLICT)); status.add(rows, Integer.valueOf(SyncResolver.NO_ROW_CONFLICT));
} }
} else { } else {
...@@ -375,7 +375,7 @@ public class CachedRowSetWriter implements TransactionalWriter, Serializable { ...@@ -375,7 +375,7 @@ public class CachedRowSetWriter implements TransactionalWriter, Serializable {
* that is fine. * that is fine.
**/ **/
int icolCount = crs.getMetaData().getColumnCount(); int icolCount = crs.getMetaData().getColumnCount();
status.add(rows, new Integer(SyncResolver.NO_ROW_CONFLICT)); status.add(rows, Integer.valueOf(SyncResolver.NO_ROW_CONFLICT));
this.crsResolve.moveToInsertRow(); this.crsResolve.moveToInsertRow();
for(int cols=0;cols<iColCount;cols++) { for(int cols=0;cols<iColCount;cols++) {
...@@ -398,7 +398,7 @@ public class CachedRowSetWriter implements TransactionalWriter, Serializable { ...@@ -398,7 +398,7 @@ public class CachedRowSetWriter implements TransactionalWriter, Serializable {
boolean boolConf = false; boolean boolConf = false;
for (int j=1;j<status.size();j++){ for (int j=1;j<status.size();j++){
// ignore status for index = 0 which is set to null // ignore status for index = 0 which is set to null
if(! ((status.get(j)).equals(new Integer(SyncResolver.NO_ROW_CONFLICT)))) { if(! ((status.get(j)).equals(Integer.valueOf(SyncResolver.NO_ROW_CONFLICT)))) {
// there is at least one conflict which needs to be resolved // there is at least one conflict which needs to be resolved
boolConf = true; boolConf = true;
break; break;
...@@ -652,7 +652,7 @@ public class CachedRowSetWriter implements TransactionalWriter, Serializable { ...@@ -652,7 +652,7 @@ public class CachedRowSetWriter implements TransactionalWriter, Serializable {
updateExec += ", "; updateExec += ", ";
} }
updateExec += crs.getMetaData().getColumnName(i); updateExec += crs.getMetaData().getColumnName(i);
cols.add(new Integer(i)); cols.add(Integer.valueOf(i));
updateExec += " = ? "; updateExec += " = ? ";
first = false; first = false;
...@@ -698,7 +698,7 @@ public class CachedRowSetWriter implements TransactionalWriter, Serializable { ...@@ -698,7 +698,7 @@ public class CachedRowSetWriter implements TransactionalWriter, Serializable {
updateExec += ", "; updateExec += ", ";
} }
updateExec += crs.getMetaData().getColumnName(i); updateExec += crs.getMetaData().getColumnName(i);
cols.add(new Integer(i)); cols.add(Integer.valueOf(i));
updateExec += " = ? "; updateExec += " = ? ";
flag = false; flag = false;
} else { } else {
......
...@@ -387,7 +387,7 @@ public class WebRowSetXmlWriter implements XmlWriter, Serializable { ...@@ -387,7 +387,7 @@ public class WebRowSetXmlWriter implements XmlWriter, Serializable {
if (caller.wasNull()) if (caller.wasNull())
writeNull(); writeNull();
else else
writeInteger(caller.getInt(idx)); writeInteger(i);
break; break;
case java.sql.Types.BIGINT: case java.sql.Types.BIGINT:
long l = caller.getLong(idx); long l = caller.getLong(idx);
...@@ -574,7 +574,7 @@ public class WebRowSetXmlWriter implements XmlWriter, Serializable { ...@@ -574,7 +574,7 @@ public class WebRowSetXmlWriter implements XmlWriter, Serializable {
} }
private void writeBoolean(boolean b) throws java.io.IOException { private void writeBoolean(boolean b) throws java.io.IOException {
writer.write(new Boolean(b).toString()); writer.write(Boolean.valueOf(b).toString());
} }
private void writeFloat(float f) throws java.io.IOException { private void writeFloat(float f) throws java.io.IOException {
......
...@@ -481,21 +481,21 @@ public class XmlReaderContentHandler extends DefaultHandler { ...@@ -481,21 +481,21 @@ public class XmlReaderContentHandler extends DefaultHandler {
items = properties.length; items = properties.length;
for (i=0;i<items;i++) { for (i=0;i<items;i++) {
propMap.put(properties[i], new Integer(i)); propMap.put(properties[i], Integer.valueOf(i));
} }
colDefMap = new HashMap(); colDefMap = new HashMap();
items = colDef.length; items = colDef.length;
for (i=0;i<items;i++) { for (i=0;i<items;i++) {
colDefMap.put(colDef[i], new Integer(i)); colDefMap.put(colDef[i], Integer.valueOf(i));
} }
dataMap = new HashMap(); dataMap = new HashMap();
items = data.length; items = data.length;
for (i=0;i<items;i++) { for (i=0;i<items;i++) {
dataMap.put(data[i], new Integer(i)); dataMap.put(data[i], Integer.valueOf(i));
} }
//Initialize connection map here //Initialize connection map here
...@@ -981,7 +981,7 @@ public class XmlReaderContentHandler extends DefaultHandler { ...@@ -981,7 +981,7 @@ public class XmlReaderContentHandler extends DefaultHandler {
private boolean getBooleanValue(String s) { private boolean getBooleanValue(String s) {
return new Boolean(s).booleanValue(); return Boolean.valueOf(s).booleanValue();
} }
private java.math.BigDecimal getBigDecimalValue(String s) { private java.math.BigDecimal getBigDecimalValue(String s) {
...@@ -1316,7 +1316,7 @@ public class XmlReaderContentHandler extends DefaultHandler { ...@@ -1316,7 +1316,7 @@ public class XmlReaderContentHandler extends DefaultHandler {
**/ **/
tempUpdate = tempUpdate.concat(new String(ch,start,len)); tempUpdate = tempUpdate.concat(new String(ch,start,len));
upd[0] = new Integer(idx); upd[0] = Integer.valueOf(idx);
upd[1] = tempUpdate; upd[1] = tempUpdate;
//updates.add(upd); //updates.add(upd);
......
...@@ -1563,13 +1563,13 @@ public static final int ASCII_STREAM_PARAM = 2; ...@@ -1563,13 +1563,13 @@ public static final int ASCII_STREAM_PARAM = 2;
nullVal = new Object[2]; nullVal = new Object[2];
nullVal[0] = null; nullVal[0] = null;
nullVal[1] = new Integer(sqlType); nullVal[1] = Integer.valueOf(sqlType);
if (params == null){ if (params == null){
throw new SQLException("Set initParams() before setNull"); throw new SQLException("Set initParams() before setNull");
} }
params.put(new Integer(parameterIndex - 1), nullVal); params.put(Integer.valueOf(parameterIndex - 1), nullVal);
} }
/** /**
...@@ -1644,14 +1644,14 @@ public static final int ASCII_STREAM_PARAM = 2; ...@@ -1644,14 +1644,14 @@ public static final int ASCII_STREAM_PARAM = 2;
nullVal = new Object[3]; nullVal = new Object[3];
nullVal[0] = null; nullVal[0] = null;
nullVal[1] = new Integer(sqlType); nullVal[1] = Integer.valueOf(sqlType);
nullVal[2] = typeName; nullVal[2] = typeName;
if(params == null){ if(params == null){
throw new SQLException("Set initParams() before setNull"); throw new SQLException("Set initParams() before setNull");
} }
params.put(new Integer(parameterIndex - 1), nullVal); params.put(Integer.valueOf(parameterIndex - 1), nullVal);
} }
...@@ -1686,7 +1686,7 @@ public static final int ASCII_STREAM_PARAM = 2; ...@@ -1686,7 +1686,7 @@ public static final int ASCII_STREAM_PARAM = 2;
throw new SQLException("Set initParams() before setNull"); throw new SQLException("Set initParams() before setNull");
} }
params.put(new Integer(parameterIndex - 1), new Boolean(x)); params.put(Integer.valueOf(parameterIndex - 1), Boolean.valueOf(x));
} }
/** /**
...@@ -1720,7 +1720,7 @@ public static final int ASCII_STREAM_PARAM = 2; ...@@ -1720,7 +1720,7 @@ public static final int ASCII_STREAM_PARAM = 2;
throw new SQLException("Set initParams() before setByte"); throw new SQLException("Set initParams() before setByte");
} }
params.put(new Integer(parameterIndex - 1), new Byte(x)); params.put(Integer.valueOf(parameterIndex - 1), Byte.valueOf(x));
} }
/** /**
...@@ -1754,7 +1754,7 @@ public static final int ASCII_STREAM_PARAM = 2; ...@@ -1754,7 +1754,7 @@ public static final int ASCII_STREAM_PARAM = 2;
throw new SQLException("Set initParams() before setShort"); throw new SQLException("Set initParams() before setShort");
} }
params.put(new Integer(parameterIndex - 1), new Short(x)); params.put(Integer.valueOf(parameterIndex - 1), Short.valueOf(x));
} }
/** /**
...@@ -1786,7 +1786,7 @@ public static final int ASCII_STREAM_PARAM = 2; ...@@ -1786,7 +1786,7 @@ public static final int ASCII_STREAM_PARAM = 2;
if(params == null){ if(params == null){
throw new SQLException("Set initParams() before setInt"); throw new SQLException("Set initParams() before setInt");
} }
params.put(new Integer(parameterIndex - 1), new Integer(x)); params.put(Integer.valueOf(parameterIndex - 1), Integer.valueOf(x));
} }
/** /**
...@@ -1818,7 +1818,7 @@ public static final int ASCII_STREAM_PARAM = 2; ...@@ -1818,7 +1818,7 @@ public static final int ASCII_STREAM_PARAM = 2;
if(params == null){ if(params == null){
throw new SQLException("Set initParams() before setLong"); throw new SQLException("Set initParams() before setLong");
} }
params.put(new Integer(parameterIndex - 1), new Long(x)); params.put(Integer.valueOf(parameterIndex - 1), Long.valueOf(x));
} }
/** /**
...@@ -1850,7 +1850,7 @@ public static final int ASCII_STREAM_PARAM = 2; ...@@ -1850,7 +1850,7 @@ public static final int ASCII_STREAM_PARAM = 2;
if(params == null){ if(params == null){
throw new SQLException("Set initParams() before setFloat"); throw new SQLException("Set initParams() before setFloat");
} }
params.put(new Integer(parameterIndex - 1), new Float(x)); params.put(Integer.valueOf(parameterIndex - 1), new Float(x));
} }
/** /**
...@@ -1882,7 +1882,7 @@ public static final int ASCII_STREAM_PARAM = 2; ...@@ -1882,7 +1882,7 @@ public static final int ASCII_STREAM_PARAM = 2;
if(params == null){ if(params == null){
throw new SQLException("Set initParams() before setDouble"); throw new SQLException("Set initParams() before setDouble");
} }
params.put(new Integer(parameterIndex - 1), new Double(x)); params.put(Integer.valueOf(parameterIndex - 1), new Double(x));
} }
/** /**
...@@ -1914,7 +1914,7 @@ public static final int ASCII_STREAM_PARAM = 2; ...@@ -1914,7 +1914,7 @@ public static final int ASCII_STREAM_PARAM = 2;
if(params == null){ if(params == null){
throw new SQLException("Set initParams() before setBigDecimal"); throw new SQLException("Set initParams() before setBigDecimal");
} }
params.put(new Integer(parameterIndex - 1), x); params.put(Integer.valueOf(parameterIndex - 1), x);
} }
/** /**
...@@ -1948,7 +1948,7 @@ public static final int ASCII_STREAM_PARAM = 2; ...@@ -1948,7 +1948,7 @@ public static final int ASCII_STREAM_PARAM = 2;
if(params == null){ if(params == null){
throw new SQLException("Set initParams() before setString"); throw new SQLException("Set initParams() before setString");
} }
params.put(new Integer(parameterIndex - 1), x); params.put(Integer.valueOf(parameterIndex - 1), x);
} }
/** /**
...@@ -1982,7 +1982,7 @@ public static final int ASCII_STREAM_PARAM = 2; ...@@ -1982,7 +1982,7 @@ public static final int ASCII_STREAM_PARAM = 2;
if(params == null){ if(params == null){
throw new SQLException("Set initParams() before setBytes"); throw new SQLException("Set initParams() before setBytes");
} }
params.put(new Integer(parameterIndex - 1), x); params.put(Integer.valueOf(parameterIndex - 1), x);
} }
/** /**
...@@ -2024,7 +2024,7 @@ public static final int ASCII_STREAM_PARAM = 2; ...@@ -2024,7 +2024,7 @@ public static final int ASCII_STREAM_PARAM = 2;
if(params == null){ if(params == null){
throw new SQLException("Set initParams() before setDate"); throw new SQLException("Set initParams() before setDate");
} }
params.put(new Integer(parameterIndex - 1), x); params.put(Integer.valueOf(parameterIndex - 1), x);
} }
/** /**
...@@ -2069,7 +2069,7 @@ public static final int ASCII_STREAM_PARAM = 2; ...@@ -2069,7 +2069,7 @@ public static final int ASCII_STREAM_PARAM = 2;
throw new SQLException("Set initParams() before setTime"); throw new SQLException("Set initParams() before setTime");
} }
params.put(new Integer(parameterIndex - 1), x); params.put(Integer.valueOf(parameterIndex - 1), x);
} }
/** /**
...@@ -2112,7 +2112,7 @@ public static final int ASCII_STREAM_PARAM = 2; ...@@ -2112,7 +2112,7 @@ public static final int ASCII_STREAM_PARAM = 2;
throw new SQLException("Set initParams() before setTimestamp"); throw new SQLException("Set initParams() before setTimestamp");
} }
params.put(new Integer(parameterIndex - 1), x); params.put(Integer.valueOf(parameterIndex - 1), x);
} }
/** /**
...@@ -2185,14 +2185,14 @@ public static final int ASCII_STREAM_PARAM = 2; ...@@ -2185,14 +2185,14 @@ public static final int ASCII_STREAM_PARAM = 2;
asciiStream = new Object[3]; asciiStream = new Object[3];
asciiStream[0] = x; asciiStream[0] = x;
asciiStream[1] = new Integer(length); asciiStream[1] = Integer.valueOf(length);
asciiStream[2] = new Integer(ASCII_STREAM_PARAM); asciiStream[2] = Integer.valueOf(ASCII_STREAM_PARAM);
if(params == null){ if(params == null){
throw new SQLException("Set initParams() before setAsciiStream"); throw new SQLException("Set initParams() before setAsciiStream");
} }
params.put(new Integer(parameterIndex - 1), asciiStream); params.put(Integer.valueOf(parameterIndex - 1), asciiStream);
} }
/** /**
...@@ -2290,13 +2290,13 @@ public static final int ASCII_STREAM_PARAM = 2; ...@@ -2290,13 +2290,13 @@ public static final int ASCII_STREAM_PARAM = 2;
binaryStream = new Object[3]; binaryStream = new Object[3];
binaryStream[0] = x; binaryStream[0] = x;
binaryStream[1] = new Integer(length); binaryStream[1] = Integer.valueOf(length);
binaryStream[2] = new Integer(BINARY_STREAM_PARAM); binaryStream[2] = Integer.valueOf(BINARY_STREAM_PARAM);
if(params == null){ if(params == null){
throw new SQLException("Set initParams() before setBinaryStream"); throw new SQLException("Set initParams() before setBinaryStream");
} }
params.put(new Integer(parameterIndex - 1), binaryStream); params.put(Integer.valueOf(parameterIndex - 1), binaryStream);
} }
...@@ -2396,12 +2396,12 @@ public static final int ASCII_STREAM_PARAM = 2; ...@@ -2396,12 +2396,12 @@ public static final int ASCII_STREAM_PARAM = 2;
unicodeStream = new Object[3]; unicodeStream = new Object[3];
unicodeStream[0] = x; unicodeStream[0] = x;
unicodeStream[1] = new Integer(length); unicodeStream[1] = Integer.valueOf(length);
unicodeStream[2] = new Integer(UNICODE_STREAM_PARAM); unicodeStream[2] = Integer.valueOf(UNICODE_STREAM_PARAM);
if(params == null){ if(params == null){
throw new SQLException("Set initParams() before setUnicodeStream"); throw new SQLException("Set initParams() before setUnicodeStream");
} }
params.put(new Integer(parameterIndex - 1), unicodeStream); params.put(Integer.valueOf(parameterIndex - 1), unicodeStream);
} }
/** /**
...@@ -2475,11 +2475,11 @@ public static final int ASCII_STREAM_PARAM = 2; ...@@ -2475,11 +2475,11 @@ public static final int ASCII_STREAM_PARAM = 2;
charStream = new Object[2]; charStream = new Object[2];
charStream[0] = reader; charStream[0] = reader;
charStream[1] = new Integer(length); charStream[1] = Integer.valueOf(length);
if(params == null){ if(params == null){
throw new SQLException("Set initParams() before setCharacterStream"); throw new SQLException("Set initParams() before setCharacterStream");
} }
params.put(new Integer(parameterIndex - 1), charStream); params.put(Integer.valueOf(parameterIndex - 1), charStream);
} }
/** /**
...@@ -2591,12 +2591,12 @@ public static final int ASCII_STREAM_PARAM = 2; ...@@ -2591,12 +2591,12 @@ public static final int ASCII_STREAM_PARAM = 2;
obj = new Object[3]; obj = new Object[3];
obj[0] = x; obj[0] = x;
obj[1] = new Integer(targetSqlType); obj[1] = Integer.valueOf(targetSqlType);
obj[2] = new Integer(scale); obj[2] = Integer.valueOf(scale);
if(params == null){ if(params == null){
throw new SQLException("Set initParams() before setObject"); throw new SQLException("Set initParams() before setObject");
} }
params.put(new Integer(parameterIndex - 1), obj); params.put(Integer.valueOf(parameterIndex - 1), obj);
} }
/** /**
...@@ -2654,11 +2654,11 @@ public static final int ASCII_STREAM_PARAM = 2; ...@@ -2654,11 +2654,11 @@ public static final int ASCII_STREAM_PARAM = 2;
obj = new Object[2]; obj = new Object[2];
obj[0] = x; obj[0] = x;
obj[1] = new Integer(targetSqlType); obj[1] = Integer.valueOf(targetSqlType);
if (params == null){ if (params == null){
throw new SQLException("Set initParams() before setObject"); throw new SQLException("Set initParams() before setObject");
} }
params.put(new Integer(parameterIndex - 1), obj); params.put(Integer.valueOf(parameterIndex - 1), obj);
} }
/** /**
...@@ -2726,7 +2726,7 @@ public static final int ASCII_STREAM_PARAM = 2; ...@@ -2726,7 +2726,7 @@ public static final int ASCII_STREAM_PARAM = 2;
if (params == null) { if (params == null) {
throw new SQLException("Set initParams() before setObject"); throw new SQLException("Set initParams() before setObject");
} }
params.put(new Integer(parameterIndex - 1), x); params.put(Integer.valueOf(parameterIndex - 1), x);
} }
/** /**
...@@ -2773,7 +2773,7 @@ public static final int ASCII_STREAM_PARAM = 2; ...@@ -2773,7 +2773,7 @@ public static final int ASCII_STREAM_PARAM = 2;
if (params == null) { if (params == null) {
throw new SQLException("Set initParams() before setRef"); throw new SQLException("Set initParams() before setRef");
} }
params.put(new Integer(parameterIndex - 1), new SerialRef(ref)); params.put(Integer.valueOf(parameterIndex - 1), new SerialRef(ref));
} }
/** /**
...@@ -2817,7 +2817,7 @@ public static final int ASCII_STREAM_PARAM = 2; ...@@ -2817,7 +2817,7 @@ public static final int ASCII_STREAM_PARAM = 2;
if(params == null){ if(params == null){
throw new SQLException("Set initParams() before setBlob"); throw new SQLException("Set initParams() before setBlob");
} }
params.put(new Integer(parameterIndex - 1), new SerialBlob(x)); params.put(Integer.valueOf(parameterIndex - 1), new SerialBlob(x));
} }
/** /**
...@@ -2862,7 +2862,7 @@ public static final int ASCII_STREAM_PARAM = 2; ...@@ -2862,7 +2862,7 @@ public static final int ASCII_STREAM_PARAM = 2;
if(params == null){ if(params == null){
throw new SQLException("Set initParams() before setClob"); throw new SQLException("Set initParams() before setClob");
} }
params.put(new Integer(parameterIndex - 1), new SerialClob(x)); params.put(Integer.valueOf(parameterIndex - 1), new SerialClob(x));
} }
/** /**
...@@ -2910,7 +2910,7 @@ public static final int ASCII_STREAM_PARAM = 2; ...@@ -2910,7 +2910,7 @@ public static final int ASCII_STREAM_PARAM = 2;
if (params == null){ if (params == null){
throw new SQLException("Set initParams() before setArray"); throw new SQLException("Set initParams() before setArray");
} }
params.put(new Integer(parameterIndex - 1), new SerialArray(array)); params.put(Integer.valueOf(parameterIndex - 1), new SerialArray(array));
} }
/** /**
...@@ -2975,7 +2975,7 @@ public static final int ASCII_STREAM_PARAM = 2; ...@@ -2975,7 +2975,7 @@ public static final int ASCII_STREAM_PARAM = 2;
if(params == null){ if(params == null){
throw new SQLException("Set initParams() before setDate"); throw new SQLException("Set initParams() before setDate");
} }
params.put(new Integer(parameterIndex - 1), date); params.put(Integer.valueOf(parameterIndex - 1), date);
} }
/** /**
...@@ -3041,7 +3041,7 @@ public static final int ASCII_STREAM_PARAM = 2; ...@@ -3041,7 +3041,7 @@ public static final int ASCII_STREAM_PARAM = 2;
if(params == null){ if(params == null){
throw new SQLException("Set initParams() before setTime"); throw new SQLException("Set initParams() before setTime");
} }
params.put(new Integer(parameterIndex - 1), time); params.put(Integer.valueOf(parameterIndex - 1), time);
} }
/** /**
...@@ -3107,7 +3107,7 @@ public static final int ASCII_STREAM_PARAM = 2; ...@@ -3107,7 +3107,7 @@ public static final int ASCII_STREAM_PARAM = 2;
if(params == null){ if(params == null){
throw new SQLException("Set initParams() before setTimestamp"); throw new SQLException("Set initParams() before setTimestamp");
} }
params.put(new Integer(parameterIndex - 1), timestamp); params.put(Integer.valueOf(parameterIndex - 1), timestamp);
} }
/** /**
...@@ -3181,7 +3181,7 @@ public static final int ASCII_STREAM_PARAM = 2; ...@@ -3181,7 +3181,7 @@ public static final int ASCII_STREAM_PARAM = 2;
Object[] paramsArray = new Object[params.size()]; Object[] paramsArray = new Object[params.size()];
for (int i = 0; i < params.size(); i++) { for (int i = 0; i < params.size(); i++) {
paramsArray[i] = params.get(new Integer(i)); paramsArray[i] = params.get(Integer.valueOf(i));
if (paramsArray[i] == null) { if (paramsArray[i] == null) {
throw new SQLException("missing parameter: " + (i + 1)); throw new SQLException("missing parameter: " + (i + 1));
} //end if } //end if
......
/* /*
* Copyright (c) 2003, 2006, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -137,7 +137,7 @@ public class SQLOutputImpl implements SQLOutput { ...@@ -137,7 +137,7 @@ public class SQLOutputImpl implements SQLOutput {
* values of a UDT to the database. * values of a UDT to the database.
*/ */
public void writeBoolean(boolean x) throws SQLException { public void writeBoolean(boolean x) throws SQLException {
attribs.add(new Boolean(x)); attribs.add(Boolean.valueOf(x));
} }
/** /**
...@@ -151,7 +151,7 @@ public class SQLOutputImpl implements SQLOutput { ...@@ -151,7 +151,7 @@ public class SQLOutputImpl implements SQLOutput {
* values of a UDT to the database. * values of a UDT to the database.
*/ */
public void writeByte(byte x) throws SQLException { public void writeByte(byte x) throws SQLException {
attribs.add(new Byte(x)); attribs.add(Byte.valueOf(x));
} }
/** /**
...@@ -165,7 +165,7 @@ public class SQLOutputImpl implements SQLOutput { ...@@ -165,7 +165,7 @@ public class SQLOutputImpl implements SQLOutput {
* values of a UDT to the database. * values of a UDT to the database.
*/ */
public void writeShort(short x) throws SQLException { public void writeShort(short x) throws SQLException {
attribs.add(new Short(x)); attribs.add(Short.valueOf(x));
} }
/** /**
...@@ -179,7 +179,7 @@ public class SQLOutputImpl implements SQLOutput { ...@@ -179,7 +179,7 @@ public class SQLOutputImpl implements SQLOutput {
* values of a UDT to the database. * values of a UDT to the database.
*/ */
public void writeInt(int x) throws SQLException { public void writeInt(int x) throws SQLException {
attribs.add(new Integer(x)); attribs.add(Integer.valueOf(x));
} }
/** /**
...@@ -193,7 +193,7 @@ public class SQLOutputImpl implements SQLOutput { ...@@ -193,7 +193,7 @@ public class SQLOutputImpl implements SQLOutput {
* values of a UDT to the database. * values of a UDT to the database.
*/ */
public void writeLong(long x) throws SQLException { public void writeLong(long x) throws SQLException {
attribs.add(new Long(x)); attribs.add(Long.valueOf(x));
} }
/** /**
......
...@@ -110,7 +110,7 @@ public class SerialRef implements Ref, Serializable, Cloneable { ...@@ -110,7 +110,7 @@ public class SerialRef implements Ref, Serializable, Cloneable {
throws SerialException throws SerialException
{ {
map = new Hashtable(map); map = new Hashtable(map);
if (!object.equals(null)) { if (object != null) {
return map.get(object); return map.get(object);
} else { } else {
throw new SerialException("The object is not set"); throw new SerialException("The object is not set");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册