1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-09-09 17:19:39 +02:00

Add checkstyle check for space(s) after tab(s)

This commit is contained in:
Florian Schmaus 2015-03-18 21:51:25 +01:00
parent 8878cf3773
commit 5188c6f934
11 changed files with 52 additions and 29 deletions

View file

@ -187,8 +187,10 @@ public abstract class FileTransfer {
protected void setStatus(Status status) {
synchronized (statusMonitor) {
// CHECKSTYLE:OFF
this.status = status;
}
// CHECKSTYLE:ON
}
protected boolean updateStatus(Status oldStatus, Status newStatus) {

View file

@ -87,7 +87,9 @@ public abstract class StreamNegotiator {
}
protected final IQ initiateIncomingStream(final XMPPConnection connection, StreamInitiation initiation)
// CHECKSTYLE:OFF
throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
// CHECKSTYLE:ON
final StreamInitiation response = createInitiationAccept(initiation,
getNamespaces());

View file

@ -304,7 +304,9 @@ abstract public class Node
*/
public Subscription subscribe(String jid) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException
{
// CHECKSTYLE:OFF
PubSub pubSub = createPubsubPacket(Type.set, new SubscribeExtension(jid, getId()));
// CHECKSTYLE:ON
PubSub reply = sendPubsubPacket(pubSub);
return reply.getExtension(PubSubElementType.SUBSCRIPTION);
}
@ -330,7 +332,9 @@ abstract public class Node
*/
public Subscription subscribe(String jid, SubscribeForm subForm) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException
{
// CHECKSTYLE:OFF
PubSub request = createPubsubPacket(Type.set, new SubscribeExtension(jid, getId()));
// CHECKSTYLE:ON
request.addExtension(new FormNode(FormNodeType.OPTIONS, subForm));
PubSub reply = PubSubManager.sendPubsubPacket(con, request);
return reply.getExtension(PubSubElementType.SUBSCRIPTION);
@ -545,7 +549,9 @@ abstract public class Node
@SuppressWarnings({ "rawtypes", "unchecked" })
public void processPacket(Stanza packet)
{
// CHECKSTYLE:OFF
EventElement event = (EventElement)packet.getExtension("event", PubSubNamespace.EVENT.getXmlns());
// CHECKSTYLE:ON
ItemsExtension itemsElem = (ItemsExtension)event.getEvent();
ItemPublishEvent eventItems = new ItemPublishEvent(itemsElem.getNode(), (List<Item>)itemsElem.getItems(), getSubscriptionIds(packet), DelayInformationManager.getDelayTimestamp(packet));
listener.handlePublishedItems(eventItems);
@ -569,6 +575,7 @@ abstract public class Node
public void processPacket(Stanza packet)
{
// CHECKSTYLE:OFF
EventElement event = (EventElement)packet.getExtension("event", PubSubNamespace.EVENT.getXmlns());
List<ExtensionElement> extList = event.getExtensions();
@ -592,6 +599,7 @@ abstract public class Node
ItemDeleteEvent eventItems = new ItemDeleteEvent(itemsElem.getNode(), items, getSubscriptionIds(packet));
listener.handleDeletedItems(eventItems);
}
// CHECKSTYLE:ON
}
}
@ -612,8 +620,10 @@ abstract public class Node
public void processPacket(Stanza packet)
{
// CHECKSTYLE:OFF
EventElement event = (EventElement)packet.getExtension("event", PubSubNamespace.EVENT.getXmlns());
ConfigurationEvent config = (ConfigurationEvent)event.getEvent();
ConfigurationEvent config = (ConfigurationEvent)event.getEvent();
// CHECKSTYLE:ON
listener.handleNodeConfiguration(config);
}

View file

@ -321,10 +321,12 @@ final public class PubSubManager
static PubSub sendPubsubPacket(XMPPConnection con, Jid to, Type type, List<ExtensionElement> extList, PubSubNamespace ns) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException
{
// CHECKSTYLE:OFF
PubSub pubSub = new PubSub(to, type, ns);
for (ExtensionElement pe : extList) {
pubSub.addExtension(pe);
}
// CHECKSTYLE:ON
return sendPubsubPacket(con ,pubSub);
}

View file

@ -36,6 +36,8 @@ public class EventProvider extends EmbeddedExtensionProvider<EventElement>
@Override
protected EventElement createReturnExtension(String currentElement, String currentNamespace, Map<String, String> attMap, List<? extends ExtensionElement> content)
{
// CHECKSTYLE:OFF
return new EventElement(EventElementType.valueOf(content.get(0).getElementName()), (NodeExtension)content.get(0));
// CHECKSTYLE:ON
}
}