test/javax/script/GetInterfaceTest.java

Print this page

        

*** 20,43 **** * or visit www.oracle.com if you need additional information or have any * questions. */ /* * @test * @bug 6960211 * @summary JavaScript engine allows creation of interface although methods not available. */ import javax.script.*; public class GetInterfaceTest { public static void main(String[] args) throws Exception { ScriptEngineManager manager = new ScriptEngineManager(); ! ScriptEngine engine = manager.getEngineByName("js"); if (engine == null) { ! System.out.println("Warning: No engine engine found; test vacuously passes."); return; } // don't define any function. engine.eval(""); --- 20,44 ---- * or visit www.oracle.com if you need additional information or have any * questions. */ /* + * @run ignore * @test * @bug 6960211 * @summary JavaScript engine allows creation of interface although methods not available. */ import javax.script.*; public class GetInterfaceTest { public static void main(String[] args) throws Exception { ScriptEngineManager manager = new ScriptEngineManager(); ! ScriptEngine engine = manager.getEngineByName("nashorn"); if (engine == null) { ! System.out.println("Warning: No js engine engine found; test vacuously passes."); return; } // don't define any function. engine.eval("");