aboutsummaryrefslogtreecommitdiff
path: root/nailgun_launcher/TrapSecurityManager.java
diff options
context:
space:
mode:
authorChristopher Vogt <oss.nsp@cvogt.org>2016-03-26 16:20:50 -0400
committerChristopher Vogt <oss.nsp@cvogt.org>2016-03-28 11:53:52 -0400
commitbd75b5af0161013b26e2feda9cfcc1e152926071 (patch)
tree6fef7506f432f780fa64bca5afd5f944790be196 /nailgun_launcher/TrapSecurityManager.java
parent2c20a0dddc70a5eee207fb1c588bfd53eaaa7841 (diff)
downloadcbt-bd75b5af0161013b26e2feda9cfcc1e152926071.tar.gz
cbt-bd75b5af0161013b26e2feda9cfcc1e152926071.tar.bz2
cbt-bd75b5af0161013b26e2feda9cfcc1e152926071.zip
Early classloading improvements
- Changed launcher to already load zinc - use code generation to generate necessary dependencies - changed resolver to linearize dependency DAG in a way that guarantees that every transitive dependee of a node in the DAG is a transitive dependee of that node in the linear sequence - move exit code trapping code into java so it can be used for zinc early There seems to be a bug in this version, where CBT crashes about half of the time with a "object is not an instance of declaring class" Exception during running the task from the build object via reflection.
Diffstat (limited to 'nailgun_launcher/TrapSecurityManager.java')
-rw-r--r--nailgun_launcher/TrapSecurityManager.java19
1 files changed, 19 insertions, 0 deletions
diff --git a/nailgun_launcher/TrapSecurityManager.java b/nailgun_launcher/TrapSecurityManager.java
new file mode 100644
index 0000000..ed00582
--- /dev/null
+++ b/nailgun_launcher/TrapSecurityManager.java
@@ -0,0 +1,19 @@
+package cbt;
+import java.security.*;
+public class TrapSecurityManager extends SecurityManager{
+ public void checkPermission( Permission permission ){
+ /*
+ NOTE: is it actually ok, to just make these empty?
+ Calling .super leads to ClassNotFound exteption for a lambda.
+ Calling to the previous SecurityManager leads to a stack overflow
+ */
+ }
+ public void checkPermission( Permission permission, Object context ){
+ /* Does this methods need to be overidden? */
+ }
+ @Override
+ public void checkExit( int status ){
+ super.checkExit(status);
+ throw new TrappedExitCode(status);
+ }
+}