Code: Select all
@Override
public BuddyList loadList(String ownerName) throws SFSBuddyListNotFoundException, IOException {
CheckInited();
BuddyList buddyList;
// mysql query...
ResultSet res = stmt.executeQuery();
while (res != null && res.next()) {
String buddyName = res.getString("nick");
System.out.print("- " + res.getString("nick"));
Buddy buddy = new SFSBuddy(buddyName);
uddy.setParentBuddyList(buddyList);
buddy.setBlocked(false);
buddy.setIsTemp(false);
buddyList.addBuddy(buddy);
_current++;
}
} catch (SQLException e) {
throw new SFSBuddyListNotFoundException(
"!!! ERROR !!! BuddyStorage - loadList: " + ownerName + " - " + e);
} catch (SFSBuddyListException e) {
throw new SFSBuddyListNotFoundException(
"!!! ERRO !!! BuddyStorage - loadList: " + ownerName + " - " + e);
} finally {
try {
if (stmt != null)
stmt.close();
if (connection != null)
connection.close();
} catch (Exception e) {
throw new SFSBuddyListNotFoundException(!!! ERRO !!! GrowBuddyStorage - loadList: " + ownerName + " - " + e);
}
}
return buddyList;
Everything happens well when the list is less than 30 (approximately), but when that list has a larger number, nothing happens, the BuddyList is empty (note: even so, nicknames continue to be debugged in "System.out.print("- " + res.getString("nick"));" and no exception is captured in the "trys" ).
(The calls happen just right, all the nicknames are apparently ok)
Could it be some time limit in the execution of the function? If so, where do I change this time limit?