mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
EA-36469 (diagnostic)
This commit is contained in:
@@ -269,7 +269,14 @@ public class ArrayUtil extends ArrayUtilRt {
|
||||
return array;
|
||||
}
|
||||
|
||||
final T[] array2 = collection.toArray(factory.create(collection.size()));
|
||||
final T[] array2;
|
||||
try {
|
||||
array2 = collection.toArray(factory.create(collection.size()));
|
||||
}
|
||||
catch (ArrayStoreException e) {
|
||||
throw new RuntimeException("Bad elements in collection: " + collection, e);
|
||||
}
|
||||
|
||||
if (array.length == 0) {
|
||||
return array2;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user