fixed the constructor.
This commit is contained in:
parent
69b7f7e655
commit
06599d1eac
@ -99,13 +99,7 @@ public class SafeArrayList<E> implements List<E>, Cloneable {
|
||||
|
||||
public SafeArrayList(final Class<E> elementType, final Collection<? extends E> collection) {
|
||||
this.elementType = elementType;
|
||||
|
||||
if (collection instanceof SafeArrayList) {
|
||||
this.buffer = Arrays.asList(((SafeArrayList<E>) collection).getArray());
|
||||
} else {
|
||||
this.buffer = new ArrayList<>(collection);
|
||||
}
|
||||
|
||||
this.buffer = new ArrayList<>(collection);
|
||||
this.size = buffer.size();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user