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:
parent
9286a1decb
commit
252d5172e9
12 changed files with 52 additions and 60 deletions
|
|
@ -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());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue