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 java.util.ArrayList;
import java.util.Collections;
import java.util.List;
abstract class QueryBuilder {
@ -91,16 +92,12 @@ abstract class QueryBuilder {
List<String> args = new ArrayList<>();
if (selectionArgs != null) {
for (String arg : selectionArgs) {
args.add(arg);
}
Collections.addAll(args, selectionArgs);
}
for (OrderClause orderBy : orderBys) {
if (orderBy.getArgs() != null) {
for (String arg : orderBy.getArgs()) {
args.add(arg);
}
Collections.addAll(args, orderBy.getArgs());
}
}