Switched to ES6 language level
This commit is contained in:
@@ -17,7 +17,6 @@ import java.net.*;
|
||||
import java.util.regex.*;
|
||||
|
||||
public class Scripts implements Disposable{
|
||||
private final static Object[] emptyObjects = {};
|
||||
private final Seq<String> blacklist = Seq.with("net", "files", "reflect", "javax", "rhino", "file", "channels", "jdk",
|
||||
"runtime", "util.os", "rmi", "security", "org.", "sun.", "beans", "sql", "http", "exec", "compiler", "process", "system",
|
||||
".awt", "socket", "classloader", "oracle", "invoke", "arc.events", "java.util.function", "java.util.stream");
|
||||
@@ -34,6 +33,7 @@ public class Scripts implements Disposable{
|
||||
context = Vars.platform.getScriptContext();
|
||||
context.setClassShutter(type -> !blacklist.contains(type.toLowerCase()::contains) || whitelist.contains(type.toLowerCase()::contains));
|
||||
context.getWrapFactory().setJavaPrimitiveWrap(false);
|
||||
context.setLanguageVersion(Context.VERSION_ES6);
|
||||
|
||||
scope = new ImporterTopLevel(context);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user