Make const final

This commit is contained in:
Enyby
2018-09-16 18:45:52 +03:00
committed by GitHub
parent 9db1254160
commit 5c1f7d2ab2

View File

@@ -81,15 +81,18 @@ public class PackageLib extends TwoArgFunction {
/** The default value to use for package.path. This can be set with the system property /** The default value to use for package.path. This can be set with the system property
* <code>"luaj.package.path"</code>, and is <code>"?.lua"</code> by default. */ * <code>"luaj.package.path"</code>, and is <code>"?.lua"</code> by default. */
public static String DEFAULT_LUA_PATH; public static final String DEFAULT_LUA_PATH;
static { static {
String path = null;
try { try {
DEFAULT_LUA_PATH = System.getProperty("luaj.package.path"); path = System.getProperty("luaj.package.path");
} catch (Exception e) { } catch (Exception e) {
System.out.println(e.toString()); System.out.println(e.toString());
} }
if (DEFAULT_LUA_PATH == null) if (path == null) {
DEFAULT_LUA_PATH = "?.lua"; path = "?.lua";
}
DEFAULT_LUA_PATH = path;
} }
static final LuaString _LOADED = valueOf("loaded"); static final LuaString _LOADED = valueOf("loaded");