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
@@ -29,8 +29,7 @@ public class ChainedBeanPostLoad implements BeanPostLoad {
if (list.contains(c)) {
return this;
} else {
List<BeanPostLoad> newList = new ArrayList<>();
newList.addAll(list);
List<BeanPostLoad> newList = new ArrayList<>(list);
newList.add(c);
return new ChainedBeanPostLoad(newList);
@@ -44,8 +43,7 @@ public class ChainedBeanPostLoad implements BeanPostLoad {
if (!list.contains(c)) {
return this;
} else {
ArrayList<BeanPostLoad> newList = new ArrayList<>();
newList.addAll(list);
List<BeanPostLoad> newList = new ArrayList<>(list);
newList.remove(c);
return new ChainedBeanPostLoad(newList);