studio: take Collections.addAll() suggestion
This commit is contained in:
parent
2dd053f76b
commit
cc7bf78ed1
@ -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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user