public static Map readSectionFromBootPropertiesOf()

in tc-sbt-runner-agent/src/main/java/jetbrains/buildServer/sbt/SbtVersionDetector.java [124:138]


    public static Map<String, String> readSectionFromBootPropertiesOf(@NotNull File launcherFile, @NotNull String sectionName) {
        JarFile jarFile = null;
        InputStream inputStream = null;
        try {
            jarFile = new JarFile(launcherFile);
            ZipEntry entry = jarFile.getEntry("sbt/sbt.boot.properties");
            inputStream = jarFile.getInputStream(entry);
            return readPropertiesFromStream(inputStream, sectionName);
        } catch (Exception e) {
            return Collections.emptyMap();
        } finally {
            FileUtil.close(jarFile);
            FileUtil.close(inputStream);
        }
    }