@SuppressWarnings("StatementWithEmptyBody")
    static LinkedHashSet<String> readLines(URL extensionFile) {
        InputStream inputStream = null;
        BufferedReader reader = null;

        LinkedHashSet<String> names = new LinkedHashSet<>();
        try {
            inputStream = extensionFile.openStream();
            reader = new BufferedReader(new InputStreamReader(inputStream, UTF_8));
            int lineNum = 1;
            while ((lineNum = parseLine(extensionFile, reader, lineNum, names)) >= 0) ;
        } catch (IOException x) {
            logger.error("Error reading configuration file " + extensionFile, x);
        } finally {
            try {
                if (reader != null) reader.close();
                if (inputStream != null) inputStream.close();
            } catch (IOException y) {
                logger.warn("Error closing configuration file " + extensionFile, y);
            }
        }

        return names;
    }
this method is modified based on {@link ServiceLoader}
ttl-agent/src/main/java/com/alibaba/ttl3/agent/TtlExtensionTransformletManager.java