1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2025-12-06 13:11:08 +01:00

Enable trailing whitespace checkstyle check

for all source code regions, including javadoc.
This commit is contained in:
Florian Schmaus 2018-05-09 23:06:12 +02:00
parent 9d61a6de7d
commit e8923b9d16
545 changed files with 3713 additions and 3715 deletions

View file

@ -35,7 +35,7 @@ import org.jxmpp.jid.EntityJid;
* don't send thread IDs at all. Therefore, if a message without a thread ID
* arrives it is routed to the most recently created Chat with the message
* sender.
*
*
* @author Matt Tucker
* @deprecated use <code>org.jivesoftware.smack.chat2.Chat</code> from <code>smack-extensions</code> instead.
*/
@ -94,8 +94,8 @@ public class Chat {
* </pre>
*
* @param text the text to send.
* @throws NotConnectedException
* @throws InterruptedException
* @throws NotConnectedException
* @throws InterruptedException
*/
public void sendMessage(String text) throws NotConnectedException, InterruptedException {
Message message = new Message();
@ -108,8 +108,8 @@ public class Chat {
* and message type of the message will automatically set to those of this chat.
*
* @param message the message to send.
* @throws NotConnectedException
* @throws InterruptedException
* @throws NotConnectedException
* @throws InterruptedException
*/
public void sendMessage(Message message) throws NotConnectedException, InterruptedException {
// Force the recipient, message type, and thread ID since the user elected

View file

@ -96,7 +96,7 @@ public final class ChatManager extends Manager{
*/
NONE,
/**
* Will match on the JID in the from field of the message.
* Will match on the JID in the from field of the message.
*/
SUPPLIED_JID,
/**
@ -116,7 +116,7 @@ public final class ChatManager extends Manager{
});
/**
* Determines whether incoming messages of type normal can create chats.
* Determines whether incoming messages of type normal can create chats.
*/
private boolean normalIncluded = defaultIsNormalInclude;
@ -180,7 +180,7 @@ public final class ChatManager extends Manager{
/**
* Determines whether incoming messages of type <i>normal</i> will be used for creating new chats or matching
* a message to existing ones.
*
*
* @return true if normal is allowed, false otherwise.
*/
public boolean isNormalIncluded() {
@ -190,7 +190,7 @@ public final class ChatManager extends Manager{
/**
* Sets whether to allow incoming messages of type <i>normal</i> to be used for creating new chats or matching
* a message to an existing one.
*
*
* @param normalIncluded true to allow normal, false otherwise.
*/
public void setNormalIncluded(boolean normalIncluded) {
@ -199,7 +199,7 @@ public final class ChatManager extends Manager{
/**
* Gets the current mode for matching messages with <b>NO</b> thread id to existing chats.
*
*
* @return The current mode.
*/
public MatchMode getMatchMode() {
@ -208,7 +208,7 @@ public final class ChatManager extends Manager{
/**
* Sets the mode for matching messages with <b>NO</b> thread id to existing chats.
*
*
* @param matchMode The mode to set.
*/
public void setMatchMode(MatchMode matchMode) {
@ -238,7 +238,7 @@ public final class ChatManager extends Manager{
/**
* Creates a new chat using the specified thread ID, then returns it.
*
*
* @param userJID the jid of the user this chat is with
* @param thread the thread of the created chat.
* @param listener the optional listener to add to the chat
@ -309,8 +309,8 @@ public final class ChatManager extends Manager{
* Try to get a matching chat for the given user JID, based on the {@link MatchMode}.
* <li>NONE - return null
* <li>SUPPLIED_JID - match the jid in the from field of the message exactly.
* <li>BARE_JID - if not match for from field, try the bare jid.
*
* <li>BARE_JID - if not match for from field, try the bare jid.
*
* @param userJID jid in the from field of message.
* @return Matching chat, or null if no match found.
*/
@ -383,7 +383,7 @@ public final class ChatManager extends Manager{
}
StanzaCollector createStanzaCollector(Chat chat) {
return connection().createStanzaCollector(new AndFilter(new ThreadFilter(chat.getThreadID()),
return connection().createStanzaCollector(new AndFilter(new ThreadFilter(chat.getThreadID()),
FromMatchesFilter.create(chat.getParticipant())));
}

View file

@ -115,7 +115,7 @@ public final class Roster extends Manager {
* {@link Roster#removeEntry(RosterEntry)} , etc. except adding or removing
* {@link RosterListener}s will throw an IllegalStateException.
* </p>
*
*
* @param connection the connection the roster should be retrieved for.
* @return the user's roster.
*/
@ -201,7 +201,7 @@ public final class Roster extends Manager {
private final PresencePacketListener presencePacketListener = new PresencePacketListener();
/**
*
*
*/
private boolean rosterLoadedAtLogin = rosterLoadedAtLoginDefault;
@ -437,8 +437,8 @@ public final class Roster extends Manager {
* which means the method will return immediately, and the roster will be
* reloaded at a later point when the server responds to the reload request.
* @throws NotLoggedInException If not logged in.
* @throws NotConnectedException
* @throws InterruptedException
* @throws NotConnectedException
* @throws InterruptedException
*/
public void reload() throws NotLoggedInException, NotConnectedException, InterruptedException {
final XMPPConnection connection = getAuthenticatedConnectionOrThrow();
@ -476,7 +476,7 @@ public final class Roster extends Manager {
*
* @throws NotLoggedInException
* @throws NotConnectedException
* @throws InterruptedException
* @throws InterruptedException
* @since 4.1
*/
public void reloadAndWait() throws NotLoggedInException, NotConnectedException, InterruptedException {
@ -627,8 +627,8 @@ public final class Roster extends Manager {
* @throws NoResponseException if there was no response from the server.
* @throws XMPPErrorException if an XMPP exception occurs.
* @throws NotLoggedInException If not logged in.
* @throws NotConnectedException
* @throws InterruptedException
* @throws NotConnectedException
* @throws InterruptedException
*/
public void createEntry(BareJid user, String name, String[] groups) throws NotLoggedInException, NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
final XMPPConnection connection = getAuthenticatedConnectionOrThrow();
@ -717,7 +717,7 @@ public final class Roster extends Manager {
* Add a subscribe listener, which is invoked on incoming subscription requests and if
* {@link SubscriptionMode} is set to {@link SubscriptionMode#manual}. This also sets subscription
* mode to {@link SubscriptionMode#manual}.
*
*
* @param subscribeListener the subscribe listener to add.
* @return <code>true</code> if the listener was not already added.
* @since 4.2
@ -758,8 +758,8 @@ public final class Roster extends Manager {
* @throws XMPPErrorException if an XMPP error occurs.
* @throws NotLoggedInException if not logged in.
* @throws NoResponseException SmackException if there was no response from the server.
* @throws NotConnectedException
* @throws InterruptedException
* @throws NotConnectedException
* @throws InterruptedException
*/
public void removeEntry(RosterEntry entry) throws NotLoggedInException, NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
final XMPPConnection connection = getAuthenticatedConnectionOrThrow();
@ -1124,7 +1124,7 @@ public final class Roster extends Manager {
* having an implicit subscription to the users presence.
* </p>
* Note that if the roster is not loaded, then this method will always return false.
*
*
* @param jid
* @return true if the given JID is allowed to see the users presence.
* @since 4.1

View file

@ -93,10 +93,10 @@ public final class RosterEntry extends Manager {
* Sets the name associated with this entry.
*
* @param name the name.
* @throws NotConnectedException
* @throws XMPPErrorException
* @throws NoResponseException
* @throws InterruptedException
* @throws NotConnectedException
* @throws XMPPErrorException
* @throws NoResponseException
* @throws InterruptedException
*/
public synchronized void setName(String name) throws NotConnectedException, NoResponseException, XMPPErrorException, InterruptedException {
// Do nothing if the name hasn't changed.
@ -211,7 +211,7 @@ public final class RosterEntry extends Manager {
/**
* Cancel the presence subscription the XMPP entity representing this roster entry has with us.
*
*
* @throws NotConnectedException
* @throws InterruptedException
* @since 4.2
@ -266,7 +266,7 @@ public final class RosterEntry extends Manager {
* Indicates whether some other object is "equal to" this by comparing all members.
* <p>
* The {@link #equals(Object)} method returns <code>true</code> if the user JIDs are equal.
*
*
* @param obj the reference object with which to compare.
* @return <code>true</code> if this object is the same as the obj argument; <code>false</code>
* otherwise.

View file

@ -66,15 +66,15 @@ public class RosterGroup extends Manager {
/**
* Sets the name of the group. Changing the group's name is like moving all the group entries
* of the group to a new group specified by the new name. Since this group won't have entries
* it will be removed from the roster. This means that all the references to this object will
* of the group to a new group specified by the new name. Since this group won't have entries
* it will be removed from the roster. This means that all the references to this object will
* be invalid and will need to be updated to the new group specified by the new name.
*
* @param name the name of the group.
* @throws NotConnectedException
* @throws XMPPErrorException
* @throws NoResponseException
* @throws InterruptedException
* @throws NotConnectedException
* @throws XMPPErrorException
* @throws NoResponseException
* @throws InterruptedException
*/
public void setName(String name) throws NotConnectedException, NoResponseException, XMPPErrorException, InterruptedException {
synchronized (entries) {
@ -159,7 +159,7 @@ public class RosterGroup extends Manager {
}
/**
* Adds a roster entry to this group. If the entry was unfiled then it will be removed from
* Adds a roster entry to this group. If the entry was unfiled then it will be removed from
* the unfiled list and will be added to this group.
* Note that this is a synchronous call -- Smack must wait for the server
* to receive the updated roster.
@ -167,8 +167,8 @@ public class RosterGroup extends Manager {
* @param entry a roster entry.
* @throws XMPPErrorException if an error occured while trying to add the entry to the group.
* @throws NoResponseException if there was no response from the server.
* @throws NotConnectedException
* @throws InterruptedException
* @throws NotConnectedException
* @throws InterruptedException
*/
public void addEntry(RosterEntry entry) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
// Only add the entry if it isn't already in the list.
@ -186,22 +186,22 @@ public class RosterGroup extends Manager {
}
/**
* Removes a roster entry from this group. If the entry does not belong to any other group
* then it will be considered as unfiled, therefore it will be added to the list of unfiled
* Removes a roster entry from this group. If the entry does not belong to any other group
* then it will be considered as unfiled, therefore it will be added to the list of unfiled
* entries.
* Note that this is a synchronous call -- Smack must wait for the server
* to receive the updated roster.
*
* @param entry a roster entry.
* @throws XMPPErrorException if an error occurred while trying to remove the entry from the group.
* @throws XMPPErrorException if an error occurred while trying to remove the entry from the group.
* @throws NoResponseException if there was no response from the server.
* @throws NotConnectedException
* @throws InterruptedException
* @throws NotConnectedException
* @throws InterruptedException
*/
public void removeEntry(RosterEntry entry) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
// Only remove the entry if it's in the entry list.
// Remove the entry locally, if we wait for RosterPacketListenerProcess>>Packet(Packet)
// to take place the entry will exist in the group until a packet is received from the
// to take place the entry will exist in the group until a packet is received from the
// server.
synchronized (entries) {
if (entries.contains(entry)) {

View file

@ -26,7 +26,7 @@ import org.jxmpp.jid.Jid;
/**
* A listener that is fired any time a roster is changed or the presence of
* a user in the roster is changed.
*
*
* @see Roster#addRosterListener(RosterListener)
* @author Matt Tucker
*/

View file

@ -126,7 +126,7 @@ public class RosterPacket extends IQ {
*/
private boolean subscriptionPending;
// TODO Make immutable.
// TODO Make immutable.
private String name;
private ItemType itemType = ItemType.none;
private boolean approved;
@ -399,7 +399,7 @@ public class RosterPacket extends IQ {
* point in the direction presence messages are sent. For example, if there is only a head
* pointing to the big dot, then the local user will receive presence information from the
* remote entity.
*
*
* @return the symbolic representation of this item type.
*/
public String asSymbol() {