studio: take Collections.addAll() suggestion

This commit is contained in:
Daniel Martí 2016-07-07 10:29:10 +01:00
parent 2dd053f76b
commit cc7bf78ed1

View File

@ -4,6 +4,7 @@ import android.support.annotation.Nullable;
import android.text.TextUtils; import android.text.TextUtils;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections;
import java.util.List; import java.util.List;
abstract class QueryBuilder { abstract class QueryBuilder {
@ -91,16 +92,12 @@ abstract class QueryBuilder {
List<String> args = new ArrayList<>(); List<String> args = new ArrayList<>();
if (selectionArgs != null) { if (selectionArgs != null) {
for (String arg : selectionArgs) { Collections.addAll(args, selectionArgs);
args.add(arg);
}
} }
for (OrderClause orderBy : orderBys) { for (OrderClause orderBy : orderBys) {
if (orderBy.getArgs() != null) { if (orderBy.getArgs() != null) {
for (String arg : orderBy.getArgs()) { Collections.addAll(args, orderBy.getArgs());
args.add(arg);
}
} }
} }