Commit 15d936cf authored by Tom Evans's avatar Tom Evans Committed by tevans

OF-596: Lazy-load lastPublished item when needed

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@13518 b35dd754-fafc-0310-a699-88a17e54d16e
parent 05aafba6
......@@ -30,8 +30,6 @@ import java.util.concurrent.atomic.AtomicLong;
import org.dom4j.Element;
import org.jivesoftware.util.LocaleUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.xmpp.forms.DataForm;
import org.xmpp.forms.FormField;
import org.xmpp.packet.IQ;
......@@ -46,7 +44,6 @@ import org.xmpp.packet.Message;
*/
public class LeafNode extends Node {
private static final Logger Log = LoggerFactory.getLogger(LeafNode.class);
private static final String genIdSeed = UUID.randomUUID().toString();
private static final AtomicLong sequenceCounter = new AtomicLong();
......@@ -362,6 +359,9 @@ public class LeafNode extends Node {
@Override
public synchronized PublishedItem getLastPublishedItem() {
if (lastPublished == null){
lastPublished = PubSubPersistenceManager.getLastPublishedItem(this);
}
return lastPublished;
}
......
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