Commit 10b22fbe authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

Fixed NPE that prevents listeners from being triggered. JM-1411. Reviewer=David

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@10597 b35dd754-fafc-0310-a699-88a17e54d16e
parent e54909a1
...@@ -26,8 +26,8 @@ import org.jivesoftware.openfire.net.MXParser; ...@@ -26,8 +26,8 @@ import org.jivesoftware.openfire.net.MXParser;
import org.jivesoftware.openfire.net.SASLAuthentication; import org.jivesoftware.openfire.net.SASLAuthentication;
import org.jivesoftware.openfire.net.VirtualConnection; import org.jivesoftware.openfire.net.VirtualConnection;
import org.jivesoftware.openfire.session.LocalClientSession; import org.jivesoftware.openfire.session.LocalClientSession;
import org.jivesoftware.util.Log;
import org.jivesoftware.util.JiveGlobals; import org.jivesoftware.util.JiveGlobals;
import org.jivesoftware.util.Log;
import org.xmlpull.v1.XmlPullParserException; import org.xmlpull.v1.XmlPullParserException;
import org.xmlpull.v1.XmlPullParserFactory; import org.xmlpull.v1.XmlPullParserFactory;
import org.xmpp.packet.IQ; import org.xmpp.packet.IQ;
...@@ -829,6 +829,11 @@ public class HttpSession extends LocalClientSession { ...@@ -829,6 +829,11 @@ public class HttpSession extends LocalClientSession {
} }
public Collection<Packet> getPackets() { public Collection<Packet> getPackets() {
// Check if the Deliverable is about Packets or raw XML
if (packets == null) {
// No packets here (should be just raw XML like <stream> so return nothing
return null;
}
List<Packet> answer = new ArrayList<Packet>(); List<Packet> answer = new ArrayList<Packet>();
for (String packetXML : packets) { for (String packetXML : packets) {
try { try {
......
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