public static List<String> disallowedImports(Map<String, ImportPackages.Import> imports, List<String> disallowed) {
        if (imports == null || imports.isEmpty()) return List.of();

        var importedSet = new HashSet<>(imports.keySet());
        var disallowedSet = disallowed == null ? Set.of() : new HashSet<>(disallowed);

        return importedSet.stream()
                .filter(disallowedSet::contains)
                .sorted()
                .toList();
    }
Returns a sorted list of the imported packages that exist in the given set of disallowed packages.
bundle-plugin/src/main/java/com/yahoo/container/plugin/classanalysis/Packages.java