From 012f036840ade8f46462eafcc96d1f223f8ba845 Mon Sep 17 00:00:00 2001 From: Andreas Straub Date: Mon, 20 Jul 2015 14:26:29 +0200 Subject: Optimize imports --- .../java/eu/siacs/conversations/ui/adapter/KnownHostsAdapter.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/main/java/eu/siacs/conversations/ui/adapter/KnownHostsAdapter.java') diff --git a/src/main/java/eu/siacs/conversations/ui/adapter/KnownHostsAdapter.java b/src/main/java/eu/siacs/conversations/ui/adapter/KnownHostsAdapter.java index 0993735f..471526af 100644 --- a/src/main/java/eu/siacs/conversations/ui/adapter/KnownHostsAdapter.java +++ b/src/main/java/eu/siacs/conversations/ui/adapter/KnownHostsAdapter.java @@ -1,13 +1,13 @@ package eu.siacs.conversations.ui.adapter; -import java.util.ArrayList; -import java.util.List; -import java.util.Locale; - import android.content.Context; import android.widget.ArrayAdapter; import android.widget.Filter; +import java.util.ArrayList; +import java.util.List; +import java.util.Locale; + public class KnownHostsAdapter extends ArrayAdapter { private ArrayList domains; private Filter domainFilter = new Filter() { -- cgit v1.2.3 From 933538a39da9fb80025e07fc173514f45033c261 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Mon, 12 Oct 2015 12:36:54 +0200 Subject: code clean up --- .../java/eu/siacs/conversations/ui/adapter/KnownHostsAdapter.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/main/java/eu/siacs/conversations/ui/adapter/KnownHostsAdapter.java') diff --git a/src/main/java/eu/siacs/conversations/ui/adapter/KnownHostsAdapter.java b/src/main/java/eu/siacs/conversations/ui/adapter/KnownHostsAdapter.java index 471526af..39bfc082 100644 --- a/src/main/java/eu/siacs/conversations/ui/adapter/KnownHostsAdapter.java +++ b/src/main/java/eu/siacs/conversations/ui/adapter/KnownHostsAdapter.java @@ -15,7 +15,7 @@ public class KnownHostsAdapter extends ArrayAdapter { @Override protected FilterResults performFiltering(CharSequence constraint) { if (constraint != null) { - ArrayList suggestions = new ArrayList(); + ArrayList suggestions = new ArrayList<>(); final String[] split = constraint.toString().split("@"); if (split.length == 1) { for (String domain : domains) { @@ -58,10 +58,9 @@ public class KnownHostsAdapter extends ArrayAdapter { } }; - public KnownHostsAdapter(Context context, int viewResourceId, - List mKnownHosts) { + public KnownHostsAdapter(Context context, int viewResourceId, List mKnownHosts) { super(context, viewResourceId, new ArrayList()); - domains = new ArrayList(mKnownHosts); + domains = new ArrayList<>(mKnownHosts); } @Override -- cgit v1.2.3