mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2025-12-05 20:51:07 +01:00
Enable trailing whitespace checkstyle check
for all source code regions, including javadoc.
This commit is contained in:
parent
9d61a6de7d
commit
e8923b9d16
545 changed files with 3713 additions and 3715 deletions
|
|
@ -19,7 +19,7 @@ package org.jivesoftware.smackx.pubsub;
|
|||
import org.jivesoftware.smack.packet.PacketExtension;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author Robin Collier
|
||||
*
|
||||
*/
|
||||
|
|
@ -56,7 +56,7 @@ class CarExtension implements PacketExtension
|
|||
|
||||
public String toXML()
|
||||
{
|
||||
return "<" + getElementName() + " xmlns='" + getNamespace() + "'><paint color='" +
|
||||
return "<" + getElementName() + " xmlns='" + getNamespace() + "'><paint color='" +
|
||||
getColor() + "'/><tires num='" + getNumTires() + "'/></" + getElementName() + ">";
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ import org.jivesoftware.smack.provider.PacketExtensionProvider;
|
|||
import org.xmlpull.v1.XmlPullParser;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author Robin Collier
|
||||
*
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ import org.jivesoftware.smackx.packet.DiscoverInfo.Identity;
|
|||
import org.jivesoftware.smackx.pubsub.test.SingleUserTestCase;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author Robin Collier
|
||||
*
|
||||
*/
|
||||
|
|
@ -76,7 +76,7 @@ public class EntityUseCases extends SingleUserTestCase
|
|||
|
||||
assertTrue(subscriptions.size() < 3);
|
||||
|
||||
for (Subscription subscription : subscriptions)
|
||||
for (Subscription subscription : subscriptions)
|
||||
{
|
||||
assertNull(subscription.getNode());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ import org.jivesoftware.smack.packet.XMPPError;
|
|||
import org.jivesoftware.smackx.pubsub.test.PubSubTestCase;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author Robin Collier
|
||||
*
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ import org.jivesoftware.smack.XMPPException;
|
|||
import org.jivesoftware.smackx.pubsub.test.SingleUserTestCase;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author Robin Collier
|
||||
*
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ import org.jivesoftware.smackx.pubsub.packet.PubSubNamespace;
|
|||
import org.jivesoftware.smackx.pubsub.test.SingleUserTestCase;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author Robin Collier
|
||||
*
|
||||
*/
|
||||
|
|
@ -69,9 +69,9 @@ public class PublisherUseCases extends SingleUserTestCase
|
|||
public void testSendNodeTrPay_WithPayload() throws XMPPException
|
||||
{
|
||||
LeafNode node = getPubnode(false, true);
|
||||
node.send(new PayloadItem<SimplePayload>(null,
|
||||
node.send(new PayloadItem<SimplePayload>(null,
|
||||
new SimplePayload("book", "pubsub:test:book", "<book xmlns='pubsub:test:book'><title>Lord of the Rings</title></book>")));
|
||||
node.send(new PayloadItem<SimplePayload>("test" + System.currentTimeMillis(),
|
||||
node.send(new PayloadItem<SimplePayload>("test" + System.currentTimeMillis(),
|
||||
new SimplePayload("book", "pubsub:test:book", "<book xmlns='pubsub:test:book'><title>Two Towers</title></book>")));
|
||||
}
|
||||
|
||||
|
|
@ -80,18 +80,18 @@ public class PublisherUseCases extends SingleUserTestCase
|
|||
LeafNode node = getPubnode(true, false);
|
||||
node.send(new Item());
|
||||
node.send(new Item("test" + System.currentTimeMillis()));
|
||||
node.send(new PayloadItem<SimplePayload>(null,
|
||||
node.send(new PayloadItem<SimplePayload>(null,
|
||||
new SimplePayload("book", "pubsub:test:book", "<book xmlns='pubsub:test:book'><title>Lord of the Rings</title></book>")));
|
||||
node.send(new PayloadItem<SimplePayload>("test" + System.currentTimeMillis(),
|
||||
node.send(new PayloadItem<SimplePayload>("test" + System.currentTimeMillis(),
|
||||
new SimplePayload("book", "pubsub:test:book", "<book xmlns='pubsub:test:book'><title>Two Towers</title></book>")));
|
||||
}
|
||||
|
||||
public void testSendPerPay_WithPayload() throws Exception
|
||||
{
|
||||
LeafNode node = getPubnode(true, true);
|
||||
node.send(new PayloadItem<SimplePayload>(null,
|
||||
node.send(new PayloadItem<SimplePayload>(null,
|
||||
new SimplePayload("book", "pubsub:test:book", "<book xmlns='pubsub:test:book'><title>Lord of the Rings</title></book>")));
|
||||
node.send(new PayloadItem<SimplePayload>("test" + System.currentTimeMillis(),
|
||||
node.send(new PayloadItem<SimplePayload>("test" + System.currentTimeMillis(),
|
||||
new SimplePayload("book", "pubsub:test:book", "<book xmlns='pubsub:test:book'><title>Two Towers</title></book>")));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ import org.jivesoftware.smackx.FormField;
|
|||
import org.jivesoftware.smackx.pubsub.test.SingleUserTestCase;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author Robin Collier
|
||||
*
|
||||
*/
|
||||
|
|
@ -138,17 +138,17 @@ public class SubscriberUseCases extends SingleUserTestCase
|
|||
}
|
||||
|
||||
// public void testSubscribeWithConfig() throws Exception
|
||||
// {
|
||||
// {
|
||||
// LeafNode node = getPubnode(false, false);
|
||||
//
|
||||
// Subscription sub = node.subscribe(getBareJID(0));
|
||||
//
|
||||
//
|
||||
// assertEquals(getBareJID(0), sub.getJid());
|
||||
// assertNotNull(sub.getId());
|
||||
// assertEquals(node.getId(), sub.getNode());
|
||||
// assertEquals(true, sub.isConfigRequired());
|
||||
// }
|
||||
//
|
||||
//
|
||||
public void testGetItems() throws Exception
|
||||
{
|
||||
LeafNode node = getPubnode(true, false);
|
||||
|
|
@ -197,7 +197,7 @@ public class SubscriberUseCases extends SingleUserTestCase
|
|||
List<PayloadItem<SimplePayload>> payloadItems = payloadNode.getItems();
|
||||
Map<String, PayloadItem<SimplePayload>> idMap = new HashMap<String, PayloadItem<SimplePayload>>();
|
||||
|
||||
for (PayloadItem<SimplePayload> payloadItem : payloadItems)
|
||||
for (PayloadItem<SimplePayload> payloadItem : payloadItems)
|
||||
{
|
||||
idMap.put(payloadItem.getId(), payloadItem);
|
||||
}
|
||||
|
|
@ -262,9 +262,9 @@ public class SubscriberUseCases extends SingleUserTestCase
|
|||
assertTrue(listContainsId("5", items));
|
||||
}
|
||||
|
||||
private static boolean listContainsId(String id, List<Item> items)
|
||||
private static boolean listContainsId(String id, List<Item> items)
|
||||
{
|
||||
for (Item item : items)
|
||||
for (Item item : items)
|
||||
{
|
||||
if (item.getId().equals(id))
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ import org.jivesoftware.smack.XMPPException;
|
|||
import org.jivesoftware.smackx.pubsub.test.SingleUserTestCase;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author Robin Collier
|
||||
*
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ import org.jivesoftware.smackx.pubsub.listener.ItemEventListener;
|
|||
import org.jivesoftware.smackx.pubsub.listener.NodeConfigListener;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author Robin Collier
|
||||
*
|
||||
*/
|
||||
|
|
@ -97,7 +97,7 @@ public class TestEvents extends SmackTestCase
|
|||
subNode.subscribe(getConnection(1).getUser());
|
||||
subNode.addConfigurationListener(sub1Handler);
|
||||
|
||||
ConfigureForm currentConfig = creatorNode.getNodeConfiguration();
|
||||
ConfigureForm currentConfig = creatorNode.getNodeConfiguration();
|
||||
ConfigureForm form = new ConfigureForm(currentConfig.createAnswerForm());
|
||||
form.setPersistentItems(true);
|
||||
form.setDeliverPayloads(false);
|
||||
|
|
@ -108,7 +108,7 @@ public class TestEvents extends SmackTestCase
|
|||
assertEquals(nodeId, event.getNode());
|
||||
assertNull(event.getConfiguration());
|
||||
|
||||
currentConfig = creatorNode.getNodeConfiguration();
|
||||
currentConfig = creatorNode.getNodeConfiguration();
|
||||
form = new ConfigureForm(currentConfig.createAnswerForm());
|
||||
form.setDeliverPayloads(true);
|
||||
creatorNode.sendConfigurationForm(form);
|
||||
|
|
@ -205,7 +205,7 @@ public class TestEvents extends SmackTestCase
|
|||
|
||||
/*
|
||||
* For this test, the following extension needs to be added to the meta-inf/smack.providers file
|
||||
*
|
||||
*
|
||||
* <extensionProvider>
|
||||
* <elementName>car</elementName>
|
||||
* <namespace>pubsub:test:vehicle</namespace>
|
||||
|
|
@ -585,7 +585,7 @@ public class TestEvents extends SmackTestCase
|
|||
}
|
||||
}
|
||||
|
||||
private static LeafNode getPubnode(PubSubManager manager, String id, boolean persistItems, boolean deliverPayload)
|
||||
private static LeafNode getPubnode(PubSubManager manager, String id, boolean persistItems, boolean deliverPayload)
|
||||
throws XMPPException
|
||||
{
|
||||
ConfigureForm form = new ConfigureForm(FormType.submit);
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ package org.jivesoftware.smackx.pubsub;
|
|||
import junit.framework.TestCase;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author Robin Collier
|
||||
*
|
||||
*/
|
||||
|
|
@ -27,7 +27,7 @@ public class TestMessageContent extends TestCase
|
|||
{
|
||||
String payloadXmlWithNS = "<book xmlns='pubsub:test:book'><author name='Stephen King'/></book>";
|
||||
|
||||
public void testItemWithId()
|
||||
public void testItemWithId()
|
||||
{
|
||||
Item item = new Item("123");
|
||||
assertEquals("<item id='123'/>", item.toXML());
|
||||
|
|
@ -35,7 +35,7 @@ public class TestMessageContent extends TestCase
|
|||
assertNull(item.getNamespace());
|
||||
}
|
||||
|
||||
public void testItemWithNoId()
|
||||
public void testItemWithNoId()
|
||||
{
|
||||
Item item = new Item();
|
||||
assertEquals("<item/>", item.toXML());
|
||||
|
|
@ -44,7 +44,7 @@ public class TestMessageContent extends TestCase
|
|||
assertEquals("<item/>", itemNull.toXML());
|
||||
}
|
||||
|
||||
public void testSimplePayload()
|
||||
public void testSimplePayload()
|
||||
{
|
||||
SimplePayload payloadNS = new SimplePayload("book", "pubsub:test:book", payloadXmlWithNS);
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ import org.jivesoftware.smackx.pubsub.LeafNode;
|
|||
import org.jivesoftware.smackx.pubsub.PubSubManager;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author Robin Collier
|
||||
*
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ import org.jivesoftware.smackx.pubsub.LeafNode;
|
|||
import org.jivesoftware.smackx.pubsub.PubSubManager;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author Robin Collier
|
||||
*
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue