Static code analysis. (#1017)

This commit is contained in:
Koen De Groote
2017-04-30 14:47:02 +12:00
committed by Rob Bygrave
parent a120c2aaee
commit 335c4de109
16 changed files with 20 additions and 85 deletions
@@ -36,8 +36,7 @@ public class ChainedBeanQueryAdapter implements BeanQueryAdapter {
if (list.contains(c)) {
return this;
} else {
List<BeanQueryAdapter> newList = new ArrayList<>();
newList.addAll(list);
List<BeanQueryAdapter> newList = new ArrayList<>(list);
newList.add(c);
return new ChainedBeanQueryAdapter(newList);
@@ -51,8 +50,7 @@ public class ChainedBeanQueryAdapter implements BeanQueryAdapter {
if (!list.contains(c)) {
return this;
} else {
ArrayList<BeanQueryAdapter> newList = new ArrayList<>();
newList.addAll(list);
List<BeanQueryAdapter> newList = new ArrayList<>(list);
newList.remove(c);
return new ChainedBeanQueryAdapter(newList);