I’m currently working on org.jivesoftware.openfire.user.DefaultUserProvider.getUsers(int startIndex, int numResults) and it contains this code:
DbConnectionManager.setFetchSize(rs, startIndex + numResults);
As the calling method is interested in
numResults´´ results I really wonder why the fetch size is set tostartIndex + numResults´´. There are quite a few places in this class and I’d like to change them all to
Anyone who’d like to keep the current code?
Actually I did replace ``Statement´´ with "PreparedStatement´´ but it turns out that this class can be further optimized.