mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-09-09 00:59:39 +02:00
Enable werror for javadoc and fix javadoc issues
This commit is contained in:
parent
4249c1a845
commit
1a3067c89b
323 changed files with 2929 additions and 2704 deletions
|
@ -94,8 +94,8 @@ public class Chat {
|
|||
* </pre>
|
||||
*
|
||||
* @param text the text to send.
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
* @throws NotConnectedException if the XMPP connection is not connected.
|
||||
* @throws InterruptedException if the calling thread was interrupted.
|
||||
*/
|
||||
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 if the XMPP connection is not connected.
|
||||
* @throws InterruptedException if the calling thread was interrupted.
|
||||
*/
|
||||
public void sendMessage(Message message) throws NotConnectedException, InterruptedException {
|
||||
// Force the recipient, message type, and thread ID since the user elected
|
||||
|
|
|
@ -279,7 +279,7 @@ public final class ChatManager extends Manager{
|
|||
* Creates a new {@link Chat} based on the message. May returns null if no chat could be
|
||||
* created, e.g. because the message comes without from.
|
||||
*
|
||||
* @param message
|
||||
* @param message TODO javadoc me please
|
||||
* @return a Chat or null if none can be created
|
||||
*/
|
||||
private Chat createChat(Message message) {
|
||||
|
|
|
@ -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 if the XMPP connection is not connected.
|
||||
* @throws InterruptedException if the calling thread was interrupted.
|
||||
*/
|
||||
public void reload() throws NotLoggedInException, NotConnectedException, InterruptedException {
|
||||
final XMPPConnection connection = getAuthenticatedConnectionOrThrow();
|
||||
|
@ -474,9 +474,9 @@ public final class Roster extends Manager {
|
|||
/**
|
||||
* Reload the roster and block until it is reloaded.
|
||||
*
|
||||
* @throws NotLoggedInException
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
* @throws NotLoggedInException if the XMPP connection is not authenticated.
|
||||
* @throws NotConnectedException if the XMPP connection is not connected.
|
||||
* @throws InterruptedException if the calling thread was interrupted.
|
||||
* @since 4.1
|
||||
*/
|
||||
public void reloadAndWait() throws NotLoggedInException, NotConnectedException, InterruptedException {
|
||||
|
@ -487,7 +487,7 @@ public final class Roster extends Manager {
|
|||
/**
|
||||
* Set the roster store, may cause a roster reload.
|
||||
*
|
||||
* @param rosterStore
|
||||
* @param rosterStore TODO javadoc me please
|
||||
* @return true if the roster reload was initiated, false otherwise.
|
||||
* @since 4.1
|
||||
*/
|
||||
|
@ -642,8 +642,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 if the XMPP connection is not connected.
|
||||
* @throws InterruptedException if the calling thread was interrupted.
|
||||
* @deprecated use {@link #createItemAndRequestSubscription(BareJid, String, String[])} instead.
|
||||
*/
|
||||
// TODO: Remove in Smack 4.5.
|
||||
|
@ -667,8 +667,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 if the XMPP connection is not connected.
|
||||
* @throws InterruptedException if the calling thread was interrupted.
|
||||
* @since 4.4.0
|
||||
*/
|
||||
public void createItem(BareJid jid, String name, String[] groups) throws NotLoggedInException, NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
|
||||
|
@ -700,8 +700,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 if the XMPP connection is not connected.
|
||||
* @throws InterruptedException if the calling thread was interrupted.
|
||||
* @since 4.4.0
|
||||
*/
|
||||
public void createItemAndRequestSubscription(BareJid jid, String name, String[] groups) throws NotLoggedInException, NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
|
||||
|
@ -721,8 +721,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 if the XMPP connection is not connected.
|
||||
* @throws InterruptedException if the calling thread was interrupted.
|
||||
* @throws FeatureNotSupportedException if pre-approving is not supported.
|
||||
* @since 4.2
|
||||
*/
|
||||
|
@ -736,8 +736,8 @@ public final class Roster extends Manager {
|
|||
*
|
||||
* @param user the user. (e.g. johndoe@jabber.org)
|
||||
* @throws NotLoggedInException if not logged in.
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
* @throws NotConnectedException if the XMPP connection is not connected.
|
||||
* @throws InterruptedException if the calling thread was interrupted.
|
||||
* @throws FeatureNotSupportedException if pre-approving is not supported.
|
||||
* @since 4.2
|
||||
*/
|
||||
|
@ -795,7 +795,7 @@ public final class Roster extends Manager {
|
|||
* Remove a subscribe listener. Also restores the previous subscription mode
|
||||
* state, if the last listener got removed.
|
||||
*
|
||||
* @param subscribeListener
|
||||
* @param subscribeListener TODO javadoc me please
|
||||
* the subscribe listener to remove.
|
||||
* @return <code>true</code> if the listener registered and got removed.
|
||||
* @since 4.2
|
||||
|
@ -818,8 +818,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 if the XMPP connection is not connected.
|
||||
* @throws InterruptedException if the calling thread was interrupted.
|
||||
*/
|
||||
public void removeEntry(RosterEntry entry) throws NotLoggedInException, NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
|
||||
final XMPPConnection connection = getAuthenticatedConnectionOrThrow();
|
||||
|
@ -971,7 +971,7 @@ public final class Roster extends Manager {
|
|||
* Returns the presence info for a particular user. If the user is offline, or
|
||||
* if no presence data is available (such as when you are not subscribed to the
|
||||
* user's presence updates), unavailable presence will be returned.
|
||||
* <p>
|
||||
*
|
||||
* If the user has several presences (one for each resource), then the presence with
|
||||
* highest priority will be returned. If multiple presences have the same priority,
|
||||
* the one with the "most available" presence mode will be returned. In order,
|
||||
|
@ -979,8 +979,8 @@ public final class Roster extends Manager {
|
|||
* {@link org.jivesoftware.smack.packet.Presence.Mode#available available},
|
||||
* {@link org.jivesoftware.smack.packet.Presence.Mode#away away},
|
||||
* {@link org.jivesoftware.smack.packet.Presence.Mode#xa extended away}, and
|
||||
* {@link org.jivesoftware.smack.packet.Presence.Mode#dnd do not disturb}.<p>
|
||||
* </p>
|
||||
* {@link org.jivesoftware.smack.packet.Presence.Mode#dnd do not disturb}.
|
||||
*
|
||||
* <p>
|
||||
* Note that presence information is received asynchronously. So, just after logging
|
||||
* in to the server, presence values for users in the roster may be unavailable
|
||||
|
@ -1184,7 +1184,7 @@ public final class Roster extends Manager {
|
|||
* </p>
|
||||
* Note that if the roster is not loaded, then this method will always return false.
|
||||
*
|
||||
* @param jid
|
||||
* @param jid TODO javadoc me please
|
||||
* @return true if the given JID is allowed to see the users presence.
|
||||
* @since 4.1
|
||||
*/
|
||||
|
@ -1871,7 +1871,7 @@ public final class Roster extends Manager {
|
|||
/**
|
||||
* Set the maximum size of the non-Roster presence map.
|
||||
*
|
||||
* @param maximumSize
|
||||
* @param maximumSize TODO javadoc me please
|
||||
* @since 4.2
|
||||
* @see #setDefaultNonRosterPresenceMapMaxSize(int)
|
||||
*/
|
||||
|
|
|
@ -94,10 +94,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 if the XMPP connection is not connected.
|
||||
* @throws XMPPErrorException if there was an XMPP error returned.
|
||||
* @throws NoResponseException if there was no response from the remote entity.
|
||||
* @throws InterruptedException if the calling thread was interrupted.
|
||||
*/
|
||||
public synchronized void setName(String name) throws NotConnectedException, NoResponseException, XMPPErrorException, InterruptedException {
|
||||
// Do nothing if the name hasn't changed.
|
||||
|
@ -213,8 +213,8 @@ public final class RosterEntry extends Manager {
|
|||
/**
|
||||
* Cancel the presence subscription the XMPP entity representing this roster entry has with us.
|
||||
*
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
* @throws NotConnectedException if the XMPP connection is not connected.
|
||||
* @throws InterruptedException if the calling thread was interrupted.
|
||||
* @since 4.2
|
||||
*/
|
||||
public void cancelSubscription() throws NotConnectedException, InterruptedException {
|
||||
|
|
|
@ -71,10 +71,10 @@ public class RosterGroup extends Manager {
|
|||
* 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 if the XMPP connection is not connected.
|
||||
* @throws XMPPErrorException if there was an XMPP error returned.
|
||||
* @throws NoResponseException if there was no response from the remote entity.
|
||||
* @throws InterruptedException if the calling thread was interrupted.
|
||||
*/
|
||||
public void setName(String name) throws NotConnectedException, NoResponseException, XMPPErrorException, InterruptedException {
|
||||
synchronized (entries) {
|
||||
|
@ -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 if the XMPP connection is not connected.
|
||||
* @throws InterruptedException if the calling thread was interrupted.
|
||||
*/
|
||||
public void addEntry(RosterEntry entry) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
|
||||
// Only add the entry if it isn't already in the list.
|
||||
|
@ -195,8 +195,8 @@ public class RosterGroup extends Manager {
|
|||
* @param entry a roster entry.
|
||||
* @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 if the XMPP connection is not connected.
|
||||
* @throws InterruptedException if the calling thread was interrupted.
|
||||
*/
|
||||
public void removeEntry(RosterEntry entry) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
|
||||
// Only remove the entry if it's in the entry list.
|
||||
|
|
|
@ -92,9 +92,9 @@ public class RosterUtil {
|
|||
*
|
||||
* @param roster The roster which should be used for the pre-approval.
|
||||
* @param jid The XMPP address which should be pre-approved.
|
||||
* @throws NotLoggedInException
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
* @throws NotLoggedInException if the XMPP connection is not authenticated.
|
||||
* @throws NotConnectedException if the XMPP connection is not connected.
|
||||
* @throws InterruptedException if the calling thread was interrupted.
|
||||
* @since 4.2.2
|
||||
*/
|
||||
public static void preApproveSubscriptionIfRequiredAndPossible(Roster roster, BareJid jid)
|
||||
|
|
|
@ -137,8 +137,8 @@ public final class RosterPacket extends IQ {
|
|||
/**
|
||||
* Creates a new roster item.
|
||||
*
|
||||
* @param jid
|
||||
* @param name
|
||||
* @param jid TODO javadoc me please
|
||||
* @param name TODO javadoc me please
|
||||
*/
|
||||
public Item(BareJid jid, String name) {
|
||||
this(jid, name, false);
|
||||
|
@ -149,7 +149,7 @@ public final class RosterPacket extends IQ {
|
|||
*
|
||||
* @param jid the jid.
|
||||
* @param name the user's name.
|
||||
* @param subscriptionPending
|
||||
* @param subscriptionPending TODO javadoc me please
|
||||
*/
|
||||
public Item(BareJid jid, String name, boolean subscriptionPending) {
|
||||
this.jid = Objects.requireNonNull(jid);
|
||||
|
|
|
@ -67,7 +67,7 @@ public final class DirectoryRosterStore implements RosterStore {
|
|||
};
|
||||
|
||||
/**
|
||||
* @param baseDir
|
||||
* @param baseDir TODO javadoc me please
|
||||
* will be the directory where all roster entries are stored. One
|
||||
* file for each entry, such that file.name = entry.username.
|
||||
* There is also one special file '__version__' that contains the
|
||||
|
@ -80,7 +80,7 @@ public final class DirectoryRosterStore implements RosterStore {
|
|||
/**
|
||||
* Creates a new roster store on disk.
|
||||
*
|
||||
* @param baseDir
|
||||
* @param baseDir TODO javadoc me please
|
||||
* The directory to create the store in. The directory should
|
||||
* be empty
|
||||
* @return A {@link DirectoryRosterStore} instance if successful,
|
||||
|
@ -98,7 +98,7 @@ public final class DirectoryRosterStore implements RosterStore {
|
|||
|
||||
/**
|
||||
* Opens a roster store.
|
||||
* @param baseDir
|
||||
* @param baseDir TODO javadoc me please
|
||||
* The directory containing the roster store.
|
||||
* @return A {@link DirectoryRosterStore} instance if successful,
|
||||
* <code>null</code> else.
|
||||
|
|
|
@ -369,7 +369,7 @@ public class RosterTest extends InitSmackIm {
|
|||
|
||||
/**
|
||||
* Tests that roster pushes with invalid from are ignored.
|
||||
* @throws XmppStringprepException
|
||||
* @throws XmppStringprepException if the provided string is invalid.
|
||||
*
|
||||
* @see <a href="http://xmpp.org/rfcs/rfc6121.html#roster-syntax-actions-push">RFC 6121, Section 2.1.6</a>
|
||||
*/
|
||||
|
@ -538,8 +538,8 @@ public class RosterTest extends InitSmackIm {
|
|||
* <a href="http://xmpp.org/rfcs/rfc3921.html#roster-login"
|
||||
* >RFC3921: Retrieving One's Roster on Login</a>.
|
||||
*
|
||||
* @throws SmackException
|
||||
* @throws XmppStringprepException
|
||||
* @throws SmackException if Smack detected an exceptional situation.
|
||||
* @throws XmppStringprepException if the provided string is invalid.
|
||||
*/
|
||||
private void initRoster() throws InterruptedException, SmackException, XmppStringprepException {
|
||||
roster.reload();
|
||||
|
|
|
@ -95,8 +95,8 @@ public class RosterVersioningTest {
|
|||
/**
|
||||
* Tests that receiving an empty roster result causes the roster to be populated
|
||||
* by all entries of the roster store.
|
||||
* @throws SmackException
|
||||
* @throws XMPPException
|
||||
* @throws SmackException if Smack detected an exceptional situation.
|
||||
* @throws XMPPException if an XMPP protocol error was received.
|
||||
*/
|
||||
@Test(timeout = 300000)
|
||||
public void testEqualVersionStored() throws InterruptedException, IOException, XMPPException, SmackException {
|
||||
|
@ -129,9 +129,9 @@ public class RosterVersioningTest {
|
|||
|
||||
/**
|
||||
* Tests that a non-empty roster result empties the store.
|
||||
* @throws SmackException
|
||||
* @throws XMPPException
|
||||
* @throws XmppStringprepException
|
||||
* @throws SmackException if Smack detected an exceptional situation.
|
||||
* @throws XMPPException if an XMPP protocol error was received.
|
||||
* @throws XmppStringprepException if the provided string is invalid.
|
||||
*/
|
||||
@Test(timeout = 5000)
|
||||
public void testOtherVersionStored() throws XMPPException, SmackException, XmppStringprepException {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue