POResultSet:

BF [ 1874419 ] JDBC Statement not close in a finally block -more protection added (just in case)
This commit is contained in:
teo_sarca 2008-08-21 08:49:14 +00:00
parent 03a72d738c
commit c1fa0d16c2
1 changed files with 2 additions and 1 deletions

View File

@ -41,7 +41,7 @@ public class POResultSet<T extends PO> {
/** Current fetched PO */
private T currentPO = null;
/** Should we close the statement and resultSet on any exception that occur ? */
private boolean closeOnError = false;
private boolean closeOnError = true;
/**
* Constructs the POResultSet.
@ -86,6 +86,7 @@ public class POResultSet<T extends PO> {
if ( resultSet.next() ) {
return (T) table.getPO(resultSet, trxName);
} else {
this.close(); // close it if there is no more data to read
return null;
}
}