hi,
the following code is i guess not intended. in the
public $beanClass[] loadByWhere(String where, int[] fieldList, int startRow, int numRows) throws SQLException
after the catch block
finally
{
if (v != null)
{
//should it not be handled differently.. why are you clearing it?
v.clear();
}
getManager().close(pStatement, rs);
freeConnection(c);
}
even though the return was called in the try block, the finally clause is first executed before return call is executed. thus even when there is no exception the list is being cleared before returning it.
check this article for a clearer explanation of this. http://www.javaworld.com/javaworld/jw-02-1997/jw-02-hood.html
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
hi,
the following code is i guess not intended. in the
public $beanClass[] loadByWhere(String where, int[] fieldList, int startRow, int numRows) throws SQLException
after the catch block
finally
{
if (v != null)
{
//should it not be handled differently.. why are you clearing it?
v.clear();
}
getManager().close(pStatement, rs);
freeConnection(c);
}
even though the return was called in the try block, the finally clause is first executed before return call is executed. thus even when there is no exception the list is being cleared before returning it.
check this article for a clearer explanation of this.
http://www.javaworld.com/javaworld/jw-02-1997/jw-02-hood.html