@Deprecated(since = "5.0.0", forRemoval = true) // Remove in or after Openfire 5.1.0
    public static List<WeightedHostAddress> prioritize(WeightedHostAddress[] records) {
        final List<WeightedHostAddress> result = new LinkedList<>();

        // sort by priority (ascending)
        final Set<SrvRecord> delegates = Arrays.stream(records).map(WeightedHostAddress::getDelegate).collect(Collectors.toSet());
        final List<Set<SrvRecord>> prioritized = SrvRecord.prioritize(delegates);
        for (Set<SrvRecord> set : prioritized) {
            final LinkedHashSet<WeightedHostAddress> orderedSet = new LinkedHashSet<>(); // Retain the order in the set!
            for (final SrvRecord e : set) {
                orderedSet.add(new WeightedHostAddress(e));
            }
            result.addAll(orderedSet);
        }
        return result;
    }
@deprecated Replaced by {@link SrvRecord#prioritize(SrvRecord[])}
xmppserver/src/main/java/org/jivesoftware/openfire/net/DNSUtil.java