UsageInfo[] (UsageInfo[] infos) { ArrayList<UsageInfo> list = new ArrayList<>(); for (UsageInfo info : infos) { if (!(info instanceof SafeDeleteReferenceUsageInfo) || ((SafeDeleteReferenceUsageInfo) info).isSafeDelete()) { list.add(info); } } return list.toArray(UsageInfo.EMPTY_ARRAY); }