Improved: Remove ‘UtilMisc#toList’

(OFBIZ-11140)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1863442 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Mathieu Lirzin
2019-07-19 22:09:52 +00:00
parent df8586eccf
commit 6a99c09a18
3 changed files with 6 additions and 20 deletions
@@ -368,18 +368,6 @@ public final class UtilMisc {
return list;
}
public static <T> List<T> toList(Collection<T> collection) {
if (collection == null) {
return null;
}
if (collection instanceof List<?>) {
return (List<T>) collection;
}
List<T> list = new LinkedList<>();
list.addAll(collection);
return list;
}
public static <T> List<T> toListArray(T[] data) {
if (data == null) {
return null;