private void loadDatabaseContainsPrivacyLists() {
        Connection con = null;
        PreparedStatement pstmt = null;
        ResultSet rs = null;
        try {
            con = DbConnectionManager.getConnection();
            pstmt = con.prepareStatement(PRIVACY_LIST_COUNT);
            rs = pstmt.executeQuery();
            rs.next();
            databaseContainsPrivacyLists.set(rs.getInt(1) != 0);
        }
        catch (Exception e) {
            Log.error(e.getMessage(), e);
        }
        finally {
            DbConnectionManager.closeConnection(rs, pstmt, con);
        }
    }
Loads the total number of privacy lists stored in the database to know if we must use them.
xmppserver/src/main/java/org/jivesoftware/openfire/privacy/PrivacyListProvider.java