src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/RecompilableScriptFunctionData.java

Print this page

        

*** 489,506 **** * @return the function initializer */ private FunctionInitializer install(final StoredScript script) { final Map<String, Class<?>> installedClasses = new HashMap<>(); final String mainClassName = script.getMainClassName(); ! final byte[] mainClassBytes = script.getClassBytes().get(mainClassName); final Class<?> mainClass = installer.install(mainClassName, mainClassBytes); installedClasses.put(mainClassName, mainClass); ! for (final Map.Entry<String, byte[]> entry : script.getClassBytes().entrySet()) { final String className = entry.getKey(); final byte[] code = entry.getValue(); if (className.equals(mainClassName)) { continue; --- 489,507 ---- * @return the function initializer */ private FunctionInitializer install(final StoredScript script) { final Map<String, Class<?>> installedClasses = new HashMap<>(); + final Map<String, byte[]> classBytes = script.getClassBytes(); final String mainClassName = script.getMainClassName(); ! final byte[] mainClassBytes = classBytes.get(mainClassName); final Class<?> mainClass = installer.install(mainClassName, mainClassBytes); installedClasses.put(mainClassName, mainClass); ! for (final Map.Entry<String, byte[]> entry : classBytes.entrySet()) { final String className = entry.getKey(); final byte[] code = entry.getValue(); if (className.equals(mainClassName)) { continue;