mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-12-18 08:51:08 +01:00
Xlint all the things
and fix all warnings.
This commit is contained in:
parent
7c5428ab0e
commit
f546d28ad8
50 changed files with 142 additions and 122 deletions
|
|
@ -82,7 +82,7 @@ public class Affiliation implements ExtensionElement
|
|||
return builder.toString();
|
||||
}
|
||||
|
||||
private void appendAttribute(StringBuilder builder, String att, String value)
|
||||
private static void appendAttribute(StringBuilder builder, String att, String value)
|
||||
{
|
||||
builder.append(" ");
|
||||
builder.append(att);
|
||||
|
|
|
|||
|
|
@ -707,7 +707,7 @@ public class ConfigureForm extends Form
|
|||
}
|
||||
}
|
||||
|
||||
private List<String> getListSingle(String value)
|
||||
private static List<String> getListSingle(String value)
|
||||
{
|
||||
List<String> list = new ArrayList<String>(1);
|
||||
list.add(value);
|
||||
|
|
|
|||
|
|
@ -553,7 +553,7 @@ abstract public class Node
|
|||
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));
|
||||
ItemPublishEvent eventItems = new ItemPublishEvent(itemsElem.getNode(), itemsElem.getItems(), getSubscriptionIds(packet), DelayInformationManager.getDelayTimestamp(packet));
|
||||
listener.handlePublishedItems(eventItems);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -170,8 +170,7 @@ final public class PubSubManager
|
|||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public <T extends Node> T getNode(String id) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException
|
||||
public <T extends Node> T getNode(String id) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException
|
||||
{
|
||||
Node node = nodeMap.get(id);
|
||||
|
||||
|
|
@ -203,7 +202,9 @@ final public class PubSubManager
|
|||
node.setTo(to);
|
||||
nodeMap.put(id, node);
|
||||
}
|
||||
return (T) node;
|
||||
@SuppressWarnings("unchecked")
|
||||
T res = (T) node;
|
||||
return res;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -151,7 +151,7 @@ public class Subscription extends NodeExtension
|
|||
return builder.toString();
|
||||
}
|
||||
|
||||
private void appendAttribute(StringBuilder builder, String att, String value)
|
||||
private static void appendAttribute(StringBuilder builder, String att, String value)
|
||||
{
|
||||
builder.append(" ");
|
||||
builder.append(att);
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@ public class PubSub extends IQ
|
|||
*
|
||||
* @return the XML element name of the packet extension.
|
||||
*/
|
||||
@SuppressWarnings("static-method")
|
||||
public String getElementName() {
|
||||
return ELEMENT;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue