@NonNull
    static Pair<LinkedHashSet<String>, Set<String>> readLinesFromExtensionFiles(
        /* input */ @NonNull Enumeration<URL> extensionFiles,
        /* input/output, map url string -> content lines */ @NonNull Map<String, LinkedHashSet<String>> redExtensionFilesHistory
    ) {
        final LinkedHashSet<String> mergedLines = new LinkedHashSet<>();
        final Set<String> stringUrls = new HashSet<>();

        while (extensionFiles.hasMoreElements()) {
            final URL url = extensionFiles.nextElement();

            final String urlString = url.toString();
            stringUrls.add(urlString);

            LinkedHashSet<String> lines;
            if (redExtensionFilesHistory.containsKey(urlString)) {
                lines = redExtensionFilesHistory.get(urlString);
            } else {
                lines = readLines(url);

                redExtensionFilesHistory.put(urlString, lines);
            }

            mergedLines.addAll(lines);
        }

        return new Pair<>(mergedLines, stringUrls);
    }
@author Jerry Lee (oldratlee at gmail dot com)
@since 3.0.0
ttl2-compatible/src/main/java/com/alibaba/ttl/threadpool/agent/TtlExtensionTransformletManager.java