-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Skip downloading existing files, exit without tripping the SecurityMa…
…nager
- Loading branch information
1 parent
b5d4849
commit 8a860fa
Showing
3 changed files
with
38 additions
and
4 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
src/main/java/cpw/mods/fml/common/fakelwjgl3ify/SafeRuntimeExit.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package cpw.mods.fml.common.fakelwjgl3ify; | ||
|
||
/** Safe runtime exit class to not trip the FML security manager. */ | ||
public class SafeRuntimeExit { | ||
|
||
public static void exitRuntime(int code) { | ||
nest0(code); | ||
} | ||
|
||
private static void nest0(int code) { | ||
nest1(code); | ||
} | ||
|
||
private static void nest1(int code) { | ||
nest2(code); | ||
} | ||
|
||
private static void nest2(int code) { | ||
Runtime.getRuntime() | ||
.exit(code); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters