Commit 374e3bf6 authored by God Ly's avatar God Ly Committed by it2000

NullPointerException fixed

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@11689 b35dd754-fafc-0310-a699-88a17e54d16e
parent 9a3f8d54
...@@ -124,6 +124,7 @@ public class DefaultSecurityAuditProvider implements SecurityAuditProvider { ...@@ -124,6 +124,7 @@ public class DefaultSecurityAuditProvider implements SecurityAuditProvider {
try { try {
con = DbConnectionManager.getConnection(); con = DbConnectionManager.getConnection();
pstmt = DbConnectionManager.createScrollablePreparedStatement(con, sql); pstmt = DbConnectionManager.createScrollablePreparedStatement(con, sql);
rs = pstmt.executeQuery();
if (skipEvents != null) { if (skipEvents != null) {
DbConnectionManager.scrollResultSet(rs, skipEvents); DbConnectionManager.scrollResultSet(rs, skipEvents);
} }
...@@ -142,7 +143,6 @@ public class DefaultSecurityAuditProvider implements SecurityAuditProvider { ...@@ -142,7 +143,6 @@ public class DefaultSecurityAuditProvider implements SecurityAuditProvider {
if (endTime != null) { if (endTime != null) {
pstmt.setLong(i, endTime.getTime()); pstmt.setLong(i, endTime.getTime());
} }
rs = pstmt.executeQuery();
int count = 0; int count = 0;
while (rs.next() && count < numEvents) { while (rs.next() && count < numEvents) {
SecurityAuditEvent event = new SecurityAuditEvent(); SecurityAuditEvent event = new SecurityAuditEvent();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment