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

Return more specific types (e.g. Collection → List)

be generic as possible in what you accept, but more specific in what you
return.

Also tweak MultiuserChatManager methods a bit.
This commit is contained in:
Florian Schmaus 2014-11-29 13:36:56 +01:00
parent 9286a1decb
commit 252d5172e9
12 changed files with 52 additions and 60 deletions

View file

@ -17,7 +17,6 @@
package org.jivesoftware.smackx.bookmarks;
import java.util.Collection;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
@ -95,9 +94,9 @@ public class BookmarkManager {
* @throws NotConnectedException
* @see BookmarkedConference
*/
public Collection<BookmarkedConference> getBookmarkedConferences() throws NoResponseException, XMPPErrorException, NotConnectedException {
public List<BookmarkedConference> getBookmarkedConferences() throws NoResponseException, XMPPErrorException, NotConnectedException {
retrieveBookmarks();
return Collections.unmodifiableCollection(bookmarks.getBookmarkedConferences());
return Collections.unmodifiableList(bookmarks.getBookmarkedConferences());
}
/**
@ -171,9 +170,9 @@ public class BookmarkManager {
* @throws NoResponseException if there was no response from the server.
* @throws NotConnectedException
*/
public Collection<BookmarkedURL> getBookmarkedURLs() throws NoResponseException, XMPPErrorException, NotConnectedException {
public List<BookmarkedURL> getBookmarkedURLs() throws NoResponseException, XMPPErrorException, NotConnectedException {
retrieveBookmarks();
return Collections.unmodifiableCollection(bookmarks.getBookmarkedURLS());
return Collections.unmodifiableList(bookmarks.getBookmarkedURLS());
}
/**