Skip to content

Commit 06599d1

Browse files
JavaSaBrNehon
authored andcommitted
fixed the constructor.
1 parent 69b7f7e commit 06599d1

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

jme3-core/src/main/java/com/jme3/util/SafeArrayList.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -99,13 +99,7 @@ public SafeArrayList(final Class<E> elementType, final int capacity) {
9999

100100
public SafeArrayList(final Class<E> elementType, final Collection<? extends E> collection) {
101101
this.elementType = elementType;
102-
103-
if (collection instanceof SafeArrayList) {
104-
this.buffer = Arrays.asList(((SafeArrayList<E>) collection).getArray());
105-
} else {
106-
this.buffer = new ArrayList<>(collection);
107-
}
108-
102+
this.buffer = new ArrayList<>(collection);
109103
this.size = buffer.size();
110104
}
111105

0 commit comments

Comments
 (0)