From 06599d1eac79f839ac7744e2a526b326bd214ecd Mon Sep 17 00:00:00 2001 From: javasabr Date: Tue, 19 Sep 2017 07:16:35 +0300 Subject: [PATCH] fixed the constructor. --- jme3-core/src/main/java/com/jme3/util/SafeArrayList.java | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/jme3-core/src/main/java/com/jme3/util/SafeArrayList.java b/jme3-core/src/main/java/com/jme3/util/SafeArrayList.java index 7fb08ad6c..0085b20d3 100644 --- a/jme3-core/src/main/java/com/jme3/util/SafeArrayList.java +++ b/jme3-core/src/main/java/com/jme3/util/SafeArrayList.java @@ -99,13 +99,7 @@ public class SafeArrayList implements List, Cloneable { public SafeArrayList(final Class elementType, final Collection collection) { this.elementType = elementType; - - if (collection instanceof SafeArrayList) { - this.buffer = Arrays.asList(((SafeArrayList) collection).getArray()); - } else { - this.buffer = new ArrayList<>(collection); - } - + this.buffer = new ArrayList<>(collection); this.size = buffer.size(); }