Skip to content

Commit

Permalink
Change Rhino message to be debug level not severe
Browse files Browse the repository at this point in the history
  • Loading branch information
fullwall committed Jun 9, 2015
1 parent 84fb1bd commit 20dfd36
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/main/java/net/citizensnpcs/api/scripting/ScriptCompiler.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,18 @@
import javax.script.SimpleBindings;
import javax.script.SimpleScriptContext;

import net.citizensnpcs.api.util.Messaging;

import com.google.common.base.Function;
import com.google.common.base.Throwables;
import com.google.common.collect.Lists;
import com.google.common.collect.MapMaker;
import com.google.common.collect.Maps;
import com.google.common.io.Closeables;

import net.citizensnpcs.api.util.Messaging;

/**
* Compiles files into {@link ScriptFactory}s. Intended for use as a separate
* thread - {@link ScriptCompiler#run()} will block while waiting for new tasks
* to compile.
* Compiles files into {@link ScriptFactory}s. Intended for use as a separate thread - {@link ScriptCompiler#run()} will
* block while waiting for new tasks to compile.
*/
public class ScriptCompiler {
private final WeakReference<ClassLoader> classLoader;
Expand Down Expand Up @@ -130,8 +129,7 @@ private ScriptEngine loadEngine(String extension) {
}

/**
* Registers a global {@link ContextProvider}, which will be invoked on all
* scripts created by this ScriptCompiler.
* Registers a global {@link ContextProvider}, which will be invoked on all scripts created by this ScriptCompiler.
*
* @param provider
* The global provider
Expand Down Expand Up @@ -292,6 +290,7 @@ public Reader getReader() throws FileNotFoundException {

private static boolean CLASSLOADER_OVERRIDE_ENABLED;
private static Method GET_APPLICATION_CLASS_LOADER, GET_GLOBAL, INIT_APPLICATION_CLASS_LOADER;

static {
try {
Class<?> CONTEXT_FACTORY = Class.forName("sun.org.mozilla.javascript.internal.ContextFactory");
Expand All @@ -304,7 +303,7 @@ public Reader getReader() throws FileNotFoundException {
INIT_APPLICATION_CLASS_LOADER.setAccessible(true);
CLASSLOADER_OVERRIDE_ENABLED = true;
} catch (Exception e) {
Messaging.severe("Unable to find Rhino classes - javascript scripts won't see non-CraftBukkit classes");
Messaging.debug("Unable to find Rhino classes - javascript scripts won't see non-CraftBukkit classes");
}
}
}

0 comments on commit 20dfd36

Please sign in to comment.