From ff4e823ee29f5a6a0e1658ff8ff43f1076f7a559 Mon Sep 17 00:00:00 2001 From: Peter Donald Date: Sat, 15 Dec 2001 06:19:15 +0000 Subject: [PATCH] Revert setting of security manager. git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@270152 13f79535-47bb-0310-9956-ffa450edef68 --- src/main/org/apache/tools/ant/Main.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/main/org/apache/tools/ant/Main.java b/src/main/org/apache/tools/ant/Main.java index 61c73bd3d..6a647a453 100644 --- a/src/main/org/apache/tools/ant/Main.java +++ b/src/main/org/apache/tools/ant/Main.java @@ -164,6 +164,7 @@ public class Main { } System.exit(1); } catch(Throwable exc) { + exc.printStackTrace(); printMessage(exc); System.exit(1); } @@ -424,7 +425,11 @@ public class Main { if ( !Project.JAVA_1_0.equals(Project.getJavaVersion()) && !Project.JAVA_1_1.equals(Project.getJavaVersion()) ){ oldsm = System.getSecurityManager(); - System.setSecurityManager(new NoExitSecurityManager()); + + //SecurityManager can not be installed here for backwards + //compatability reasons (PD). Needs to be loaded prior to + //ant class if we are going to implement it. + //System.setSecurityManager(new NoExitSecurityManager()); } try { System.setOut(new PrintStream(new DemuxOutputStream(project, false))); @@ -476,9 +481,11 @@ public class Main { } finally { // put back the original security manager + //The following will never eval to true. (PD) if (oldsm != null){ System.setSecurityManager(oldsm); } + System.setOut(out); System.setErr(err); }