Repository: JetBrains/kotlin
File: compiler/cli/src/org/jetbrains/kotlin/cli/jvm/compiler/CompileEnvironmentUtil.java (Java)

Code before:
    }

    private static void writeRuntimeToJar(JarOutputStream stream, boolean resetJarTimestamps) throws IOException {
        File stdlibPath = PathUtil.getKotlinPathsForCompiler().getStdlibPath();
        if (!stdlibPath.exists()) {
            throw new CompileEnvironmentException("Couldn't find kotlin-stdlib at " + stdlibPath);
        }
        copyJarImpl(stream, stdlibPath, resetJarTimestamps);
    }

    private static void writeReflectToJar(JarOutputStream stream, boolean resetJarTimestamps) throws IOException {
        File reflectPath = PathUtil.getKotlinPathsForCompiler().getReflectPath();
        if (!reflectPath.exists()) {
            throw new CompileEnvironmentException("Couldn't find kotlin-reflect at " + reflectPath);
        }
        copyJarImpl(stream, reflectPath, resetJarTimestamps);
    }

    private static void copyJarImpl(JarOutputStream stream, File jarPath, boolean resetJarTimestamps) throws IOException {
        try (JarInputStream jis = new JarInputStream(new FileInputStream(jarPath))) {
            while (true) {
                JarEntry e = jis.getNextJarEntry();
                if (e == null) break;

                if ((!FileUtilRt.extensionEquals(e.getName(), "class") &&
                     !FileUtilRt.extensionEquals(e.getName(), "kotlin_builtins")) ||
                    StringsKt.substringAfterLast(e.getName(), "/", e.getName()).equals("module-info.class")) {
                    continue;
                }
                if (resetJarTimestamps) {
                    e.setTime(DOS_EPOCH);
                }
                stream.putNextEntry(e);
                FileUtil.copy(jis, stream);
            }
        }
    }
}


Review comment (suggestion):
```suggestion
                     !FileUtilRt.extensionEquals(e.getName(), BuiltInSerializerProtocol.BUILTINS_FILE_EXTENSION)) ||
```

Code after:
        }
    }

    private static void writeRuntimeToJar(JarOutputStream stream, boolean resetJarTimestamps) throws IOException {
        File stdlibPath = PathUtil.getKotlinPathsForCompiler().getStdlibPath();
        if (!stdlibPath.exists()) {
            throw new CompileEnvironmentException("Couldn't find kotlin-stdlib at " + stdlibPath);
        }
        copyJarImpl(stream, stdlibPath, resetJarTimestamps);
    }

    private static void writeReflectToJar(JarOutputStream stream, boolean resetJarTimestamps) throws IOException {
        File reflectPath = PathUtil.getKotlinPathsForCompiler().getReflectPath();
        if (!reflectPath.exists()) {
            throw new CompileEnvironmentException("Couldn't find kotlin-reflect at " + reflectPath);
        }
        copyJarImpl(stream, reflectPath, resetJarTimestamps);
    }

    private static void copyJarImpl(JarOutputStream stream, File jarPath, boolean resetJarTimestamps) throws IOException {
        try (JarInputStream jis = new JarInputStream(new FileInputStream(jarPath))) {
            while (true) {
                JarEntry e = jis.getNextJarEntry();
                if (e == null) break;

                if ((!FileUtilRt.extensionEquals(e.getName(), "class") &&
                     !FileUtilRt.extensionEquals(e.getName(), BuiltInSerializerProtocol.BUILTINS_FILE_EXTENSION)) ||
                    StringsKt.substringAfterLast(e.getName(), "/", e.getName()).equals("module-info.class")) {
                    continue;
                }
                if (resetJarTimestamps) {
                    e.setTime(DOS_EPOCH);
                }
                stream.putNextEntry(e);
                FileUtil.copy(jis, stream);
            }
        }
    }
}