mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-22 22:32:06 +01:00
Use Collections.emptyList() in MultiUserChat
This commit is contained in:
parent
8529d1463f
commit
a0fe337bcd
1 changed files with 1 additions and 2 deletions
|
@ -23,7 +23,6 @@ import java.lang.reflect.Method;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.LinkedList;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
@ -131,7 +130,7 @@ public class MultiUserChat {
|
||||||
new NodeInformationProvider() {
|
new NodeInformationProvider() {
|
||||||
public List<DiscoverItems.Item> getNodeItems() {
|
public List<DiscoverItems.Item> getNodeItems() {
|
||||||
XMPPConnection connection = weakRefConnection.get();
|
XMPPConnection connection = weakRefConnection.get();
|
||||||
if (connection == null) return new LinkedList<DiscoverItems.Item>();
|
if (connection == null) return Collections.emptyList();
|
||||||
List<DiscoverItems.Item> answer = new ArrayList<DiscoverItems.Item>();
|
List<DiscoverItems.Item> answer = new ArrayList<DiscoverItems.Item>();
|
||||||
for (String room : MultiUserChat.getJoinedRooms(connection)) {
|
for (String room : MultiUserChat.getJoinedRooms(connection)) {
|
||||||
answer.add(new DiscoverItems.Item(room));
|
answer.add(new DiscoverItems.Item(room));
|
||||||
|
|
Loading…
Reference in a new issue