Skip to content

Commit 3ebde47

Browse files
committed
Merge branch 'master' of https://github.com/json-iterator/java
2 parents cbc7076 + 0913eff commit 3ebde47

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/main/java/com/jsoniter/ReflectionCollectionDecoder.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,7 @@ private Object decode_(JsonIterator iter) throws Exception {
3838
if (iter.readNull()) {
3939
return null;
4040
}
41-
if (col == null) {
42-
col = (Collection) this.ctor.newInstance();
43-
} else {
44-
col.clear();
45-
}
41+
col = (Collection) this.ctor.newInstance();
4642
while (iter.readArray()) {
4743
col.add(compTypeDecoder.decode(iter));
4844
}

0 commit comments

Comments
 (0)