Commit 00c7fd43 authored by Armando Jagucki's avatar Armando Jagucki Committed by ajagucki

Increased readability in IQPEPHandler.handleIQ().

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@9244 b35dd754-fafc-0310-a699-88a17e54d16e
parent b3a70feb
......@@ -239,7 +239,8 @@ public class IQPEPHandler extends IQHandler implements ServerIdentitiesProvider,
@Override
public IQ handleIQ(IQ packet) throws UnauthorizedException {
JID senderJID = packet.getFrom();
if (packet.getTo() == null && packet.getType() == IQ.Type.set) {
if (packet.getTo() == null) {
if (packet.getType() == IQ.Type.set) {
String jidFrom = senderJID.toBareJID();
PEPService pepService = getPEPService(jidFrom);
......@@ -306,7 +307,7 @@ public class IQPEPHandler extends IQHandler implements ServerIdentitiesProvider,
// Process with PubSub as usual.
pubSubEngine.process(pepService, packet);
}
}
else if (packet.getType() == IQ.Type.get || packet.getType() == IQ.Type.set) {
String jidTo = packet.getTo().toBareJID();
......@@ -319,8 +320,8 @@ public class IQPEPHandler extends IQHandler implements ServerIdentitiesProvider,
else {
// Process with PubSub using a dummyService. In the case where an IQ packet is sent to
// a user who does not have a PEP service, we wish to utilize the error reporting flow
// already present in the PubSubEngine. Hence, the sole purpose of the dummyService is
// to forward this ill formed IQ packet to the PubSubEngine and trigger the correct error.
// already present in the PubSubEngine. This gives the illusion that every user has a
// PEP service, as required by the specification.
PEPService dummyService = new PEPService(XMPPServer.getInstance(), senderJID.toBareJID());
pubSubEngine.process(dummyService, packet);
}
......@@ -331,7 +332,7 @@ public class IQPEPHandler extends IQHandler implements ServerIdentitiesProvider,
return null;
}
// Other error flows are handled in pubSubEngine.process(...)
// Other error flows were handled in pubSubEngine.process(...)
return null;
}
......
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