runelite-client: Require assertions when developer mode is on

Because we now have several thread checks that use assertions, but not many people have assertions on, so we keep getting code with threading problems that no one notices.

If for some reason you need developer mode with assertions disabled you can add `-ea:net.runelite.client.RuneLite` to your JVM params
This commit is contained in:
Max Weber
2018-05-22 19:11:57 -06:00
parent d873d9c0df
commit e6d450bcd8

View File

@@ -146,6 +146,16 @@ public class RuneLite
System.exit(0);
}
if (RuneLite.getOptions().has("developer-mode"))
{
boolean assertions = false;
assert assertions = true;
if (!assertions)
{
throw new RuntimeException("Developers should enable assertions; Add `-ea` to your JVM arguments`");
}
}
PROFILES_DIR.mkdirs();
// Setup logger